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 #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 | .end
|
---|