Category:68000 Assembly: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) m (→Traps) |
Puppydrum64 (talk | contribs) (added notes about Big-Endian) |
||
Line 4: | Line 4: | ||
==Architecture Overview== |
==Architecture Overview== |
||
===Big-Endian=== |
|||
The 68000, unlike most processors of its era, is big-endian. This means that bytes are stored from left to right. The example below illustrates this concept: |
|||
<lang 68000devpac>MOVE.L #$12345678,$100000 ;store the hexadecimal numeral #$12345678 at memory address $100000 |
|||
;hexdump of $100000: |
|||
;$100000 = $12 |
|||
;$100001 = $34 |
|||
;$100002 = $56 |
|||
;$100003 = $78</lang> |
|||
On a little-endian processor such as in [[x86 Assembly]], the order of the bytes would be reversed, i.e.: |
|||
<lang asm>;hexdump of $100000 |
|||
;$100000 = $78 |
|||
;$100001 = $56 |
|||
;$100002 = $34 |
|||
;$100003 = $12</lang> |
|||
This difference isn't usually relevant in the majority of situations, so don't concern yourself too much. It's much more important when doing [[6502 Assembly]] where registers are smaller than the address space. |
|||
===Data Registers=== |
===Data Registers=== |