Академический Документы
Профессиональный Документы
Культура Документы
MAR MBR
XZNVC CCR
A0 D0
A1 D1
A2 D2
A3 D3 Data
Address
Registers
Registers A4 D4
A5 D5
A6 D6
USP A7 D7
15 8 7 0
Status Register
D4
byte D5
word D6
longword D7
Operand Size
Since the 68000 is capable of performing operations on bytes, words, and long words:
D1 = D0 FF FF FF FF
31 0
D1 12 34 56 78
• MOVE.W D0,D1
D1 =
• MOVE.L D0,D1
D1 =
• MOVE D0,D1
D1 =
The 68000’s Address Registers
Address registers are always used to store the address of a memory location.
A0 Memory
D0
A1
A2
12345678 A3 12345678
A4 +
A5
• The contents of an address register are considered to be a signed value, and only long
word operations can take place on the contents of an address register.
− In the case of a word operation, the source operand is sign extended to a long
word.
ALU
7 6 5 4 3 2 1 0
X N Z V C CCR
BITS FUNCTION
0 Set to 1 if carry/borrow occurs; otherwise cleared (set to 0)
1 Set to 1 if signed overflow occurs; otherwise cleared
2 Set to 1 if result is 0; otherwise cleared
3 Set to 1 if result is negative, set to 0 if positive
4 Extend bit retains carry bit for multi-word arithmetic
5,6,7 Not used
An Example Calculation
111
00011001
+01110000
10001001 V = Sm⋅Dm⋅Rm + Sm⋅Dm⋅Rm
Rm = 1
Dm = 0 N = Rm
Sm = 0
Z = Rm⋅Rm-1⋅Rm-2⋅⋅⋅R0
Note: No general rules for determining how an
instruction will affect bits in CCR
The 68000 has a 32-bit program counter and 32-bit address registers, but only a 24-bit
address bus.
A0
Only 24 address lines (A0-A23)
PC/A0-A7
are brought off-chip
A23
Actual address space = 224 =16,777,216 locations
A24
Not
A31 Connected
Implication: use 6 hex digits to specify
address instead of eight!
A0 implied by UDS and LDS bus signals
12345616 ⇔ xx12345616
000000 byte 0
000001 byte 1
000002 byte 2
000003 byte 3
FFFFFF
When storing values in memory, the most significant byte is stored at the first address location
followed by the remaining bytes, as illustrated below.
31 0
memory
Register A1 D2 C3 B4
msb lsb
000100 A1 msb
31
Before 0
D0 FF FF FF FF
D0 D0 D0
68000 Instruction Format
An instruction consists of one to five instruction words (16 bits). An instruction may have no
operands, one operands, or two operands. Source operands are not changed by the instruction;
destination operands are changed during the execution of the instruction.
OPERATION WORD
(First word specifies operation and modes)