Adapted to 4-4.
This commit is contained in:
parent
7a790e48fb
commit
bf3ba84e92
27 changed files with 52 additions and 65 deletions
|
@ -2,5 +2,5 @@
|
||||||
.extern __exit
|
.extern __exit
|
||||||
.text
|
.text
|
||||||
__exit: move.w #0x1,d0
|
__exit: move.w #0x1,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
trap #0
|
trap #0
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_access: move.w #0x21,d0
|
_access: move.w #0x21,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
.extern _alarm
|
.extern _alarm
|
||||||
.text
|
.text
|
||||||
_alarm: clr.l d0
|
_alarm: clr.l d0
|
||||||
move.w 4(sp),d0
|
move.l 4(sp),a0
|
||||||
move.l d0,a0
|
|
||||||
move.w #0x1B,d0
|
move.w #0x1B,d0
|
||||||
trap #0
|
trap #0
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -3,24 +3,21 @@
|
||||||
.extern _brk
|
.extern _brk
|
||||||
.extern _sbrk
|
.extern _sbrk
|
||||||
.text
|
.text
|
||||||
_sbrk: move.l nd,a0
|
_sbrk: move.l .reghp,a0
|
||||||
add.w 4(sp),a0
|
add.l 4(sp),a0
|
||||||
move.w #0x11,d0
|
move.w #0x11,d0
|
||||||
trap #0
|
trap #0
|
||||||
bcs lcerror
|
bcs lcerror
|
||||||
move.l nd,d0
|
move.l .reghp,d0
|
||||||
move.l d0,a0
|
move.l d0,a0
|
||||||
add.w 4(sp),a0
|
add.l 4(sp),a0
|
||||||
move.l a0,nd
|
move.l a0,.reghp
|
||||||
rts
|
rts
|
||||||
lcerror: jmp cerror
|
lcerror: jmp cerror
|
||||||
_brk: move.w #0x11,d0
|
_brk: move.w #0x11,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
trap #0
|
trap #0
|
||||||
bcs lcerror
|
bcs lcerror
|
||||||
move.l 4(sp),nd
|
move.l 4(sp),.reghp
|
||||||
clr.l d0
|
clr.l d0
|
||||||
rts
|
rts
|
||||||
.data
|
|
||||||
nd: .long endbss
|
|
||||||
.text
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ callc:
|
||||||
calle:
|
calle:
|
||||||
trap #0
|
trap #0
|
||||||
cerror:
|
cerror:
|
||||||
move.w d0,_errno
|
move.l d0,_errno
|
||||||
move.l #-1,d0
|
move.l #-1,d0
|
||||||
rts
|
rts
|
||||||
.bss
|
.bss
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_chmod: move.w #0xF,d0
|
_chmod: move.w #0xF,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
.extern _close
|
.extern _close
|
||||||
.text
|
.text
|
||||||
_close: move.w #0x6,d0
|
_close: move.w #0x6,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_creat: move.w #0x8,d0
|
_creat: move.w #0x8,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp call
|
jmp call
|
||||||
|
|
|
@ -5,8 +5,8 @@ _exit:
|
||||||
tst.b -40(sp)
|
tst.b -40(sp)
|
||||||
link a6,#-0
|
link a6,#-0
|
||||||
jsr __cleanup
|
jsr __cleanup
|
||||||
move.w 8(a6),-(sp)
|
move.l 8(a6),-(sp)
|
||||||
jsr __exit
|
jsr __exit
|
||||||
add.l #2,sp
|
add.l #4,sp
|
||||||
unlk a6
|
unlk a6
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.define _fstat
|
.define _fstat
|
||||||
.extern _fstat
|
.extern _fstat
|
||||||
_fstat: move.w #0x1C,d0
|
_fstat: move.w #0x1C,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.l 6(sp),d1
|
move.l 8(sp),d1
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
_gtty:
|
_gtty:
|
||||||
tst.b -40(sp)
|
tst.b -40(sp)
|
||||||
link a6,#-0
|
link a6,#-0
|
||||||
move.l 10(a6),-(sp)
|
move.l 12(a6),-(sp)
|
||||||
move.w #29704,-(sp)
|
move.l #29704,-(sp)
|
||||||
move.w 8(a6),-(sp)
|
move.l 8(a6),-(sp)
|
||||||
jsr _ioctl
|
jsr _ioctl
|
||||||
add.l #8,sp
|
add.l #12,sp
|
||||||
unlk a6
|
unlk a6
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
.extern _ioctl
|
.extern _ioctl
|
||||||
.text
|
.text
|
||||||
_ioctl: move.w #0x36,d0
|
_ioctl: move.w #0x36,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 6(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
move.l 12(sp),a1
|
||||||
move.l 8(sp),a1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
.extern _kill
|
.extern _kill
|
||||||
.text
|
.text
|
||||||
_kill: move.w #0x25,d0
|
_kill: move.w #0x25,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 6(sp),d1
|
move.l 6(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_link: move.w #0x9,d0
|
_link: move.w #0x9,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.extern _lseek
|
.extern _lseek
|
||||||
.text
|
.text
|
||||||
_lseek: move.w #0x13,d0
|
_lseek: move.w #0x13,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.l 6(sp),d1
|
move.l 8(sp),d1
|
||||||
move.w 10(sp),a1
|
move.l 12(sp),a1
|
||||||
jmp call
|
jmp call
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
.text
|
.text
|
||||||
_mknod: move.w #0xE,d0
|
_mknod: move.w #0xE,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
move.l 12(sp),a1
|
||||||
move.w 10(sp),a1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
.extern _nice
|
.extern _nice
|
||||||
.text
|
.text
|
||||||
_nice: move.w #0x22,d0
|
_nice: move.w #0x22,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_open: move.w #0x5,d0
|
_open: move.w #0x5,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp call
|
jmp call
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.extern _read
|
.extern _read
|
||||||
.text
|
.text
|
||||||
_read: move.w #0x3,d0
|
_read: move.w #0x3,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.l 6(sp),d1
|
move.l 8(sp),d1
|
||||||
move.w 10(sp),a1
|
move.l 12(sp),a1
|
||||||
jmp call
|
jmp call
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
.extern _setgid
|
.extern _setgid
|
||||||
.text
|
.text
|
||||||
_setgid: move.w #0x2E,d0
|
_setgid: move.w #0x2E,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
.extern _setuid
|
.extern _setuid
|
||||||
.text
|
.text
|
||||||
_setuid: move.w #0x17,d0
|
_setuid: move.w #0x17,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -2,11 +2,10 @@
|
||||||
.extern _signal
|
.extern _signal
|
||||||
NSIG=32
|
NSIG=32
|
||||||
_signal:
|
_signal:
|
||||||
move.w 4(sp), d0
|
move.l 4(sp), d0
|
||||||
ext.l d0
|
|
||||||
cmp.l #NSIG,d0
|
cmp.l #NSIG,d0
|
||||||
bcc 1f
|
bcc 1f
|
||||||
move.l 6(sp),d1
|
move.l 8(sp),d1
|
||||||
move.l d0,a0
|
move.l d0,a0
|
||||||
add.l a0,a0
|
add.l a0,a0
|
||||||
add.l a0,a0
|
add.l a0,a0
|
||||||
|
@ -26,6 +25,7 @@ _signal:
|
||||||
bne 4f
|
bne 4f
|
||||||
move.l a1,d0
|
move.l a1,d0
|
||||||
4:
|
4:
|
||||||
|
clr.l d1
|
||||||
rts
|
rts
|
||||||
1:
|
1:
|
||||||
move.l #22,d0
|
move.l #22,d0
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
.text
|
.text
|
||||||
_stat: move.w #0x12,d0
|
_stat: move.w #0x12,d0
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w 8(sp),d1
|
move.l 8(sp),d1
|
||||||
ext.l d1
|
|
||||||
jmp callc
|
jmp callc
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
_stty:
|
_stty:
|
||||||
tst.b -40(sp)
|
tst.b -40(sp)
|
||||||
link a6,#-0
|
link a6,#-0
|
||||||
move.l 10(a6),-(sp)
|
move.l 12(a6),-(sp)
|
||||||
move.w #29705,-(sp)
|
move.l #29705,-(sp)
|
||||||
move.w 8(a6),-(sp)
|
move.l 8(a6),-(sp)
|
||||||
jsr _ioctl
|
jsr _ioctl
|
||||||
add.l #8,sp
|
add.l #12,sp
|
||||||
unlk a6
|
unlk a6
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
.extern _times
|
.extern _times
|
||||||
.text
|
.text
|
||||||
_times: move.w #0x2B,d0
|
_times: move.w #0x2B,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
trap #0
|
trap #0
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -7,6 +7,6 @@ _wait: move.w #0x7,d0
|
||||||
tst.l 4(sp)
|
tst.l 4(sp)
|
||||||
beq 1f
|
beq 1f
|
||||||
move.l 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.w d1,(a0)
|
move.l d1,(a0)
|
||||||
1:
|
1:
|
||||||
rts
|
rts
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.extern _write
|
.extern _write
|
||||||
.text
|
.text
|
||||||
_write: move.w #0x4,d0
|
_write: move.w #0x4,d0
|
||||||
move.w 4(sp),a0
|
move.l 4(sp),a0
|
||||||
move.l 6(sp),d1
|
move.l 8(sp),d1
|
||||||
move.w 10(sp),a1
|
move.l 12(sp),a1
|
||||||
jmp call
|
jmp call
|
||||||
|
|
Loading…
Add table
Reference in a new issue