Changeset 4f508e6 in buchla-68k for lib700/jumpto.s
- Timestamp:
- 07/01/2017 02:34:46 PM (7 years ago)
- Branches:
- master
- Children:
- 08e1da1
- Parents:
- f40a309
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib700/jumpto.s
rf40a309 r4f508e6 1 *------------------------------------------------------------------------------2 *jumpto.s -- miscellaneous ROMP support functions3 *Version 4 -- 1987-10-14 -- D.N. Lynx Crowe4 * 5 *WARNING:6 *--------7 *These functions, in general, assume supervisor mode and8 *'sane' arguments, so no error checking is done.9 * 10 *halt()11 * 12 *Brings the processor to a grinding halt. Requires external13 *reset to restart things. Use only for catastrophic hard halts.14 * 15 *jumpto(addr)16 *long addr;17 * 18 *Jumps to 'addr'. No error check is done on 'addr'.19 * 20 *rjumpto(addr)21 *long addr;22 * 23 *Performs the 68000 'RESET' command, then jumps to 'addr'.24 *No error check is made on 'addr'.25 * 26 *sjumpto(addr, stack)27 *long addr, stack;28 * 29 *Sets a7 to 'stack', then jumps to 'addr'.30 *No error check is done on 'addr'.31 * 32 *xreset()33 * 34 *Performs the 68000 'RESET' command. This is very dangerous,35 *and should be used with extreme care regarding such36 *things as interrupts, device initialization, vectors,37 *and sundry other reset-related things.38 * 39 *------------------------------------------------------------------------------1 | ------------------------------------------------------------------------------ 2 | jumpto.s -- miscellaneous ROMP support functions 3 | Version 4 -- 1987-10-14 -- D.N. Lynx Crowe 4 5 | WARNING: 6 | -------- 7 | These functions, in general, assume supervisor mode and 8 | 'sane' arguments, so no error checking is done. 9 10 | halt() 11 12 | Brings the processor to a grinding halt. Requires external 13 | reset to restart things. Use only for catastrophic hard halts. 14 15 | jumpto(addr) 16 | long addr; 17 18 | Jumps to 'addr'. No error check is done on 'addr'. 19 20 | rjumpto(addr) 21 | long addr; 22 23 | Performs the 68000 'RESET' command, then jumps to 'addr'. 24 | No error check is made on 'addr'. 25 26 | sjumpto(addr, stack) 27 | long addr, stack; 28 29 | Sets a7 to 'stack', then jumps to 'addr'. 30 | No error check is done on 'addr'. 31 32 | xreset() 33 34 | Performs the 68000 'RESET' command. This is very dangerous, 35 | and should be used with extreme care regarding such 36 | things as interrupts, device initialization, vectors, 37 | and sundry other reset-related things. 38 39 | ------------------------------------------------------------------------------ 40 40 .text 41 * 41 42 42 .xdef _halt,_jumpto,_rjumpto,_sjumpto,_xreset 43 * 43 44 44 .page 45 * 46 _halt: stop # $2700 *stop dead, interrupts disabled47 jmp _halt *stay stopped if stepped thru48 * 49 _jumpto: movea.l 4(a7),a0 *get jump address50 jmp (a0) *go to the jump address51 * 52 _rjumpto: reset *reset external devices53 movea.l 4(a7),a0 *get jump address54 jmp (a0) *go to the jump address55 * 56 _sjumpto: movea.l 4(a7),a0 *get jump address57 movea.l 8(a7),a7 *set stack pointer58 jmp (a0) *go to the jump address59 * 60 _xreset: reset *reset external devices61 rts *return to caller62 * 45 46 _halt: stop #0x2700 | stop dead, interrupts disabled 47 jmp _halt | stay stopped if stepped thru 48 49 _jumpto: movea.l 4(a7),a0 | get jump address 50 jmp (a0) | go to the jump address 51 52 _rjumpto: reset | reset external devices 53 movea.l 4(a7),a0 | get jump address 54 jmp (a0) | go to the jump address 55 56 _sjumpto: movea.l 4(a7),a0 | get jump address 57 movea.l 8(a7),a7 | set stack pointer 58 jmp (a0) | go to the jump address 59 60 _xreset: reset | reset external devices 61 rts | return to caller 62 63 63 .end
Note:
See TracChangeset
for help on using the changeset viewer.