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$ # $Header$
install: MACH=m68k2
../../install tail_mon.a tail_mon 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 : opr :
make pr | opr make pr | opr
pr: pr:
@ar pv tail_mon.a @ar pv tail_mon.a

View file

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

View file

@ -1,6 +1,10 @@
.define _access .define _access
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _access .extern _access
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,10 @@
.define _chmod .define _chmod
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _chmod .extern _chmod
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

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

View file

@ -1,6 +1,10 @@
.define _creat .define _creat
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _creat .extern _creat
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,10 @@
.define _link .define _link
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _link .extern _link
.text .sect .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.w 8(sp),d1

View file

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

View file

@ -1,6 +1,10 @@
.define _mknod .define _mknod
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _mknod .extern _mknod
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

@ -1,6 +1,10 @@
.define _open .define _open
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _open .extern _open
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,10 @@
.define _stat .define _stat
.sect .text
.sect .rom
.sect .data
.sect .bss
.extern _stat .extern _stat
.text .sect .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.w 8(sp),d1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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