home *** CD-ROM | disk | FTP | other *** search
- |
- | TOS traps for GCC 16 bit lib
- | WARNING: these defns are non-reentrant
- | but then so is TOS (well almost)
- | jrb
- |
- #ifdef __MSHORT__
- .globl _gemdos
- .globl _bios
- .globl _xbios
-
- .even
- .lcomm gd2,4 | d2, a2 saved
- .lcomm ga2,4
- .lcomm bd2,4
- .lcomm ba2,4
- .lcomm xd2,4
- .lcomm xa2,4
- .lcomm gsave,4 | ret addr saved
- .lcomm bsave,4
- .lcomm xsave,4
-
- .text
- .even
- _gemdos:
- movl d2,gd2 | save d2, a2
- movl a2,ga2
- movl sp@+,gsave | save ret addr
- trap #1 | call GEMDOS
- movl gd2,d2 | restore d2, a2
- movl ga2,a2
- movl gsave,sp@- | restore ret addr
- rts
-
- .even
- _bios:
- movl d2,bd2 | save d2, a2
- movl a2,ba2
- movl sp@+,bsave | save ret addr
- trap #13 | call BIOS
- movl bd2,d2 | restore d2, a2
- movl ba2,a2
- movl bsave,sp@- | restore ret addr
- rts
-
- .even
- _xbios:
- movl d2,xd2 | save d2, a2
- movl a2,xa2
- movl sp@+,xsave | save ret addr
- trap #14 | call XBIOS
- movl xd2,d2 | restore d2, a2
- movl xa2,a2
- movl xsave,sp@- | restore ret addr
- rts
-
- #endif /* __MSHORT__ */
-