Initial revision
This commit is contained in:
parent
e41a2618f8
commit
e024792e68
53
lib/mantra/descr
Normal file
53
lib/mantra/descr
Normal file
|
@ -0,0 +1,53 @@
|
|||
# $Revision$
|
||||
var w=4
|
||||
var p=4
|
||||
var s=2
|
||||
var l=4
|
||||
var f=4
|
||||
var d=8
|
||||
var NAME=mantra4
|
||||
var M=m68k4
|
||||
var LIB=lib/{M}/tail_
|
||||
var RT=lib/{M}/head_
|
||||
var CPP_F=-Dunix=unix -Dm68000=m68000
|
||||
var INCLUDES=-I{EM}/include/_tail_cc
|
||||
# 407 align is the default
|
||||
var ALIGN=-a0:2 -a1:2 -a2:2 -a3:2
|
||||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/{M}/cg
|
||||
args <
|
||||
stdout
|
||||
need .e
|
||||
end
|
||||
name as
|
||||
from .s
|
||||
to .o
|
||||
program {EM}/lib/m68k2/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
name led
|
||||
from .o.a
|
||||
to .out
|
||||
program {EM}/lib/em_led
|
||||
mapflag -l* LNAME={EM}/{LIB}*
|
||||
mapflag -i ALIGN=-a0:2 -a1:2 -a2:0x8000 -a3:2
|
||||
mapflag -n ALIGN=-a0:2 -a1:2 -a2:0x8000 -a3:2
|
||||
mapflag -nr ALIGN=-a0:2 -a1:0x8000 -a2:2 -a3:2
|
||||
args (.e:{HEAD}=-b0:0x80000 {ALIGN} {EM}/{RT}em) \
|
||||
({RTS}:.b.c={EM}/{RT}cc) ({RTS}:.p={EM}/{RT}pc) -o > < \
|
||||
(.p:{TAIL}={EM}/{LIB}pc) \
|
||||
(.b:{TAIL}={EM}/{LIB}bc) \
|
||||
(.b.c:{TAIL}={EM}/{LIB}cc.1s {EM}/{LIB}cc.2g) \
|
||||
(.e:{TAIL}={EM}/{LIB}em {EM}/lib/mantra4/tail_mon {EM}/lib/{M}/end_em)
|
||||
linker
|
||||
end
|
||||
name cv
|
||||
from .out
|
||||
to .cv
|
||||
program {EM}/lib/mantra/cv
|
||||
args < >
|
||||
outfile a.out
|
||||
end
|
64
mach/mantra/libsys/LIST
Normal file
64
mach/mantra/libsys/LIST
Normal file
|
@ -0,0 +1,64 @@
|
|||
libmon_s.a
|
||||
exit.s
|
||||
_exit.s
|
||||
access.s
|
||||
acct.s
|
||||
alarm.s
|
||||
chdir.s
|
||||
chmod.s
|
||||
chown.s
|
||||
chroot.s
|
||||
close.s
|
||||
creat.s
|
||||
dup.s
|
||||
dup2.s
|
||||
execl.s
|
||||
execle.s
|
||||
execv.s
|
||||
execve.s
|
||||
fcntl.s
|
||||
fork.s
|
||||
ftime.s
|
||||
getegid.s
|
||||
getgid.s
|
||||
getpid.s
|
||||
getuid.s
|
||||
stty.s
|
||||
gtty.s
|
||||
ioctl.s
|
||||
kill.s
|
||||
link.s
|
||||
lseek.s
|
||||
mknod.s
|
||||
mount.s
|
||||
nice.s
|
||||
open.s
|
||||
pause.s
|
||||
pipe.s
|
||||
profil.s
|
||||
ptrace.s
|
||||
read.s
|
||||
setgid.s
|
||||
setuid.s
|
||||
stat.s
|
||||
stime.s
|
||||
sync.s
|
||||
time.s
|
||||
times.s
|
||||
umask.s
|
||||
umount.s
|
||||
unlink.s
|
||||
utime.s
|
||||
write.s
|
||||
brk.s
|
||||
wait.s
|
||||
fstat.s
|
||||
signal.s
|
||||
shm.s
|
||||
sem.s
|
||||
msg.s
|
||||
lockf.s
|
||||
syscall.s
|
||||
call.s
|
||||
cleanup.s
|
||||
errno.s
|
29
mach/mantra/libsys/Makefile
Normal file
29
mach/mantra/libsys/Makefile
Normal file
|
@ -0,0 +1,29 @@
|
|||
# $Header$
|
||||
MACH=m68k4
|
||||
all: libmon_o.a head_em.o
|
||||
|
||||
install: all
|
||||
../../install head_em.o head_em
|
||||
../../install libmon_o.a tail_mon
|
||||
|
||||
|
||||
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 :
|
||||
make pr | opr
|
||||
|
||||
pr:
|
||||
@pr `pwd`/head_em.s
|
||||
@arch pv libmon_s.a | pr -h `pwd`/libmon_s.a
|
10
mach/mantra/libsys/_exit.s
Normal file
10
mach/mantra/libsys/_exit.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define __exit
|
||||
.extern __exit
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
__exit: move.l #0x1,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
11
mach/mantra/libsys/access.s
Normal file
11
mach/mantra/libsys/access.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _access
|
||||
.extern _access
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_access: move.l #0x21,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
10
mach/mantra/libsys/acct.s
Normal file
10
mach/mantra/libsys/acct.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _acct
|
||||
.extern _acct
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_acct: move.l #0x33,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
12
mach/mantra/libsys/alarm.s
Normal file
12
mach/mantra/libsys/alarm.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _alarm
|
||||
.extern _alarm
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_alarm:
|
||||
move.l 4(sp),a0
|
||||
move.l #0x1B,d0
|
||||
trap #0
|
||||
rts
|
27
mach/mantra/libsys/brk.s
Normal file
27
mach/mantra/libsys/brk.s
Normal file
|
@ -0,0 +1,27 @@
|
|||
.define _brk
|
||||
.define _sbrk
|
||||
.extern _brk
|
||||
.extern _sbrk
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_sbrk: move.l .reghp,a0
|
||||
add.l 4(sp),a0
|
||||
move.l #0x11,d0
|
||||
trap #0
|
||||
bcs lcerror
|
||||
move.l .reghp,d0
|
||||
move.l d0,a0
|
||||
add.l 4(sp),a0
|
||||
move.l a0,.reghp
|
||||
rts
|
||||
lcerror: jmp cerror
|
||||
_brk: move.l #0x11,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
||||
bcs lcerror
|
||||
move.l 4(sp),.reghp
|
||||
clr.l d0
|
||||
rts
|
28
mach/mantra/libsys/call.s
Normal file
28
mach/mantra/libsys/call.s
Normal file
|
@ -0,0 +1,28 @@
|
|||
.define call
|
||||
.define callc
|
||||
.define calle
|
||||
.define cerror
|
||||
.extern call
|
||||
.extern callc
|
||||
.extern calle
|
||||
.extern cerror
|
||||
.extern _errno
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
call: trap #0
|
||||
bcs cerror
|
||||
rts
|
||||
callc:
|
||||
trap #0
|
||||
bcs cerror
|
||||
clr.l d0
|
||||
rts
|
||||
calle:
|
||||
trap #0
|
||||
cerror:
|
||||
move.l d0,_errno
|
||||
move.l #-1,d0
|
||||
rts
|
10
mach/mantra/libsys/chdir.s
Normal file
10
mach/mantra/libsys/chdir.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _chdir
|
||||
.extern _chdir
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_chdir: move.l #0xC,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
11
mach/mantra/libsys/chmod.s
Normal file
11
mach/mantra/libsys/chmod.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _chmod
|
||||
.extern _chmod
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_chmod: move.l #0xF,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
12
mach/mantra/libsys/chown.s
Normal file
12
mach/mantra/libsys/chown.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _chown
|
||||
.extern _chown
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_chown: move.l #0x10,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
10
mach/mantra/libsys/chroot.s
Normal file
10
mach/mantra/libsys/chroot.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _chroot
|
||||
.extern _chroot
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_chroot: move.l #0x3D,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
9
mach/mantra/libsys/cleanup.s
Normal file
9
mach/mantra/libsys/cleanup.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
.define __cleanup
|
||||
.extern __cleanup
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
__cleanup:
|
||||
rts
|
10
mach/mantra/libsys/close.s
Normal file
10
mach/mantra/libsys/close.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _close
|
||||
.extern _close
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_close: move.l #0x6,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
11
mach/mantra/libsys/creat.s
Normal file
11
mach/mantra/libsys/creat.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _creat
|
||||
.extern _creat
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_creat: move.l #0x8,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp call
|
10
mach/mantra/libsys/dup.s
Normal file
10
mach/mantra/libsys/dup.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _dup
|
||||
.extern _dup
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_dup: move.l #0x29,d0
|
||||
move.l 4(sp),a0
|
||||
jmp call
|
17
mach/mantra/libsys/dup2.s
Normal file
17
mach/mantra/libsys/dup2.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.define _dup2
|
||||
.extern _dup2
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_dup2:
|
||||
tst.b -40(sp)
|
||||
link a6,#-0
|
||||
move.l 12(a6),-(sp)
|
||||
move.l #0,-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _fcntl
|
||||
add.l #12,sp
|
||||
unlk a6
|
||||
rts
|
9
mach/mantra/libsys/errno.s
Normal file
9
mach/mantra/libsys/errno.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
.define _errno
|
||||
.extern _errno
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .bss
|
||||
_errno: .space 4
|
||||
.sect .text
|
16
mach/mantra/libsys/execl.s
Normal file
16
mach/mantra/libsys/execl.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.define _execl
|
||||
.extern _execl
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_execl: link a6,#0
|
||||
tst.b -132(sp)
|
||||
move.l _environ,-(sp)
|
||||
pea 12(a6)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _execve
|
||||
add.l #0xC,sp
|
||||
unlk a6
|
||||
rts
|
20
mach/mantra/libsys/execle.s
Normal file
20
mach/mantra/libsys/execle.s
Normal file
|
@ -0,0 +1,20 @@
|
|||
.define _execle
|
||||
.extern _execle
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_execle: link a6,#0
|
||||
tst.b -48(sp)
|
||||
lea 12(a6),a0
|
||||
1:
|
||||
tst.l (a0)+
|
||||
bne 1b
|
||||
move.l a0,-(sp)
|
||||
pea 12(a6)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _execve
|
||||
add.l #0xC,sp
|
||||
unlk a6
|
||||
rts
|
16
mach/mantra/libsys/execv.s
Normal file
16
mach/mantra/libsys/execv.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.define _execv
|
||||
.extern _execv
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_execv: link a6,#0
|
||||
tst.b -48(sp)
|
||||
move.l _environ,-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _execve
|
||||
add.l #0xC,sp
|
||||
unlk a6
|
||||
rts
|
12
mach/mantra/libsys/execve.s
Normal file
12
mach/mantra/libsys/execve.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _execve
|
||||
.extern _execve
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_execve: move.l #0x3B,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp calle
|
16
mach/mantra/libsys/exit.s
Normal file
16
mach/mantra/libsys/exit.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.define _exit
|
||||
.extern _exit
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_exit:
|
||||
tst.b -40(sp)
|
||||
link a6,#-0
|
||||
jsr __cleanup
|
||||
move.l 8(a6),-(sp)
|
||||
jsr __exit
|
||||
add.l #4,sp
|
||||
unlk a6
|
||||
rts
|
12
mach/mantra/libsys/fcntl.s
Normal file
12
mach/mantra/libsys/fcntl.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _fcntl
|
||||
.extern _fcntl
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_fcntl: move.l #0x3E,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
17
mach/mantra/libsys/fork.s
Normal file
17
mach/mantra/libsys/fork.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.define _fork
|
||||
.extern _fork
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_fork: move.l #0x2,d0
|
||||
trap #0
|
||||
bra 1f
|
||||
bcc 2f
|
||||
jmp cerror
|
||||
1:
|
||||
!move.l d0,p_uid
|
||||
clr.l d0
|
||||
2:
|
||||
rts
|
11
mach/mantra/libsys/fstat.s
Normal file
11
mach/mantra/libsys/fstat.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _fstat
|
||||
.extern _fstat
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_fstat: move.l #0x1C,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
10
mach/mantra/libsys/ftime.s
Normal file
10
mach/mantra/libsys/ftime.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _ftime
|
||||
.extern _ftime
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_ftime: move.l #0x23,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
11
mach/mantra/libsys/getegid.s
Normal file
11
mach/mantra/libsys/getegid.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _getegid
|
||||
.extern _getegid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_getegid: move.l #0x2F,d0
|
||||
trap #0
|
||||
move.l d1,d0
|
||||
rts
|
10
mach/mantra/libsys/getgid.s
Normal file
10
mach/mantra/libsys/getgid.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _getgid
|
||||
.extern _getgid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_getgid: move.l #0x2F,d0
|
||||
trap #0
|
||||
rts
|
10
mach/mantra/libsys/getpid.s
Normal file
10
mach/mantra/libsys/getpid.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _getpid
|
||||
.extern _getpid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_getpid: move.l #0x14,d0
|
||||
trap #0
|
||||
rts
|
10
mach/mantra/libsys/getuid.s
Normal file
10
mach/mantra/libsys/getuid.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _getuid
|
||||
.extern _getuid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_getuid: move.l #0x18,d0
|
||||
trap #0
|
||||
rts
|
17
mach/mantra/libsys/gtty.s
Normal file
17
mach/mantra/libsys/gtty.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.define _gtty
|
||||
.extern _gtty
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_gtty:
|
||||
tst.b -40(sp)
|
||||
link a6,#-0
|
||||
move.l 12(a6),-(sp)
|
||||
move.l #29704,-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _ioctl
|
||||
add.l #12,sp
|
||||
unlk a6
|
||||
rts
|
76
mach/mantra/libsys/head_em.s
Normal file
76
mach/mantra/libsys/head_em.s
Normal file
|
@ -0,0 +1,76 @@
|
|||
.define .lino,.filn
|
||||
.define EXIT
|
||||
.define begtext,begdata,begbss
|
||||
.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE,EBADGTO
|
||||
.define hol0,.reghp,.limhp,.trpim,.trppc
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
|
||||
|
||||
|
||||
! EM runtime start-off for the Bleasdale 68000 system
|
||||
|
||||
|
||||
LINO_AD = 0
|
||||
FILN_AD = 4
|
||||
|
||||
EARRAY = 0
|
||||
ERANGE = 1
|
||||
ESET = 2
|
||||
EIDIVZ = 6
|
||||
EHEAP = 17
|
||||
EILLINS = 18
|
||||
ECASE = 20
|
||||
EBADGTO = 27
|
||||
|
||||
.sect .text
|
||||
begtext:
|
||||
! Bleasdale puts the argument and environment vectors
|
||||
! themselves on top of the stack, instead of POINTERS
|
||||
! to these vectors. We get things right here.
|
||||
move.l 4(sp),a0
|
||||
clr.l -4(a0)
|
||||
move.l sp,a0
|
||||
sub.l #8,sp
|
||||
move.l (a0),(sp)
|
||||
add.l #4,a0
|
||||
move.l a0,4(sp)
|
||||
1:
|
||||
tst.l (a0)+
|
||||
bne 1b
|
||||
move.l 4(sp),a1
|
||||
cmp.l (a1),a0
|
||||
blt 2f
|
||||
sub.l #4,a0
|
||||
2:
|
||||
move.l a0,8(sp)
|
||||
|
||||
! Now the stack contains an argc (4 bytes), argv-pointer and
|
||||
! envp pointer.
|
||||
|
||||
jsr _m_a_i_n
|
||||
add #012,sp
|
||||
EXIT:
|
||||
jsr __exit
|
||||
|
||||
.sect .data
|
||||
begdata:
|
||||
hol0:
|
||||
.lino:
|
||||
.data4 0 ! lino
|
||||
.filn:
|
||||
.data4 0 ! filn
|
||||
.reghp:
|
||||
.data4 endbss
|
||||
.limhp:
|
||||
.data4 endbss
|
||||
.trppc:
|
||||
.data4 0
|
||||
.trpim:
|
||||
.data4 0
|
||||
|
||||
|
||||
.sect .bss
|
||||
begbss: !initialization is not needed because ALL entries are in zero space!
|
12
mach/mantra/libsys/ioctl.s
Normal file
12
mach/mantra/libsys/ioctl.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _ioctl
|
||||
.extern _ioctl
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_ioctl: move.l #0x36,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
11
mach/mantra/libsys/kill.s
Normal file
11
mach/mantra/libsys/kill.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _kill
|
||||
.extern _kill
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_kill: move.l #0x25,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 6(sp),d1
|
||||
jmp callc
|
11
mach/mantra/libsys/link.s
Normal file
11
mach/mantra/libsys/link.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _link
|
||||
.extern _link
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_link: move.l #0x9,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
12
mach/mantra/libsys/lockf.s
Normal file
12
mach/mantra/libsys/lockf.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _lockf
|
||||
.extern _lockf
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_lockf: move.l #0x38,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
12
mach/mantra/libsys/lseek.s
Normal file
12
mach/mantra/libsys/lseek.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _lseek
|
||||
.extern _lseek
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_lseek: move.l #0x13,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp call
|
12
mach/mantra/libsys/mknod.s
Normal file
12
mach/mantra/libsys/mknod.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _mknod
|
||||
.extern _mknod
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_mknod: move.l #0xE,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
12
mach/mantra/libsys/mount.s
Normal file
12
mach/mantra/libsys/mount.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _mount
|
||||
.extern _mount
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_mount: move.l #0x15,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp callc
|
62
mach/mantra/libsys/msg.s
Normal file
62
mach/mantra/libsys/msg.s
Normal file
|
@ -0,0 +1,62 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
|
||||
.define _msgsnd
|
||||
.define _msgctl
|
||||
.define _msgrcv
|
||||
.define _msgget
|
||||
msg = 49
|
||||
.extern _msgrcv
|
||||
.extern _msgctl
|
||||
.extern _msgsnd
|
||||
.extern _msgget
|
||||
.extern _syscall
|
||||
|
||||
_msgget:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
clr.l -(sp)
|
||||
move.l #msg,-(sp)
|
||||
jsr _syscall
|
||||
add #0x10,sp
|
||||
unlk a6
|
||||
rts
|
||||
_msgctl:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #1,-(sp)
|
||||
move.l #msg,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
||||
_msgrcv:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 24(a6),-(sp)
|
||||
move.l 20(a6),-(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #2,-(sp)
|
||||
move.l #msg,-(sp)
|
||||
jsr _syscall
|
||||
add #0x1C,sp
|
||||
unlk a6
|
||||
rts
|
||||
_msgsnd:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 20(a6),-(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #3,-(sp)
|
||||
move.l #msg,-(sp)
|
||||
jsr _syscall
|
||||
add #0x18,sp
|
||||
unlk a6
|
||||
rts
|
10
mach/mantra/libsys/nice.s
Normal file
10
mach/mantra/libsys/nice.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _nice
|
||||
.extern _nice
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_nice: move.l #0x22,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
11
mach/mantra/libsys/open.s
Normal file
11
mach/mantra/libsys/open.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _open
|
||||
.extern _open
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_open: move.l #0x5,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp call
|
10
mach/mantra/libsys/pause.s
Normal file
10
mach/mantra/libsys/pause.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _pause
|
||||
.extern _pause
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_pause: move.l #0x1D,d0
|
||||
trap #0
|
||||
rts
|
18
mach/mantra/libsys/pipe.s
Normal file
18
mach/mantra/libsys/pipe.s
Normal file
|
@ -0,0 +1,18 @@
|
|||
.define _pipe
|
||||
.extern _pipe
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_pipe:
|
||||
move.l #0x2A,d0
|
||||
trap #0
|
||||
bcc 1f
|
||||
jmp cerror
|
||||
1:
|
||||
move.l 4(sp),a0
|
||||
move.l d0,(a0)+
|
||||
move.l d1,(a0)
|
||||
clr.l d0
|
||||
rts
|
14
mach/mantra/libsys/profil.s
Normal file
14
mach/mantra/libsys/profil.s
Normal file
|
@ -0,0 +1,14 @@
|
|||
.define _profil
|
||||
.extern _profil
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_profil: move.l #0x2C,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
move.l 16(sp),d2
|
||||
trap #0
|
||||
rts
|
16
mach/mantra/libsys/ptrace.s
Normal file
16
mach/mantra/libsys/ptrace.s
Normal file
|
@ -0,0 +1,16 @@
|
|||
.define _ptrace
|
||||
.extern _ptrace
|
||||
.extern _errno
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_ptrace: move.l #0x1A,d0
|
||||
move.l 16(sp),a0
|
||||
move.l 12(sp),d1
|
||||
move.l 8(sp),a1
|
||||
move.l 4(sp),d2
|
||||
clr.l _errno
|
||||
trap #0
|
||||
rts
|
12
mach/mantra/libsys/read.s
Normal file
12
mach/mantra/libsys/read.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _read
|
||||
.extern _read
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_read: move.l #0x3,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp call
|
47
mach/mantra/libsys/sem.s
Normal file
47
mach/mantra/libsys/sem.s
Normal file
|
@ -0,0 +1,47 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
|
||||
.define _semctl
|
||||
.define _semop
|
||||
.define _semget
|
||||
sem = 53
|
||||
.extern _semop
|
||||
.extern _semctl
|
||||
.extern _semget
|
||||
.extern _syscall
|
||||
|
||||
_semctl:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 20(a6),-(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
clr.l -(sp)
|
||||
move.l #sem,-(sp)
|
||||
jsr _syscall
|
||||
add #0x18,sp
|
||||
unlk a6
|
||||
rts
|
||||
_semget:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #1,-(sp)
|
||||
move.l #sem,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
||||
_semop:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #2,-(sp)
|
||||
move.l #sem,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
10
mach/mantra/libsys/setgid.s
Normal file
10
mach/mantra/libsys/setgid.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _setgid
|
||||
.extern _setgid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_setgid: move.l #0x2E,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
10
mach/mantra/libsys/setuid.s
Normal file
10
mach/mantra/libsys/setuid.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _setuid
|
||||
.extern _setuid
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_setuid: move.l #0x17,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
58
mach/mantra/libsys/shm.s
Normal file
58
mach/mantra/libsys/shm.s
Normal file
|
@ -0,0 +1,58 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
|
||||
.define _shmdt
|
||||
.define _shmat
|
||||
.define _shmctl
|
||||
.define _shmget
|
||||
shm = 52
|
||||
.extern _shmdt
|
||||
.extern _shmat
|
||||
.extern _shmctl
|
||||
.extern _shmget
|
||||
.extern _syscall
|
||||
|
||||
_shmat:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
clr.l -(sp)
|
||||
move.l #shm,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
||||
_shmctl:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #1,-(sp)
|
||||
move.l #shm,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
||||
_shmdt:
|
||||
link a6,#0
|
||||
tst.b -144(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #2,-(sp)
|
||||
move.l #shm,-(sp)
|
||||
jsr _syscall
|
||||
add #0xC,sp
|
||||
unlk a6
|
||||
rts
|
||||
_shmget:
|
||||
link a6,#0
|
||||
tst.b -32(sp)
|
||||
move.l 16(a6),-(sp)
|
||||
move.l 12(a6),-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
move.l #3,-(sp)
|
||||
move.l #shm,-(sp)
|
||||
jsr _syscall
|
||||
add #0x14,sp
|
||||
unlk a6
|
||||
rts
|
91
mach/mantra/libsys/signal.s
Normal file
91
mach/mantra/libsys/signal.s
Normal file
|
@ -0,0 +1,91 @@
|
|||
.define _signal
|
||||
.extern _signal
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
NSIG=32
|
||||
_signal:
|
||||
move.l 4(sp), d0
|
||||
cmp.l #NSIG,d0
|
||||
bcc 1f
|
||||
move.l 8(sp),d1
|
||||
move.l d0,a0
|
||||
add.l a0,a0
|
||||
add.l a0,a0
|
||||
add.l #dvect,a0
|
||||
move.l (a0),a1
|
||||
move.l d1,(a0)
|
||||
beq 2f
|
||||
btst #0,d1
|
||||
bne 2f
|
||||
move.l #jmptab,d1
|
||||
add.l d0,d1
|
||||
add.l d0,d1
|
||||
2:
|
||||
move.l d0,a0
|
||||
move.l #0x30,d0
|
||||
trap #0
|
||||
bcs 3f
|
||||
btst #0,d0
|
||||
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
|
||||
add.l a0,a0
|
||||
add.l a0,a0
|
||||
add.l #dvect,a0
|
||||
move.l (a0),a0
|
||||
jsr (a0)
|
||||
add.l #4,sp
|
||||
movem.l (sp)+,d0/d1/a0/a1
|
||||
add.l #4,sp
|
||||
rtr
|
||||
.sect .bss
|
||||
dvect: .space 4*NSIG
|
11
mach/mantra/libsys/stat.s
Normal file
11
mach/mantra/libsys/stat.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _stat
|
||||
.extern _stat
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_stat: move.l #0x12,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
15
mach/mantra/libsys/stime.s
Normal file
15
mach/mantra/libsys/stime.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.define _stime
|
||||
.extern _stime
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_stime: move.l #0x19,d0
|
||||
move.l 4(sp),a0
|
||||
move.l (a0),a0
|
||||
trap #0
|
||||
bcs 1f
|
||||
rts
|
||||
1:
|
||||
jmp cerror
|
17
mach/mantra/libsys/stty.s
Normal file
17
mach/mantra/libsys/stty.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.define _stty
|
||||
.extern _stty
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_stty:
|
||||
tst.b -40(sp)
|
||||
link a6,#-0
|
||||
move.l 12(a6),-(sp)
|
||||
move.l #29705,-(sp)
|
||||
move.l 8(a6),-(sp)
|
||||
jsr _ioctl
|
||||
add.l #12,sp
|
||||
unlk a6
|
||||
rts
|
10
mach/mantra/libsys/sync.s
Normal file
10
mach/mantra/libsys/sync.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _sync
|
||||
.extern _sync
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_sync: move.l #0x24,d0
|
||||
trap #0
|
||||
rts
|
26
mach/mantra/libsys/syscall.s
Normal file
26
mach/mantra/libsys/syscall.s
Normal file
|
@ -0,0 +1,26 @@
|
|||
.define _syscall
|
||||
.extern _syscall
|
||||
.extern cerror
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_syscall:
|
||||
move.l 4(sp),d0
|
||||
move.l 8(sp),a0
|
||||
move.l 12(sp),d1
|
||||
move.l 16(sp),a1
|
||||
movem.l d2/d3/a2,sv
|
||||
move.l 20(sp),d2
|
||||
move.l 24(sp),a2
|
||||
move.l 28(sp),d3
|
||||
trap #0
|
||||
movem.l sv,d2/d3/a2
|
||||
bcs 1f
|
||||
rts
|
||||
1:
|
||||
jmp cerror
|
||||
|
||||
.sect .bss
|
||||
sv: .space 12
|
15
mach/mantra/libsys/time.s
Normal file
15
mach/mantra/libsys/time.s
Normal file
|
@ -0,0 +1,15 @@
|
|||
.define _time
|
||||
.extern _time
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_time: move.l #0xD,d0
|
||||
trap #0
|
||||
tst.l 4(sp)
|
||||
beq 1f
|
||||
move.l 4(sp),a0
|
||||
move.l d0,(a0)
|
||||
1:
|
||||
rts
|
11
mach/mantra/libsys/times.s
Normal file
11
mach/mantra/libsys/times.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _times
|
||||
.extern _times
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_times: move.l #0x2B,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
||||
rts
|
10
mach/mantra/libsys/umask.s
Normal file
10
mach/mantra/libsys/umask.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _umask
|
||||
.extern _umask
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_umask: move.l #0x3C,d0
|
||||
move.l 4(sp),a0
|
||||
jmp call
|
10
mach/mantra/libsys/umount.s
Normal file
10
mach/mantra/libsys/umount.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _umount
|
||||
.extern _umount
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_umount: move.l #0x16,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
10
mach/mantra/libsys/unlink.s
Normal file
10
mach/mantra/libsys/unlink.s
Normal file
|
@ -0,0 +1,10 @@
|
|||
.define _unlink
|
||||
.extern _unlink
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_unlink: move.l #0xA,d0
|
||||
move.l 4(sp),a0
|
||||
jmp callc
|
11
mach/mantra/libsys/utime.s
Normal file
11
mach/mantra/libsys/utime.s
Normal file
|
@ -0,0 +1,11 @@
|
|||
.define _utime
|
||||
.extern _utime
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_utime: move.l #0x1E,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
jmp callc
|
17
mach/mantra/libsys/wait.s
Normal file
17
mach/mantra/libsys/wait.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
.define _wait
|
||||
.extern _wait
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_wait: move.l #0x7,d0
|
||||
move.l 4(sp),a0
|
||||
trap #0
|
||||
bcs cerror
|
||||
tst.l 4(sp)
|
||||
beq 1f
|
||||
move.l 4(sp),a0
|
||||
move.l d1,(a0)
|
||||
1:
|
||||
rts
|
12
mach/mantra/libsys/write.s
Normal file
12
mach/mantra/libsys/write.s
Normal file
|
@ -0,0 +1,12 @@
|
|||
.define _write
|
||||
.extern _write
|
||||
.sect .text
|
||||
.sect .rom
|
||||
.sect .data
|
||||
.sect .bss
|
||||
.sect .text
|
||||
_write: move.l #0x4,d0
|
||||
move.l 4(sp),a0
|
||||
move.l 8(sp),d1
|
||||
move.l 12(sp),a1
|
||||
jmp call
|
Loading…
Reference in a new issue