Changeset 4f508e6 in buchla-68k for iolib/traps.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
-
iolib/traps.s
rf40a309 r4f508e6 1 * 2 *traps.s -- define trap linkages for C routines3 *------- -----------------------------------4 *Version 8 -- 1987-06-08 -- D.N. Lynx Crowe5 * 6 *Caution: these are serially re-useable, but NOT reentrant, so7 *don't use them in interrupt processing code.8 * 9 *An exception is made for ROMP in _trap15 for breakpoints so that the10 *debug code can be debugged.11 * 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 9 | An exception is made for ROMP in _trap15 for breakpoints so that the 10 | debug code can be debugged. 11 12 12 .text 13 * 13 14 14 .xdef _trap1 15 15 .xdef _trap13,_trap14 16 16 .xdef _xtrap15 17 * 17 18 18 .xdef tr1sav,tr13sav,tr14sav 19 19 .xdef tr1rmp,tr13rmp,tr14rmp 20 * 21 *_trap1 -- provide access to BDOS functions22 *------ --------------------------------23 _trap1: move.l (a7)+,tr1sav *Save return address24 trap #1 *Do the trap25 move.l tr1sav,-(a7) *Restore return address26 rts *Return to caller27 * 28 *_trap13 -- provide access to BIOS functions29 *------- --------------------------------30 _trap13: move.l (a7)+,tr13sav *Save return address31 trap #13 *Do the trap32 move.l tr13sav,-(a7) *Restore return address33 rts *Return to caller34 * 35 *_trap14 -- provide access to extended BIOS functions36 *------- -----------------------------------------37 _trap14: move.l (a7)+,tr14sav *Save return address38 trap #14 *Do the trap39 move.l tr14sav,-(a7) *Restore return address40 rts *Return to caller41 * 42 *_xtrap15 -- Setup initial register trap for ROMP43 *-------- ------------------------------------44 _xtrap15: trap #15 *TRAP into ROMP45 rts *Return (usually won't happen)46 * 20 21 | _trap1 -- provide access to BDOS functions 22 | ------ -------------------------------- 23 _trap1: move.l (a7)+,tr1sav | Save return address 24 trap #1 | Do the trap 25 move.l tr1sav,-(a7) | Restore return address 26 rts | Return to caller 27 28 | _trap13 -- provide access to BIOS functions 29 | ------- -------------------------------- 30 _trap13: move.l (a7)+,tr13sav | Save return address 31 trap #13 | Do the trap 32 move.l tr13sav,-(a7) | Restore return address 33 rts | Return to caller 34 35 | _trap14 -- provide access to extended BIOS functions 36 | ------- ----------------------------------------- 37 _trap14: move.l (a7)+,tr14sav | Save return address 38 trap #14 | Do the trap 39 move.l tr14sav,-(a7) | Restore return address 40 rts | Return to caller 41 42 | _xtrap15 -- Setup initial register trap for ROMP 43 | -------- ------------------------------------ 44 _xtrap15: trap #15 | TRAP into ROMP 45 rts | Return (usually won't happen) 46 47 47 .page 48 * 49 *RAM storage areas50 *-----------------48 49 | RAM storage areas 50 | ----------------- 51 51 .bss 52 52 .even 53 * 54 tr1sav: ds.l 1 *Return address for trap155 tr13sav: ds.l 1 *Return address for trap1356 tr14sav: ds.l 1 *Return address for trap1457 * 58 tr1rmp: ds.l 1 *Save area for tr1sav for ROMP59 tr13rmp: ds.l 1 *Save area for tr13sav for ROMP60 tr14rmp: ds.l 1 *Save area for tr14sav for ROMP61 * 53 54 tr1sav: ds.l 1 | Return address for trap1 55 tr13sav: ds.l 1 | Return address for trap13 56 tr14sav: ds.l 1 | Return address for trap14 57 58 tr1rmp: ds.l 1 | Save area for tr1sav for ROMP 59 tr13rmp: ds.l 1 | Save area for tr13sav for ROMP 60 tr14rmp: ds.l 1 | Save area for tr14sav for ROMP 61 62 62 .end
Note:
See TracChangeset
for help on using the changeset viewer.