Category:68000 Assembly: Difference between revisions

m
Line 78:
 
Certain traps have specific meanings as defined by the 68000 itself:
* Trap 4 occurs if the <code>ILLEGAL</code> command is executed. This is similar to <code>BRK</code> on [[6502 Assembly]]. If you're programming on a system or emulator with no built-in debugger, it's a handy way of seeing if execution is arriving at a certain point. If Trap 4 is pointed to a system reset or a hexdump routine you created., Thisyou'll (admittedlyknow contrived)in examplean willinstant showif the basiccode concept.before Ifit theis <code>ILLEGAL</code>bugged. routineThis is(admittedly executed,contrived) theexample programmerwill now knows thatshow the codebasic leading up to TestRoutine is buggedconcept.
<lang 68000devpac>;trying to see if this routine works properly
TestRoutine:
1,489

edits