Instructor: Rob Nash Readings: Chap 7-9 Midterm Next Monday!
Instructor: Rob Nash Readings: Chap 7-9 Midterm Next Monday!
END $400
FTOC SUBI.W #32, D0
MULS#5, D0
DIVS #9, D0
RTS
See p.28, section 2.6
If register D3 contains 100030FF and register
D4 contains 8E552900, what is the result of
8E5530FF
0x007EFF : 3C
0x007F00 : 09
0x007F01 : BA
MOVE.W (A5)+, D2
Use what A5 is pointing to, then decrement
◦ A5 thus looks up 7F00
Since a word operation, post decrement by 2
◦ A5 is now 0x007F02
This implements a push
◦ Decrement our stack first to make space
◦ Then overwrite this new location with our data
Stacks shrink “downwards”, or to higher addresses
Relocatable code is critically important today,
and compilers provide this type of code
automatically
//Mem
0x007EFF : 3C
0x007F00 : 09
0x007F01 : BA
MOVE.B –(A2),D4
For 2 reapers!!
What does the asm look like for the
following?
Data section:
What does the following code look like in
ASM?