adapted to new assembler syntax

This commit is contained in:
ceriel 1987-01-26 21:22:23 +00:00
parent 0991948d3e
commit 2c2688a680
53 changed files with 356 additions and 89 deletions

View file

@ -1,4 +1,4 @@
tail_mon
libmon_s.a
access.s
acct.s
alarm.s

View file

@ -1,17 +1,29 @@
# $Header$
install:
../../install head_em.s head_em
../../install tail_mon tail_mon
MACH=pmds4
all: libmon_o.a head_em
cmp:
-../../compare head_em.s head_em
-../../compare tail_mon tail_mon
install: all
../../install head_em.o head_em
../../install libmon_o.a tail_mon
clean :
cmp: all
-../../compare head_em.o head_em
-../../compare libmon_o.a tail_mon
libmon_o.a: libmon_s.a
ASAR=aal ; export ASAR ;\
march . libmon_o.a
head_em.o: head_em.s
$(MACH) -I../../../h -c head_em.s
clean:
rm -f *.o
opr :
make pr | opr
make pr | opr
pr:
pr -h `pwd`/head_em.s head_em.s
@arch pv tail_mon | pr -h `pwd`/tail_mon
@pr `pwd`/head_em.s
@arch pv libmon_s.a | pr -h `pwd`/libmon_s.a

View file

@ -1,7 +1,12 @@
.define _access
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _access
_access: trap #0
.short 0x21
.data2 0x21
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _acct
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _acct
_acct: trap #0
.short 0x33
.data2 0x33
bcc 1f
jmp cerror
1:

View file

@ -1,6 +1,11 @@
.define _alarm
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _alarm
.text
.sect .text
_alarm: trap #0
.short 0x1B
.data2 0x1B
rts

View file

@ -1,9 +1,14 @@
.define cerror
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern cerror
cerror: move.l d0,_errno
move.l #-1,d0
rts
.bss
.sect .bss
_errno:
.space 4
.text
.sect .text

View file

@ -1,7 +1,12 @@
.define _chdir
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chdir
_chdir: trap #0
.short 0xC
.data2 0xC
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _chmod
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chmod
_chmod: trap #0
.short 0xF
.data2 0xF
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _chown
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chown
.text
.sect .text
_chown: trap #0
.short 0x10
.data2 0x10
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _chroot
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chroot
_chroot: trap #0
.short 0x3D
.data2 0x3D
bcc 1f
jmp cerror
1:

View file

@ -1,5 +1,10 @@
.define __cleanup
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern __cleanup
.text
.sect .text
__cleanup:
rts

View file

@ -1,7 +1,12 @@
.define _close
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _close
_close: trap #0
.short 0x6
.data2 0x6
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _creat
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _creat
_creat: trap #0
.short 0x8
.data2 0x8
bcc 1f
jmp cerror
1:

View file

@ -1,12 +1,17 @@
.define _dup
.define _dup2
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _dup
.text
.sect .text
.extern _dup2
_dup2: or.l #64,4(sp)
_dup: trap #0
.short 0x29
.data2 0x29
bcc 1f
jmp cerror
1:

View file

@ -2,6 +2,11 @@
.define _execve
.define _execv
.define _execle
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _execl
.extern _execve
.extern _execv
@ -17,7 +22,7 @@ pushp:
unlk a6
rts
_execve: trap #0
.short 3B
.data2 3B
jmp cerror
_execv:
tst.b -48(sp)

View file

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

View file

@ -1,4 +1,9 @@
.define __exit
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern __exit
__exit: trap #0
.short 0x1
.data2 0x1

View file

@ -1,7 +1,12 @@
.define _fork
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _fork
_fork: trap #0
.short 0x2
.data2 0x2
bra 1f
bcs 2f
rts

View file

@ -1,7 +1,12 @@
.define _fstat
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _fstat
_fstat: trap #0
.short 0x1C
.data2 0x1C
bcc 1f
jmp cerror
1:

View file

@ -1,12 +1,17 @@
.define _getgid
.define _getegid
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _getgid
.extern _getegid
_getgid: trap #0
.short 0x2F
.data2 0x2F
rts
_getegid: trap #0
.short 0x2F
.data2 0x2F
move.l d1,d0
rts

View file

@ -1,5 +1,10 @@
.define _getpid
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _getpid
_getpid: trap #0
.short 0x14
.data2 0x14
rts

View file

@ -1,12 +1,17 @@
.define _getuid
.define _geteuid
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _getuid
.extern _geteuid
_getuid: trap #0
.short 0x18
.data2 0x18
rts
_geteuid: trap #0
.short 0x18
.data2 0x18
move.l d1,d0
rts

View file

@ -1,12 +1,17 @@
.define CERASE,CKILL,CSTOP,CSTART
.define .lino,.filn
.define F_DUM,EXIT
.define begtext,begdata,begbss
.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE
.define hol0,.reghp,.limhp,.trpim,.trppc
.define LINO_AD,FILN_AD
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
CERASE = 010
@ -27,7 +32,7 @@ EHEAP = 17
EILLINS = 18
ECASE = 20
.text
.sect .text
begtext:
pea endbss
jsr _brk
@ -41,22 +46,22 @@ EXIT:
jsr .trp
.data
.sect .data
begdata:
hol0:
.lino:
.long 0 ! lino
.data4 0 ! lino
.filn:
.long 0 ! filn
.data4 0 ! filn
.reghp:
.long endbss
.data4 endbss
.limhp:
.long endbss
.data4 endbss
.trppc:
.long 0
.data4 0
.trpim:
.long 0 ! was short
.data4 0 ! was short
.bss
.sect .bss
begbss:

View file

@ -1,7 +1,12 @@
.define _ioctl
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _ioctl
_ioctl: trap #0
.short 0x36
.data2 0x36
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _kill
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _kill
_kill: trap #0
.short 0x25
.data2 0x25
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _link
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _link
_link: trap #0
.short 0x9
.data2 0x9
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _lock
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _lock
_lock: trap #0
.short 0x35
.data2 0x35
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _lseek
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _lseek
_lseek: trap #0
.short 0x13
.data2 0x13
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _mknod
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _mknod
.text
.sect .text
_mknod: trap #0
.short 0xE
.data2 0xE
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _mount
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _mount
.text
.sect .text
_mount: trap #0
.short 0x15
.data2 0x15
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _nice
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _nice
.text
.sect .text
_nice: trap #0
.short 0x22
.data2 0x22
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _open
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _open
_open: trap #0
.short 0x5
.data2 0x5
bcc 1f
jmp cerror
1:

View file

@ -1,5 +1,10 @@
.define _pause
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _pause
_pause: trap #0
.short 0x1D
.data2 0x1D
rts

View file

@ -1,7 +1,12 @@
.define _pipe
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _pipe
_pipe: trap #0
.short 0x2A
.data2 0x2A
bcc 1f
jmp cerror
1:

View file

@ -1,6 +1,11 @@
.define _profil
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _profil
.text
.sect .text
_profil: trap #0
.short 0x2C
.data2 0x2C
rts

View file

@ -1,7 +1,12 @@
.define _ptrace
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _ptrace
_ptrace: trap #0
.short 0x1A
.data2 0x1A
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _read
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _read
_read: trap #0
.short 0x3
.data2 0x3
bcc 1f
jmp cerror
1:

View file

@ -1,5 +1,10 @@
.define _sbrk
.define _brk
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _sbrk
.extern _brk
_sbrk: tst.b -8(sp)
@ -9,7 +14,7 @@ _sbrk: tst.b -8(sp)
move.l d0,-(sp)
clr.l -(sp)
trap #0
.short 0x11
.data2 0x11
add.l #8,sp
bcc 1f
jmp cerror
@ -19,7 +24,7 @@ _sbrk: tst.b -8(sp)
add.l d1,.reghp
rts
_brk: trap #0
.short 0x11
.data2 0x11
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _setgid
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _setgid
.text
.sect .text
_setgid: trap #0
.short 0x2E
.data2 0x2E
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _setuid
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _setuid
.text
.sect .text
_setuid: trap #0
.short 0x17
.data2 0x17
bcc 1f
jmp cerror
1:

View file

@ -1,4 +1,9 @@
.define _signal
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _signal
NSIG=32
_signal:
@ -21,7 +26,7 @@ _signal:
move.l d0,-(sp)
clr.l -(sp)
trap #0
.short 48
.data2 48
add.l #12,sp
bcs 3f
btst #0,d0
@ -48,5 +53,5 @@ enter:
movem.l (sp)+,d0/d1/a0/a1
add.l #4,sp
rtr
.bss
.sect .bss
dvect: .space 4*NSIG

View file

@ -1,7 +1,12 @@
.define _stat
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _stat
_stat: trap #0
.short 0x12
.data2 0x12
bcc 1f
jmp cerror
1:

View file

@ -1,8 +1,13 @@
.define _stime
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _stime
.text
.sect .text
_stime: trap #0
.short 0x19
.data2 0x19
bcc 1f
jmp cerror
1:

View file

@ -1,5 +1,10 @@
.define _sync
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _sync
_sync: trap #0
.short 0x24
.data2 0x24
rts

View file

@ -1,5 +1,10 @@
.define _tell
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _tell
_tell:
pea 1

View file

@ -1,9 +1,14 @@
.define _time
.define _ftime
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _time
_time:
trap #0
.short 0xD
.data2 0xD
tst.l 4(sp)
beq 1f
move.l 4(sp),a0
@ -13,7 +18,7 @@ _time:
.extern _ftime
_ftime:
trap #0
.short 0x23
.data2 0x23
bcc 1f
jmp cerror
1:

View file

@ -1,6 +1,11 @@
.define _times
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _times
_times:
trap #0
.short 0x2B
.data2 0x2B
rts

View file

@ -1,6 +1,11 @@
.define _umask
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _umask
.text
.sect .text
_umask: trap #0
.short 0x3C
.data2 0x3C
rts

View file

@ -1,7 +1,12 @@
.define _umount
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _umount
_umount: trap #0
.short 0x16
.data2 0x16
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _unlink
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _unlink
_unlink: trap #0
.short 0xA
.data2 0xA
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _utime
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _utime
_utime: trap #0
.short 0x1E
.data2 0x1E
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _wait
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _wait
_wait: trap #0
.short 0x7
.data2 0x7
bcc 1f
jmp cerror
1:

View file

@ -1,7 +1,12 @@
.define _write
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _write
_write: trap #0
.short 0x4
.data2 0x4
bcc 1f
jmp cerror
1: