new version for assembler producing .o files

This commit is contained in:
ceriel 1987-01-27 20:37:46 +00:00
parent c69f56bd2f
commit c5fe8ce4dc
42 changed files with 302 additions and 90 deletions

View file

@ -1,4 +1,4 @@
tail_mon libmon_s.a
gtty.s gtty.s
stty.s stty.s
chmod.s chmod.s

View file

@ -1,16 +1,29 @@
install: # $Header$
../../install head_em MACH=pmds
../../install tail_mon all: libmon_o.a head_em.o
cmp: install: all
-../../compare head_em ../../install head_em.o head_em
-../../compare tail_mon ../../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 libmon_o.a
opr : opr :
make pr | opr make pr | opr
pr: pr:
@pr `pwd`/head_em @pr `pwd`/head_em.s
@arch pv tail_mon | pr -h `pwd`/tail_mon @arch pv libmon_s.a | pr -h `pwd`/libmon_s.a

View file

@ -1,6 +1,11 @@
.define _access .define _access
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _access .extern _access
.text .sect .text
_access: _access:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -13,7 +18,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Saccess: trap #0 __Saccess: trap #0
.short 0x21 .data2 0x21
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _alarm .define _alarm
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _alarm .extern _alarm
.text .sect .text
_alarm: _alarm:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -11,5 +16,5 @@ add.l #4,sp
unlk a6 unlk a6
rts rts
__Salarm: trap #0 __Salarm: trap #0
.short 0x1B .data2 0x1B
rts rts

View file

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

View file

@ -1,6 +1,11 @@
.define _chmod .define _chmod
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chmod .extern _chmod
.text .sect .text
_chmod: _chmod:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -13,7 +18,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Schmod: trap #0 __Schmod: trap #0
.short 0xF .data2 0xF
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _chown .define _chown
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _chown .extern _chown
.text .sect .text
_chown: _chown:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Schown: trap #0 __Schown: trap #0
.short 0x10 .data2 0x10
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

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

View file

@ -1,6 +1,11 @@
.define _close .define _close
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _close .extern _close
.text .sect .text
_close: _close:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -12,7 +17,7 @@ add.l #4,sp
unlk a6 unlk a6
rts rts
__Sclose: trap #0 __Sclose: trap #0
.short 0x6 .data2 0x6
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

4
mach/pmds/libsys/compmodule Executable file
View file

@ -0,0 +1,4 @@
if pmds -c $1 1>&2
then echo `basename $1 $2`.o
else exit 1
fi

View file

@ -1,6 +1,11 @@
.define _creat .define _creat
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _creat .extern _creat
.text .sect .text
_creat: _creat:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -13,7 +18,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Screat: trap #0 __Screat: trap #0
.short 0x8 .data2 0x8
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,7 +1,12 @@
.define _dup .define _dup
.define _dup2 .define _dup2
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _dup .extern _dup
.text .sect .text
_dup: _dup:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -29,7 +34,7 @@ rts
__Sdup2: or.l #64,4(sp) __Sdup2: or.l #64,4(sp)
__Sdup: trap #0 __Sdup: trap #0
.short 0x29 .data2 0x29
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _execl .define _execl
.define _execve .define _execve
.define _execv .define _execv
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _execl .extern _execl
.extern _execve .extern _execve
.extern _execv .extern _execv
@ -14,7 +19,7 @@ _execl: tst.b -48(sp)
unlk a6 unlk a6
rts rts
_execve: trap #0 _execve: trap #0
.short 59 .data2 59
jmp cerror jmp cerror
_execv: tst.b -48(sp) _execv: tst.b -48(sp)
link a6,#0 link a6,#0

View file

@ -1,6 +1,11 @@
.define _exit .define _exit
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.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,11 @@
.define __exit .define __exit
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern __exit .extern __exit
.text .sect .text
__exit: __exit:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -12,4 +17,4 @@ add.l #4,sp
unlk a6 unlk a6
rts rts
__Sexit: trap #0 __Sexit: trap #0
.short 0x1 .data2 0x1

View file

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

View file

@ -1,6 +1,11 @@
.define _fstat .define _fstat
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _fstat .extern _fstat
.text .sect .text
_fstat: _fstat:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -13,7 +18,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Sfstat: trap #0 __Sfstat: trap #0
.short 0x1C .data2 0x1C
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

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

View file

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

View file

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

View file

@ -1,6 +1,11 @@
.define _gtty .define _gtty
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.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,12 +1,17 @@
.define CERASE,CKILL,CSTOP,CSTART .define CERASE,CKILL,CSTOP,CSTART
.define .lino,.filn .define .lino,.filn
.define F_DUM,EXIT .define F_DUM,EXIT
.define begtext,begdata,begbss .define begtext,begdata,begbss
.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE .define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE
.define hol0,.reghp,.limhp,.trpim,.trppc .define hol0,.reghp,.limhp,.trpim,.trppc
.define LINO_AD,FILN_AD .define LINO_AD,FILN_AD
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
CERASE = 010 CERASE = 010
@ -27,7 +32,7 @@ EHEAP = 17
EILLINS = 18 EILLINS = 18
ECASE = 20 ECASE = 20
.text .sect .text
begtext: begtext:
add.l #2,sp !convert argc from 4-byte to 2-byte add.l #2,sp !convert argc from 4-byte to 2-byte
pea endbss pea endbss
@ -37,22 +42,22 @@ begtext:
add #010,sp add #010,sp
EXIT: EXIT:
.data .sect .data
begdata: begdata:
hol0: hol0:
.lino: .lino:
.short 0,0 ! lino .data2 0,0 ! lino
.filn: .filn:
.long 0 ! filn .data4 0 ! filn
.reghp: .reghp:
.long endbss .data4 endbss
.limhp: .limhp:
.long endbss .data4 endbss
.trppc: .trppc:
.long 0 .data4 0
.trpim: .trpim:
.short 0 .data2 0
.bss .sect .bss
begbss: begbss:

View file

@ -1,6 +1,11 @@
.define _ioctl .define _ioctl
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _ioctl .extern _ioctl
.text .sect .text
_ioctl: _ioctl:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Sioctl: trap #0 __Sioctl: trap #0
.short 0x36 .data2 0x36
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _kill .define _kill
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _kill .extern _kill
.text .sect .text
_kill: _kill:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -15,7 +20,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Skill: trap #0 __Skill: trap #0
.short 0x25 .data2 0x25
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

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

View file

@ -1,6 +1,11 @@
.define _lseek .define _lseek
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _lseek .extern _lseek
.text .sect .text
_lseek: _lseek:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Slseek: trap #0 __Slseek: trap #0
.short 0x13 .data2 0x13
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _mknod .define _mknod
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _mknod .extern _mknod
.text .sect .text
_mknod: _mknod:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Smknod: trap #0 __Smknod: trap #0
.short 0xE .data2 0xE
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _mount .define _mount
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _mount .extern _mount
.text .sect .text
_mount: _mount:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -14,7 +19,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Smount: trap #0 __Smount: trap #0
.short 0x15 .data2 0x15
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _nice .define _nice
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _nice .extern _nice
.text .sect .text
_nice: _nice:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -12,7 +17,7 @@ add.l #4,sp
unlk a6 unlk a6
rts rts
__Snice: trap #0 __Snice: trap #0
.short 0x22 .data2 0x22
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,6 +1,11 @@
.define _open .define _open
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _open .extern _open
.text .sect .text
_open: _open:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -13,7 +18,7 @@ add.l #8,sp
unlk a6 unlk a6
rts rts
__Sopen: trap #0 __Sopen: trap #0
.short 0x5 .data2 0x5
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

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

View file

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

View file

@ -1,6 +1,11 @@
.define _profil .define _profil
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _profil .extern _profil
.text .sect .text
_profil: _profil:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -19,5 +24,5 @@ lea 16(sp),sp
unlk a6 unlk a6
rts rts
__Sprofil: trap #0 __Sprofil: trap #0
.short 0x2C .data2 0x2C
rts rts

View file

@ -1,6 +1,11 @@
.define _read .define _read
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _read .extern _read
.text .sect .text
_read: _read:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Sread: trap #0 __Sread: trap #0
.short 0x3 .data2 0x3
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:

View file

@ -1,7 +1,12 @@
.define _brk .define _brk
.define _sbrk .define _sbrk
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _brk .extern _brk
.text .sect .text
_brk: _brk:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -28,7 +33,7 @@ __Ssbrk: tst.b -8(sp)
move.l d0,-(sp) move.l d0,-(sp)
clr.l -(sp) clr.l -(sp)
trap #0 trap #0
.short 0x11 .data2 0x11
add.l #8,sp add.l #8,sp
bcc 1f bcc 1f
jmp cerror jmp cerror
@ -38,13 +43,13 @@ __Ssbrk: tst.b -8(sp)
add.l d1,nd add.l d1,nd
rts rts
__Sbrk: trap #0 __Sbrk: trap #0
.short 0x11 .data2 0x11
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1:
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

@ -1,4 +1,9 @@
.define _signal .define _signal
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _signal .extern _signal
NSIG=32 NSIG=32
_signal: _signal:
@ -22,7 +27,7 @@ _signal:
move.l d0,-(sp) move.l d0,-(sp)
clr.l -(sp) clr.l -(sp)
trap #0 trap #0
.short 48 .data2 48
add.l #12,sp add.l #12,sp
bcs 3f bcs 3f
btst #0,d0 btst #0,d0
@ -49,6 +54,6 @@ 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
.text .sect .text

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,11 @@
.define _write .define _write
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.extern _write .extern _write
.text .sect .text
_write: _write:
tst.b -40(sp) tst.b -40(sp)
link a6,#-0 link a6,#-0
@ -16,7 +21,7 @@ lea 12(sp),sp
unlk a6 unlk a6
rts rts
__Swrite: trap #0 __Swrite: trap #0
.short 0x4 .data2 0x4
bcc 1f bcc 1f
jmp cerror jmp cerror
1: 1: