Adapted to use of the new assembler & linker

This commit is contained in:
keie 1985-06-04 11:18:09 +00:00
parent a9bbf81f93
commit 0370ea6d61
45 changed files with 242 additions and 95 deletions

View file

@ -1,11 +1,21 @@
# $Header$
install:
../../install tail_mon.a tail_mon
MACH=m68k2
all: tail_mon
install: all
../../install tail_mon
clean :
cmp: all
-../../compare tail_mon
tail_mon:
ASAR=aal ; export ASAR ;\
march . tail_mon
clean:
rm -f *.o
opr :
make pr | opr
make pr | opr
pr:
@ar pv tail_mon.a
@ar pv tail_mon.a

View file

@ -1,6 +1,10 @@
.define __exit
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern __exit
.text
.sect .text
__exit: move.w #0x1,d0
move.w 4(sp),a0
trap #0

View file

@ -1,6 +1,10 @@
.define _access
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _access
.text
.sect .text
_access: move.w #0x21,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _alarm
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _alarm
.text
.sect .text
_alarm: clr.l d0
move.w 4(sp),d0
move.l d0,a0

View file

@ -1,8 +1,12 @@
.define _brk
.define _sbrk
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _brk
.extern _sbrk
.text
.sect .text
_sbrk: move.l nd,a0
add.w 4(sp),a0
move.w #0x11,d0
@ -21,6 +25,6 @@ _brk: move.w #0x11,d0
move.l 4(sp),nd
clr.l d0
rts
.data
nd: .long endbss
.text
.sect .data
nd: .data4 endbss
.sect .text

View file

@ -3,12 +3,16 @@
.define calle
.define cerror
.define _errno
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern call
.extern callc
.extern calle
.extern cerror
.extern _errno
.text
.sect .text
call: trap #0
bcs cerror
rts
@ -23,6 +27,6 @@ cerror:
move.w d0,_errno
move.l #-1,d0
rts
.bss
.sect .bss
_errno: .space 4
.text
.sect .text

View file

@ -1,6 +1,10 @@
.define _chdir
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _chdir
.text
.sect .text
_chdir: move.w #0xC,d0
move.l 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define _chmod
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _chmod
.text
.sect .text
_chmod: move.w #0xF,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _chroot
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _chroot
.text
.sect .text
_chroot: move.w #0x3D,d0
move.l 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define __cleanup
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern __cleanup
.text
.sect .text
__cleanup:
tst.b -40(sp)
link a6,#-0

View file

@ -1,6 +1,10 @@
.define _close
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _close
.text
.sect .text
_close: move.w #0x6,d0
move.w 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define _creat
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _creat
.text
.sect .text
_creat: move.w #0x8,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,4 +1,8 @@
.define _execl
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _execl
_execl: link a6,#0
tst.b -132(sp)

View file

@ -1,6 +1,10 @@
.define _execve
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _execve
.text
.sect .text
_execve: move.w #0x3B,d0
move.l 4(sp),a0
move.l 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _exit
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _exit
.text
.sect .text
_exit:
tst.b -40(sp)
link a6,#-0

View file

@ -1,6 +1,10 @@
.define _fork
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _fork
.text
.sect .text
_fork: move.w #0x2,d0
trap #0
bra 1f

View file

@ -1,4 +1,8 @@
.define _fstat
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _fstat
_fstat: move.w #0x1C,d0
move.w 4(sp),a0

View file

@ -1,6 +1,10 @@
.define _getegid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _getegid
.text
.sect .text
_getegid: move.w #0x2F,d0
trap #0
move.l d1,d0

View file

@ -1,6 +1,10 @@
.define _getgid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _getgid
.text
.sect .text
_getgid: move.w #0x2F,d0
trap #0
rts

View file

@ -1,6 +1,10 @@
.define _getpid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _getpid
.text
.sect .text
_getpid: move.w #0x14,d0
trap #0
rts

View file

@ -1,6 +1,10 @@
.define _getuid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _getuid
.text
.sect .text
_getuid: move.w #0x18,d0
trap #0
rts

View file

@ -1,6 +1,10 @@
.define _gtty
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _gtty
.text
.sect .text
_gtty:
tst.b -40(sp)
link a6,#-0

View file

@ -1,6 +1,10 @@
.define _ioctl
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _ioctl
.text
.sect .text
_ioctl: move.w #0x36,d0
move.w 4(sp),a0
move.w 6(sp),d1

View file

@ -1,6 +1,10 @@
.define _kill
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _kill
.text
.sect .text
_kill: move.w #0x25,d0
move.w 4(sp),a0
move.w 6(sp),d1

View file

@ -1,6 +1,10 @@
.define _link
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _link
.text
.sect .text
_link: move.w #0x9,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _lseek
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _lseek
.text
.sect .text
_lseek: move.w #0x13,d0
move.w 4(sp),a0
move.l 6(sp),d1

View file

@ -1,6 +1,10 @@
.define _mknod
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _mknod
.text
.sect .text
_mknod: move.w #0xE,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,7 +1,11 @@
.define _mount
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _mount
.text
.sect .text
_mount: move.w #0x15,d0
move.l 4(sp),a0
move.l 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _nice
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _nice
.text
.sect .text
_nice: move.w #0x22,d0
move.w 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define _open
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _open
.text
.sect .text
_open: move.w #0x5,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _pause
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _pause
.text
.sect .text
_pause: move.w #0x1D,d0
trap #0
rts

View file

@ -1,6 +1,10 @@
.define _read
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _read
.text
.sect .text
_read: move.w #0x3,d0
move.w 4(sp),a0
move.l 6(sp),d1

View file

@ -1,6 +1,10 @@
.define _setgid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _setgid
.text
.sect .text
_setgid: move.w #0x2E,d0
move.w 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define _setuid
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _setuid
.text
.sect .text
_setuid: move.w #0x17,d0
move.w 4(sp),a0
jmp callc

View file

@ -1,10 +1,13 @@
.define _signal
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _signal
NSIG=32
_signal:
move.w 4(sp), d0
ext.l d0
ext.l d0
cmp.l #NSIG,d0
bcc 1f
move.l 6(sp),d1
@ -17,9 +20,7 @@ _signal:
beq 2f
btst #0,d1
bne 2f
move.l #jmptab,d1
add.l d0,d1
add.l d0,d1
move.l #enter,d1
2:
move.l d0,a0
move.w #0x30,d0
@ -29,52 +30,16 @@ _signal:
bne 4f
move.l a1,d0
4:
clr.l d1
rts
1:
move.l #22,d0
3:
jmp cerror
jmptab: bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
bsr enter
enter:
movem.l d0/d1/a0/a1,-(sp)
move.l 16(sp),d0
sub.l #jmptab+2,d0
asr.l #1,d0
move.l d0,-(sp)
move.l d0,a0
move.l 16(sp),a0
move.l a0,-(sp)
add.l a0,a0
add.l a0,a0
add.l #dvect,a0
@ -84,5 +49,5 @@ enter:
movem.l (sp)+,d0/d1/a0/a1
add.l #4,sp
rtr
.bss
.sect .bss
dvect: .space 4*NSIG

View file

@ -1,6 +1,10 @@
.define _stat
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _stat
.text
.sect .text
_stat: move.w #0x12,d0
move.l 4(sp),a0
move.w 8(sp),d1

View file

@ -1,6 +1,10 @@
.define _stime
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _stime
.text
.sect .text
_stime: move.w #0x19,d0
move.l 4(sp),a0
move.l (a0),a0

View file

@ -1,6 +1,10 @@
.define _stty
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _stty
.text
.sect .text
_stty:
tst.b -40(sp)
link a6,#-0

View file

@ -1,6 +1,10 @@
.define _sync
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _sync
.text
.sect .text
_sync: move.w #0x24,d0
trap #0
rts

View file

@ -1,6 +1,10 @@
.define _time
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _time
.text
.sect .text
_time: move.w #0xD,d0
trap #0
tst.l 4(sp)

View file

@ -1,6 +1,10 @@
.define _times
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _times
.text
.sect .text
_times: move.w #0x2B,d0
move.l 4(sp),a0
trap #0

View file

@ -1,6 +1,10 @@
.define _umount
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _umount
.text
.sect .text
_umount: move.w #0x16,d0
move.l 4(sp),a0
jmp callc

View file

@ -1,6 +1,10 @@
.define _unlink
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _unlink
.text
.sect .text
_unlink: move.w #0xA,d0
move.l 4(sp),a0
jmp callc

View file

@ -1,4 +1,8 @@
.define _wait
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _wait
_wait: move.w #0x7,d0
move.l 4(sp),a0

View file

@ -1,6 +1,10 @@
.define _write
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _write
.text
.sect .text
_write: move.w #0x4,d0
move.w 4(sp),a0
move.l 6(sp),d1