Adapted to 4-4.

This commit is contained in:
keie 1985-03-04 17:26:31 +00:00
parent 7a790e48fb
commit bf3ba84e92
27 changed files with 52 additions and 65 deletions

View file

@ -2,5 +2,5 @@
.extern __exit
.text
__exit: move.w #0x1,d0
move.w 4(sp),a0
move.l 4(sp),a0
trap #0

View file

@ -3,6 +3,5 @@
.text
_access: move.w #0x21,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp callc

View file

@ -2,8 +2,7 @@
.extern _alarm
.text
_alarm: clr.l d0
move.w 4(sp),d0
move.l d0,a0
move.l 4(sp),a0
move.w #0x1B,d0
trap #0
rts

View file

@ -3,24 +3,21 @@
.extern _brk
.extern _sbrk
.text
_sbrk: move.l nd,a0
add.w 4(sp),a0
_sbrk: move.l .reghp,a0
add.l 4(sp),a0
move.w #0x11,d0
trap #0
bcs lcerror
move.l nd,d0
move.l .reghp,d0
move.l d0,a0
add.w 4(sp),a0
move.l a0,nd
add.l 4(sp),a0
move.l a0,.reghp
rts
lcerror: jmp cerror
_brk: move.w #0x11,d0
move.l 4(sp),a0
trap #0
bcs lcerror
move.l 4(sp),nd
move.l 4(sp),.reghp
clr.l d0
rts
.data
nd: .long endbss
.text

View file

@ -20,7 +20,7 @@ callc:
calle:
trap #0
cerror:
move.w d0,_errno
move.l d0,_errno
move.l #-1,d0
rts
.bss

View file

@ -3,6 +3,5 @@
.text
_chmod: move.w #0xF,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp callc

View file

@ -2,5 +2,5 @@
.extern _close
.text
_close: move.w #0x6,d0
move.w 4(sp),a0
move.l 4(sp),a0
jmp callc

View file

@ -3,6 +3,5 @@
.text
_creat: move.w #0x8,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp call

View file

@ -5,8 +5,8 @@ _exit:
tst.b -40(sp)
link a6,#-0
jsr __cleanup
move.w 8(a6),-(sp)
move.l 8(a6),-(sp)
jsr __exit
add.l #2,sp
add.l #4,sp
unlk a6
rts

View file

@ -1,6 +1,6 @@
.define _fstat
.extern _fstat
_fstat: move.w #0x1C,d0
move.w 4(sp),a0
move.l 6(sp),d1
move.l 4(sp),a0
move.l 8(sp),d1
jmp callc

View file

@ -4,10 +4,10 @@
_gtty:
tst.b -40(sp)
link a6,#-0
move.l 10(a6),-(sp)
move.w #29704,-(sp)
move.w 8(a6),-(sp)
move.l 12(a6),-(sp)
move.l #29704,-(sp)
move.l 8(a6),-(sp)
jsr _ioctl
add.l #8,sp
add.l #12,sp
unlk a6
rts

View file

@ -2,8 +2,7 @@
.extern _ioctl
.text
_ioctl: move.w #0x36,d0
move.w 4(sp),a0
move.w 6(sp),d1
ext.l d1
move.l 8(sp),a1
move.l 4(sp),a0
move.l 8(sp),d1
move.l 12(sp),a1
jmp callc

View file

@ -2,7 +2,6 @@
.extern _kill
.text
_kill: move.w #0x25,d0
move.w 4(sp),a0
move.w 6(sp),d1
ext.l d1
move.l 4(sp),a0
move.l 6(sp),d1
jmp callc

View file

@ -3,6 +3,5 @@
.text
_link: move.w #0x9,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp callc

View file

@ -2,7 +2,7 @@
.extern _lseek
.text
_lseek: move.w #0x13,d0
move.w 4(sp),a0
move.l 6(sp),d1
move.w 10(sp),a1
move.l 4(sp),a0
move.l 8(sp),d1
move.l 12(sp),a1
jmp call

View file

@ -3,7 +3,6 @@
.text
_mknod: move.w #0xE,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.w 10(sp),a1
move.l 8(sp),d1
move.l 12(sp),a1
jmp callc

View file

@ -2,5 +2,5 @@
.extern _nice
.text
_nice: move.w #0x22,d0
move.w 4(sp),a0
move.l 4(sp),a0
jmp callc

View file

@ -3,6 +3,5 @@
.text
_open: move.w #0x5,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp call

View file

@ -2,7 +2,7 @@
.extern _read
.text
_read: move.w #0x3,d0
move.w 4(sp),a0
move.l 6(sp),d1
move.w 10(sp),a1
move.l 4(sp),a0
move.l 8(sp),d1
move.l 12(sp),a1
jmp call

View file

@ -2,5 +2,5 @@
.extern _setgid
.text
_setgid: move.w #0x2E,d0
move.w 4(sp),a0
move.l 4(sp),a0
jmp callc

View file

@ -2,5 +2,5 @@
.extern _setuid
.text
_setuid: move.w #0x17,d0
move.w 4(sp),a0
move.l 4(sp),a0
jmp callc

View file

@ -2,11 +2,10 @@
.extern _signal
NSIG=32
_signal:
move.w 4(sp), d0
ext.l d0
move.l 4(sp), d0
cmp.l #NSIG,d0
bcc 1f
move.l 6(sp),d1
move.l 8(sp),d1
move.l d0,a0
add.l a0,a0
add.l a0,a0
@ -26,6 +25,7 @@ _signal:
bne 4f
move.l a1,d0
4:
clr.l d1
rts
1:
move.l #22,d0

View file

@ -3,6 +3,5 @@
.text
_stat: move.w #0x12,d0
move.l 4(sp),a0
move.w 8(sp),d1
ext.l d1
move.l 8(sp),d1
jmp callc

View file

@ -4,10 +4,10 @@
_stty:
tst.b -40(sp)
link a6,#-0
move.l 10(a6),-(sp)
move.w #29705,-(sp)
move.w 8(a6),-(sp)
move.l 12(a6),-(sp)
move.l #29705,-(sp)
move.l 8(a6),-(sp)
jsr _ioctl
add.l #8,sp
add.l #12,sp
unlk a6
rts

View file

@ -2,6 +2,6 @@
.extern _times
.text
_times: move.w #0x2B,d0
move.w 4(sp),a0
move.l 4(sp),a0
trap #0
rts

View file

@ -7,6 +7,6 @@ _wait: move.w #0x7,d0
tst.l 4(sp)
beq 1f
move.l 4(sp),a0
move.w d1,(a0)
move.l d1,(a0)
1:
rts

View file

@ -2,7 +2,7 @@
.extern _write
.text
_write: move.w #0x4,d0
move.w 4(sp),a0
move.l 6(sp),d1
move.w 10(sp),a1
move.l 4(sp),a0
move.l 8(sp),d1
move.l 12(sp),a1
jmp call