[oss] Lecture test #1: Monday, October 16, 2017, 6:05pm, room PR106
Razvan Deaconescu
razvan.deaconescu at cs.pub.ro
Sat Oct 28 18:21:40 EEST 2017
On Sat, Oct 28, 2017 at 6:07 PM, Razvan Deaconescu
<razvan.deaconescu at cs.pub.ro> wrote:
> Hi, everyone.
>
> We've published the class register, including, the grades for lecture
> test 1 on the wiki[1]. If you consider the grade is wrong, send a
> private e-mail to me (Răzvan) no later than Tuesday, October 31, 2017,
> 11:00pm, with the subject:
> ---
> [CNS] Lecture Test 1, request to regrade: SURNAME Firstname, program
> ---
> for example
> ---
> [CNS] Lecture Test 1, request to regrade: ANTON Felicia, SAS
> ---
A common mistake for was the answer to the question "What are the two
registers that the instruction call alters?"
A bunch of answers mentioned ebp (frame pointer) and esp (stack
pointer). However, ebp is not altered by the call instruction. It is
common for ebp to be altered by the function prologue, but it is not
altered by the call instruction.
The call func instruction is roughly equivalent to push eip; jmp func.
So it alters the stack pointer (esp) by saving the return address on
the stack (the address of the next instruction) and it alters the
instruction pointer (eip) by jumping to the address of func (a
function label).
> [1] https://ocw.cs.pub.ro/courses/cns/class-register
Razvan
More information about the oss
mailing list