home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari FTP
/
ATARI_FTP_0693.zip
/
ATARI_FTP_0693
/
Mint
/
mntlib32.zoo
/
lattice
/
osbind.s
< prev
next >
Wrap
Text File
|
1992-06-15
|
10KB
|
559 lines
;
; new osbind.c definitions for the MiNT library. With these ones,we
; are now compatible with the rest of the atari world when using 16 bit
; integers,and the 32 bit code stuff should be portable,at least
; (albeit slower than the old osbind.c)
;
ifd __MSHORT__
xdef _gemdos
xdef _xbios
xdef _bios
text
even
_gemdos:
lea 20(sp),a0 ; 4 bytes for ret addr + 16 for parameters
movem.l d2/a2,-(sp) ; save reggies that TOS clobbers but that
; gcc thinks functions should preserve
move.l -(a0),-(sp) ; max. of 16 bytes parameters to trap #1
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
trap #1 ; go do the trap
add.l #16,sp ; pop parameters
movem.l (sp)+,d2/a2 ; restore reggies
rts ; return
_bios:
lea 24(sp),a0 ; 4 bytes ret. addr. + 20 bytes parameters
movem.l d2/a2,-(sp)
move.l -(a0),-(sp) ; copy 20 bytes of trap #13 parameters
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
trap #13 ; go do the trap
add.l #20,sp
movem.l (sp)+,d2/a2
rts
_xbios:
lea 32(sp),a0 ; 28 bytes of parameters
movem.l d2/a2,-(sp)
move.l -(a0),-(sp) ; copy 28 bytes
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
move.l -(a0),-(sp)
trap #14 ; go do the trap
add.l #28,sp
movem.l (sp)+,d2/a2
rts
else /* !__MSHORT__ */
text
even
xdef _trap_1_w
_trap_1_w:
movem.l d2/a2,-(sp)
move.l 12(sp),d0
move.w d0,-(sp)
trap #1
addq.l #2,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_ww
_trap_1_ww:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
addq.l #4,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wl
_trap_1_wl:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.l d1,-(sp)
move.w d0,-(sp)
trap #1
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wlw
_trap_1_wlw:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #8,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wwl
_trap_1_wwl:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #8,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_www
_trap_1_www:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wll
_trap_1_wll:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #10,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wwll
_trap_1_wwll:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a1,-(sp)
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #12,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wlww
_trap_1_wlww:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a1,-(sp)
move.w a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #10,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wwlw
_trap_1_wwlw:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a1,-(sp)
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #10,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_1_wwlll
_trap_1_wwlll:
movem.l d2/a2,-(sp)
move.l 28(sp),a1
move.l 24(sp),a0
move.l 20(sp),d1
move.l a1,-(sp)
move.l a0,-(sp)
move.l d1,-(sp)
move.l 16+12(sp),d1
move.l 12+12(sp),d0
move.w d1,-(sp)
move.w d0,-(sp)
trap #1
add.l #16,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_w
_trap_13_w:
movem.l d2/a2,-(sp)
move.l 12(sp),d0
move.w d0,-(sp)
trap #13
addq.l #2,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_ww
_trap_13_ww:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.w d1,-(sp)
move.w d0,-(sp)
trap #13
addq.l #4,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_wl
_trap_13_wl:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.l d1,-(sp)
move.w d0,-(sp)
trap #13
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_www
_trap_13_www:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #13
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_wwl
_trap_13_wwl:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #13
add.l #8,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_13_wwlwww
_trap_13_wwlwww:
movem.l d2/a2,-(sp)
move.l 32(sp),a0
move.l 28(sp),d1
move.l 24(sp),d0
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
move.l 20+6(sp),a0
move.l 16+6(sp),d1
move.l 12+6(sp),d0
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #13
add.l #14,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_w
_trap_14_w:
movem.l d2/a2,-(sp)
move.l 12(sp),d0
move.w d0,-(sp)
trap #14
addq.l #2,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_ww
_trap_14_ww:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
addq.l #4,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wl
_trap_14_wl:
movem.l d2/a2,-(sp)
move.l 16(sp),d1
move.l 12(sp),d0
move.l d1,-(sp)
move.w d0,-(sp)
trap #14
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_www
_trap_14_www:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
addq.l #6,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wwl
_trap_14_wwl:
movem.l d2/a2,-(sp)
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #8,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wwll
_trap_14_wwll:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a1,-(sp)
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #12,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wllw
_trap_14_wllw:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.w a1,-(sp)
move.l a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #12,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wlll
_trap_14_wlll:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a1,-(sp)
move.l a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #14,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wwwl
_trap_14_wwwl:
movem.l d2/a2,-(sp)
move.l 24(sp),a1
move.l 20(sp),a0
move.l 16(sp),d1
move.l 12(sp),d0
move.l a1,-(sp)
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #10,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wwwwl
_trap_14_wwwwl:
movem.l d2/a2,-(sp)
move.l 28(sp),d0
move.l d0,-(sp)
move.l 24+4(sp),a1
move.l 20+4(sp),a0
move.l 16+4(sp),d1
move.l 12+4(sp),d0
move.w a1,-(sp)
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #12,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wllww
_trap_14_wllww:
movem.l d2/a2,-(sp)
move.l 28(sp),d1
move.l 24(sp),d0
move.w d1,-(sp)
move.w d0,-(sp)
move.l 20+4(sp),a0
move.l 16+4(sp),d1
move.l 12+4(sp),d0
move.l a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #14,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wwwwwww
_trap_14_wwwwwww:
movem.l d2/a2,-(sp)
move.l 36(sp),a1
move.l 32(sp),a0
move.l 28(sp),d1
move.l 24(sp),d0
move.w a1,-(sp)
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
move.l 20+8(sp),a0
move.l 16+8(sp),d1
move.l 12+8(sp),d0
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #14,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wllwwwww
_trap_14_wllwwwww:
movem.l d2/a2,-(sp)
move.l 40(sp),a1
move.l 36(sp),a0
move.l 32(sp),d1
move.l 28(sp),d0
move.w a1,-(sp)
move.w a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
move.l 24+8(sp),a1
move.l 20+8(sp),a0
move.l 16+8(sp),d1
move.l 12+8(sp),d0
move.w a1,-(sp)
move.l a0,-(sp)
move.l d1,-(sp)
move.w d0,-(sp)
trap #14
add.l #20,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wllwwwwlw
_trap_14_wllwwwwlw:
movem.l d2/a2,-(sp)
move.l 44(sp),a1
move.l 40(sp),a0
move.l 36(sp),d1
move.l 32(sp),d0
move.w a1,-(sp)
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
move.l 28+10(sp),a1
move.l 24+10(sp),a0
move.l 20+10(sp),d1
move.l 16+10(sp),d0
move.l 12+10(sp),d2
move.w a1,-(sp)
move.w a0,-(sp)
move.l d1,-(sp)
move.l d0,-(sp)
move.w d2,-(sp)
trap #14
add.l #24,sp
movem.l (sp)+,d2/a2
rts
xdef _trap_14_wllwwwwwlw
_trap_14_wllwwwwwlw:
movem.l d2/a2,-(sp)
move.l 48(sp),a1
move.l 44(sp),a0
move.l 40(sp),d1
move.l 36(sp),d0
move.w a1,-(sp)
move.l a0,-(sp)
move.w d1,-(sp)
move.w d0,-(sp)
move.l 32+10(sp),a1
move.l 28+10(sp),a0
move.l 24+10(sp),d1
move.l 20+10(sp),d0
move.l 8+10(sp),d2
move.l 4+10(sp),a2
move.w a1,-(sp)
move.w a0,-(sp)
move.w d1,-(sp)
move.l d0,-(sp)
move.l d2,-(sp)
move.w a2,-(sp)
trap #14
add.l #26,sp
movem.l (sp)+,d2/a2
rts
endc
end