source: buchla-68k/orig/CLIBRARY/JUMPTO.S@ 7bf3856

Last change on this file since 7bf3856 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 1.7 KB
Line 
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 .text
41*
42 .xdef _halt,_jumpto,_rjumpto,_sjumpto,_xreset
43*
44 .page
45*
46_halt: stop #$2700 * 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 .end
Note: See TracBrowser for help on using the repository browser.