Software Model
Software Model
Software Model
000100 … … W1 W0
000102
000104
000106 W1 Big Endean Processor:
Low Order Data « High Order Address
000108 W0
00010A … …
00010C W0
Little Endean Processor:
00010E W1 Low Order Data « Low Order Address
000110
000112
000114 … … W1 W0
When a parameter is used quite often in the code, you better use this directive; if
it needs to be changed later, you change only one place
Why MOVE.B #$20, D1 is $123C0020? And BTST #5, (A4) is $08140005? See
the next slide
The MC68000 is Big Endian, the higher order byte has the
address of the word, and the lower is one count up, this
is why we swapped the addressing (left and right)
Dr. Taisir Eldos 9
Assembler Directives - DS
DS Define Storage 001000 001001
Allocates only, written/read in run time 001002 001003
001004 001005
001006 001007
Base EQU 4
001008 001009
ORG $001000 00100A 00100B
Block1 DS.B 3*Base+2 00100C 00100D
Block1 is 001000, light gray bytes reserved (no write) 001018 X 001019
00101A 12 3C 00101B
Block2 is 00100E, dark gray words reserved (no write) 00101C 00 75 00101D
Space is 001016
Start is 00101A not 001019 to keep instructions word
aligned with word boundaries (X means skipped)
T S I2 I1 I0 X N Z V C SB CCR SR