Category:68000 Assembly: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) redid the section and cut out a bunch of fluff |
Puppydrum64 (talk | contribs) |
||
Line 117: | Line 117: | ||
The 68000's vector table contains more than this, but to keep things simple there will be a few things omitted. |
The 68000's vector table contains more than this, but to keep things simple there will be a few things omitted. |
||
* Address $00000000 contains the initial value of the stack pointer. You never need to <code>MOVE.L (0),SP</code>, the CPU does this automatically. |
* Address $00000000 contains the initial value of the stack pointer. You never need to <code>MOVE.L (0),SP</code>, the CPU does this automatically. |
||
* Address $00000004 contains the program start. The CPU |
* Address $00000004 contains the program start. The second thing the CPU does (after loading the default stack pointer from $00000000) is <code>JMP</code> to the address stored in $00000004 (note that it doesn't jump TO $00000004, it loads the 4 bytes stored there and makes that the new program counter value.) |
||
* The next 8 longwords are the hardware traps. Each represents the memory location of a function or procedure meant for a hardware error (the 68000 doesn't have segmentation faults but it's a similar concept. Among them include handlers for division by zero, signed overflow, etc.) |
* The next 8 longwords are the hardware traps. Each represents the memory location of a function or procedure meant for a hardware error (the 68000 doesn't have segmentation faults but it's a similar concept. Among them include handlers for division by zero, signed overflow, etc.) |
||
* Interrupt requests and user-defined traps go here as well. |
* Interrupt requests and user-defined traps go here as well. |