Category:68000 Assembly: Difference between revisions

Content added Content deleted
mNo edit summary
Line 93: Line 93:
CHK D0,D3 ;if D0 > D3 then Trap 6 will occur.</lang>
CHK D0,D3 ;if D0 > D3 then Trap 6 will occur.</lang>


* The 17th trap is called the "Overflow Trap" and can only be called with the <code>TRAPV</code> instruction, which calls it <i>if the overflow flag is set.</i>
* The 17th trap is called the "Overflow Trap" and can only be called with the <code>TRAPV</code> instruction, which calls it <i>if the overflow flag is set.</i>

Depending on the hardware, certain traps are built-in to perform certain tasks, such as reading a keyboard or mouse, or are user-defined. To create your own trap routine, you'll need to first write the routine, then store its address in the corresponding trap number. Trap 0 is stored at $000080


==Citations==
==Citations==