source: buchla-68k/iolib/traps.s@ f806726

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

Removed _ prefix.

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[4f508e6]1
2| traps.s -- define trap linkages for C routines
3| ------- -----------------------------------
4| Version 8 -- 1987-06-08 -- D.N. Lynx Crowe
5
6| Caution: these are serially re-useable, but NOT reentrant, so
7| don't use them in interrupt processing code.
8
[8325447]9| An exception is made for ROMP in trap15 for breakpoints so that the
[4f508e6]10| debug code can be debugged.
11
[f40a309]12 .text
[4f508e6]13
[8325447]14 .xdef trap1
15 .xdef trap13,trap14
16 .xdef xtrap15
[4f508e6]17
[f40a309]18 .xdef tr1sav,tr13sav,tr14sav
19 .xdef tr1rmp,tr13rmp,tr14rmp
[4f508e6]20
[8325447]21| trap1 -- provide access to BDOS functions
22| ----- --------------------------------
23trap1: move.l (a7)+,tr1sav | Save return address
[4f508e6]24 trap #1 | Do the trap
25 move.l tr1sav,-(a7) | Restore return address
26 rts | Return to caller
27
[8325447]28| trap13 -- provide access to BIOS functions
29| ------ --------------------------------
30trap13: move.l (a7)+,tr13sav | Save return address
[4f508e6]31 trap #13 | Do the trap
32 move.l tr13sav,-(a7) | Restore return address
33 rts | Return to caller
34
[8325447]35| trap14 -- provide access to extended BIOS functions
36| ------ -----------------------------------------
37trap14: move.l (a7)+,tr14sav | Save return address
[4f508e6]38 trap #14 | Do the trap
39 move.l tr14sav,-(a7) | Restore return address
40 rts | Return to caller
41
[8325447]42| xtrap15 -- Setup initial register trap for ROMP
43| ------- ------------------------------------
44xtrap15: trap #15 | TRAP into ROMP
[4f508e6]45 rts | Return (usually won't happen)
46
[f40a309]47 .page
[4f508e6]48
49| RAM storage areas
50| -----------------
[f40a309]51 .bss
52 .even
[4f508e6]53
[4cfe69a]54tr1sav: .ds.l 1 | Return address for trap1
55tr13sav: .ds.l 1 | Return address for trap13
56tr14sav: .ds.l 1 | Return address for trap14
[4f508e6]57
[4cfe69a]58tr1rmp: .ds.l 1 | Save area for tr1sav for ROMP
59tr13rmp: .ds.l 1 | Save area for tr13sav for ROMP
60tr14rmp: .ds.l 1 | Save area for tr14sav for ROMP
[4f508e6]61
[f40a309]62 .end
Note: See TracBrowser for help on using the repository browser.