The final exam WILL be on Thursday, May 17, from 5:15 - 7:30 in MH 234. If you have a scheduling conflict, then probably your other teacher has misread the final exam schedule.
Format
The exam will consist of 3 - 5 problems. Most of the problems will be similar to the written parts of the homework assignments:
What's in reg5 after executing:
reg5 = reg0 + reg1;
reg5 = reg0 <<
reg1;
reg5 = ~reg0;
What's the value of the expression:
*p + 1
*(p + 1)
p[1]
cc[if (a < b) a = b + 2; else a = a * a; ]
etc.
Integer representation systems
(for n = 4, 5, 8, 16, or 32)
n-bit sign-magnitude
system
n-bit ones complement
n-bit twos complement
C-- Operations
arithmetic
overflow
carry out
bitwise
boolean
shifts (right &
left)
arithmetic
logical
rotate
Alignment and byte order
Addressing modes
Immediate
Absolute
Direct
Indirect
Base-Index
Pointers and Arrays in C
Array-pointer duality
& operator
* operator
declaring pointers
and arrays
Note: heap allocation
& deallocation will not be on the final
Instruction Sets
Classifying C instructions
Translating C instructions
into C-- instructions
Call and Return
How does the CPU
execute call?
How does the CPU
execute return?
How does a caller
pass parameters to a procedure?
How does a procedure
save and restore the caller's state?
Why is this necessary? Give an example.
Recursion
Note: interrupts
will not be covered on the final.
I80x86 Assembly Programming
_asm { ... }
The I80x86-- instruction
set:
mov ARG1, ARG2
add ARG1, ARG2
sub ARG1, ARG2
cmp ARG1, ARG2
ja LABEL
jb LABEL
jae LABEL
jbe LABEL
jmp LABEL
The I80x86-- addressing
modes (examples)
mov eax, 42
mov eax, reg0
mov eax, mem[42]