From: ceriel Date: Thu, 8 Jan 1987 10:41:08 +0000 (+0000) Subject: Initial revision X-Git-Tag: release-5-5~5045 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c2805a25bdf2cfd31eb4b48fc17de8b77bcbb535;p=ack.git Initial revision --- diff --git a/mach/i86/libsys/LIST b/mach/i86/libsys/LIST new file mode 100644 index 000000000..901219710 --- /dev/null +++ b/mach/i86/libsys/LIST @@ -0,0 +1,52 @@ +tail_mon.a +exit.s +_exit.s +abort.s +access.s +chdir.s +chmod.s +chown.s +cleanup.s +close.s +creat.s +dup.s +execl.s +execle.s +execv.s +execve.s +time.s +exece.s +fork.s +fstat.s +getgid.s +getpid.s +getuid.s +gtty.s +stty.s +ioctl.s +kill.s +link.s +lseek.s +mknod.s +mount.s +nice.s +open.s +pipe.s +profil.s +read.s +sbrk.s +brk.s +setgid.s +setuid.s +signal.s +stat.s +sync.s +umount.s +unlink.s +wait.s +write.s +cerror.s +error.s +pause.s +alarm.s +ftime.s diff --git a/mach/i86/libsys/Makefile b/mach/i86/libsys/Makefile new file mode 100644 index 000000000..2e2f71292 --- /dev/null +++ b/mach/i86/libsys/Makefile @@ -0,0 +1,21 @@ +# $Header$ +MACH=l86 +all: tail_mon +install: all + ../../install tail_mon + +cmp: all + -../../compare tail_mon + +tail_mon: + ASAR=aal ; export ASAR ;\ + march . tail_mon + +clean: + rm -f *.o + +opr : + make pr | opr + +pr: + @ar pv tail_mon.a diff --git a/mach/i86/libsys/_exit.s b/mach/i86/libsys/_exit.s new file mode 100644 index 000000000..0f138b88c --- /dev/null +++ b/mach/i86/libsys/_exit.s @@ -0,0 +1,10 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define __exit +.sect .text +__exit: + mov bx,sp + xor ax,ax + push ax ! unused memory + push 2(bx) + push ax ! dummy return address + int 0x81 diff --git a/mach/i86/libsys/abort.s b/mach/i86/libsys/abort.s new file mode 100644 index 000000000..bd6d7544f --- /dev/null +++ b/mach/i86/libsys/abort.s @@ -0,0 +1,13 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _abort +.extern _abort +_abort: push si + push di + push bp + mov bp,sp + int 128 + mov sp,bp + pop bp + pop di + pop si + ret diff --git a/mach/i86/libsys/access.s b/mach/i86/libsys/access.s new file mode 100644 index 000000000..f0059aa08 --- /dev/null +++ b/mach/i86/libsys/access.s @@ -0,0 +1,9 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _access +.extern _access, cerror +_access: int 0xa1 + jb 9f + xor ax,ax + ret +9: + jmp cerror diff --git a/mach/i86/libsys/alarm.s b/mach/i86/libsys/alarm.s new file mode 100644 index 000000000..df92e8922 --- /dev/null +++ b/mach/i86/libsys/alarm.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _alarm +.extern _alarm, cerror +_alarm: int 0x9b + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/brk.s b/mach/i86/libsys/brk.s new file mode 100644 index 000000000..0ddc5874f --- /dev/null +++ b/mach/i86/libsys/brk.s @@ -0,0 +1,39 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _brk +.define xbrk +.define np +.extern _brk +.extern xbrk +.extern np, cerror +_brk: + mov bx,sp + mov ax,2(bx) + mov cx,sp + sub cx,128 + jbe 1f + mov bx,(np) + mov (np),ax + sub ax,bx + jbe 2f + call xbrk +2: + xor ax,ax + ret +1: + mov ax,0xc + jmp cerror +xbrk: + push di + mov di,bx + mov cx,ax + xor ax,ax + shr cx,1 + repz stos + jae 3f + stosb +3: + pop di + ret +.sect .data +np: .data2 0 +.sect .text diff --git a/mach/i86/libsys/cerror.s b/mach/i86/libsys/cerror.s new file mode 100644 index 000000000..fad3993d7 --- /dev/null +++ b/mach/i86/libsys/cerror.s @@ -0,0 +1,9 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define cerror +.extern cerror +.extern _errno +cerror: + mov (_errno),ax + mov dx,-1 + mov ax,dx + ret diff --git a/mach/i86/libsys/chdir.s b/mach/i86/libsys/chdir.s new file mode 100644 index 000000000..c5012f943 --- /dev/null +++ b/mach/i86/libsys/chdir.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _chdir +.extern _chdir, cerror +_chdir: int 0x8c + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/chmod.s b/mach/i86/libsys/chmod.s new file mode 100644 index 000000000..298babefd --- /dev/null +++ b/mach/i86/libsys/chmod.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _chmod +.extern _chmod, cerror +_chmod: int 0x8f + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/chown.s b/mach/i86/libsys/chown.s new file mode 100644 index 000000000..dc39ab6a4 --- /dev/null +++ b/mach/i86/libsys/chown.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _chown +.extern _chown, cerror +_chown: int 0x90 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/cleanup.s b/mach/i86/libsys/cleanup.s new file mode 100644 index 000000000..61db5665f --- /dev/null +++ b/mach/i86/libsys/cleanup.s @@ -0,0 +1,9 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define __cleanup +.extern __cleanup +__cleanup: + push bp + mov bp,sp +mov sp,bp +pop bp +ret diff --git a/mach/i86/libsys/close.s b/mach/i86/libsys/close.s new file mode 100644 index 000000000..29e7b03d4 --- /dev/null +++ b/mach/i86/libsys/close.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _close +.extern _close, cerror +_close: int 0x86 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/compmodule b/mach/i86/libsys/compmodule new file mode 100755 index 000000000..8ec2f6722 --- /dev/null +++ b/mach/i86/libsys/compmodule @@ -0,0 +1,4 @@ +if i86 -c $1 1>&2 +then echo `basename $1 $2`.o +else exit 1 +fi diff --git a/mach/i86/libsys/creat.s b/mach/i86/libsys/creat.s new file mode 100644 index 000000000..ababb8646 --- /dev/null +++ b/mach/i86/libsys/creat.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _creat +.extern _creat, cerror +_creat: int 0x88 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/dup.s b/mach/i86/libsys/dup.s new file mode 100644 index 000000000..d0e6ba092 --- /dev/null +++ b/mach/i86/libsys/dup.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text + +.define _dup +.extern _dup, cerror +_dup: int 0xc9 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/error.s b/mach/i86/libsys/error.s new file mode 100644 index 000000000..ec32cc390 --- /dev/null +++ b/mach/i86/libsys/error.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss +.define _errno +.extern _errno + +_errno: + .space 2 +.sect .text diff --git a/mach/i86/libsys/exece.s b/mach/i86/libsys/exece.s new file mode 100644 index 000000000..c2495ad6a --- /dev/null +++ b/mach/i86/libsys/exece.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _exece +.extern _exece, cerror +_exece: int 0xdb + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/execl.s b/mach/i86/libsys/execl.s new file mode 100644 index 000000000..9f2130f24 --- /dev/null +++ b/mach/i86/libsys/execl.s @@ -0,0 +1,20 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text + +.define _execl +.extern _execl, _environ, _execve +_execl: + push si + push di + push bp + mov bp,sp + push (_environ) + lea ax,10(bp) + push ax + push 8(bp) + call _execve + add sp,6 + mov sp,bp + pop bp + pop di + pop si + ret diff --git a/mach/i86/libsys/execle.s b/mach/i86/libsys/execle.s new file mode 100644 index 000000000..bba540835 --- /dev/null +++ b/mach/i86/libsys/execle.s @@ -0,0 +1,24 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _execle +.extern _execle, _execve +_execle: + push si + push di + push bp + mov bp,sp + lea si,10(bp) +1: mov di,si + add si,2 + cmp (di),0 + jne 1b + push (si) + lea ax,10(bp) + push ax + push 8(bp) + call _execve + add sp,6 + mov sp,bp + pop bp + pop di + pop si + ret diff --git a/mach/i86/libsys/execv.s b/mach/i86/libsys/execv.s new file mode 100644 index 000000000..bbbc2e63f --- /dev/null +++ b/mach/i86/libsys/execv.s @@ -0,0 +1,12 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _execv +.extern _execv, _environ, cerror +_execv: + mov bx,sp + push (_environ) + push 4(bx) + push 2(bx) + push ax + int 0xbb + add sp,8 + jmp cerror diff --git a/mach/i86/libsys/execve.s b/mach/i86/libsys/execve.s new file mode 100644 index 000000000..964b6b9c4 --- /dev/null +++ b/mach/i86/libsys/execve.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _execve +.extern _execve, cerror +_execve: + int 0x8b + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/exit.s b/mach/i86/libsys/exit.s new file mode 100644 index 000000000..28cfca10d --- /dev/null +++ b/mach/i86/libsys/exit.s @@ -0,0 +1,13 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _exit +.extern _exit, __cleanup, __exit +_exit: + push bp + mov bp,sp +call __cleanup +push 4(bp) +call __exit +pop si +mov sp,bp +pop bp +ret diff --git a/mach/i86/libsys/fork.s b/mach/i86/libsys/fork.s new file mode 100644 index 000000000..e280f58db --- /dev/null +++ b/mach/i86/libsys/fork.s @@ -0,0 +1,11 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _fork +.extern _fork, cerror +_fork: int 0x82 + jmp 1f + jae 2f + jmp cerror +1: + xor ax,ax +2: + ret diff --git a/mach/i86/libsys/fstat.s b/mach/i86/libsys/fstat.s new file mode 100644 index 000000000..d7977f9e2 --- /dev/null +++ b/mach/i86/libsys/fstat.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _fstat +.extern _fstat, cerror +_fstat: int 0x9c + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/ftime.s b/mach/i86/libsys/ftime.s new file mode 100644 index 000000000..be3604fd3 --- /dev/null +++ b/mach/i86/libsys/ftime.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _ftime +.extern _ftime, cerror +_ftime: int 0xa3 + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/getgid.s b/mach/i86/libsys/getgid.s new file mode 100644 index 000000000..dc769aec3 --- /dev/null +++ b/mach/i86/libsys/getgid.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _getgid +.extern _getgid, cerror +_getgid: int 0xaf + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/getpid.s b/mach/i86/libsys/getpid.s new file mode 100644 index 000000000..8300a7af9 --- /dev/null +++ b/mach/i86/libsys/getpid.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _getpid +.extern _getpid, cerror +_getpid: int 0x94 + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/getuid.s b/mach/i86/libsys/getuid.s new file mode 100644 index 000000000..ff5d6fa8a --- /dev/null +++ b/mach/i86/libsys/getuid.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _getuid +.extern _getuid, cerror +_getuid: int 0x98 + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/gtty.s b/mach/i86/libsys/gtty.s new file mode 100644 index 000000000..4e8b0e6c2 --- /dev/null +++ b/mach/i86/libsys/gtty.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _gtty +.extern _gtty, _ioctl +_gtty: + push bp + mov bp,sp +push 6(bp) +mov ax,29704 +push ax +push 4(bp) +call _ioctl +add sp,6 +mov sp,bp +pop bp +ret diff --git a/mach/i86/libsys/ioctl.s b/mach/i86/libsys/ioctl.s new file mode 100644 index 000000000..b7e24279a --- /dev/null +++ b/mach/i86/libsys/ioctl.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _ioctl +.extern _ioctl, cerror +_ioctl: int 0xb6 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/kill.s b/mach/i86/libsys/kill.s new file mode 100644 index 000000000..3c6ce5267 --- /dev/null +++ b/mach/i86/libsys/kill.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _kill +.extern _kill, cerror +_kill: int 0xa5 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/link.s b/mach/i86/libsys/link.s new file mode 100644 index 000000000..0be0cf2e5 --- /dev/null +++ b/mach/i86/libsys/link.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _link +.extern _link, cerror +_link: int 0x89 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/lseek.s b/mach/i86/libsys/lseek.s new file mode 100644 index 000000000..a54326b1c --- /dev/null +++ b/mach/i86/libsys/lseek.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _lseek +.extern _lseek, cerror +_lseek: int 0x93 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/mknod.s b/mach/i86/libsys/mknod.s new file mode 100644 index 000000000..0d6aa3db6 --- /dev/null +++ b/mach/i86/libsys/mknod.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _mknod +.extern _mknod, cerror +_mknod: int 0x8e + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/mount.s b/mach/i86/libsys/mount.s new file mode 100644 index 000000000..ad3e4b2cf --- /dev/null +++ b/mach/i86/libsys/mount.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _mount +.extern _mount, cerror +_mount: int 0x95 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/nice.s b/mach/i86/libsys/nice.s new file mode 100644 index 000000000..1e8977425 --- /dev/null +++ b/mach/i86/libsys/nice.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _nice +.extern _nice, cerror +_nice: int 0xa2 + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/open.s b/mach/i86/libsys/open.s new file mode 100644 index 000000000..2cf6df3c3 --- /dev/null +++ b/mach/i86/libsys/open.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _open +.extern _open, cerror +_open: int 0x85 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/pause.s b/mach/i86/libsys/pause.s new file mode 100644 index 000000000..05a6fe701 --- /dev/null +++ b/mach/i86/libsys/pause.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _pause +.extern _pause, cerror +_pause: int 0x9d + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/pipe.s b/mach/i86/libsys/pipe.s new file mode 100644 index 000000000..47865c829 --- /dev/null +++ b/mach/i86/libsys/pipe.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _pipe +.extern _pipe, cerror +_pipe: int 0xaa + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/profil.s b/mach/i86/libsys/profil.s new file mode 100644 index 000000000..52e3b7fb9 --- /dev/null +++ b/mach/i86/libsys/profil.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _profil +.extern _profil, cerror +_profil: int 0xac + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/read.s b/mach/i86/libsys/read.s new file mode 100644 index 000000000..a9839bf62 --- /dev/null +++ b/mach/i86/libsys/read.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _read +.extern _read, cerror +_read: int 0x83 + jb 9f + ret +9: jmp cerror diff --git a/mach/i86/libsys/sbrk.s b/mach/i86/libsys/sbrk.s new file mode 100644 index 000000000..b3b4e6a24 --- /dev/null +++ b/mach/i86/libsys/sbrk.s @@ -0,0 +1,25 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _sbrk +.extern _sbrk, xbrk, cerror +_sbrk: +push bp +mov bp,sp +mov ax,4(bp) +mov bx,(np) +add ax,bx +mov cx,sp +sub cx,128 +sub cx,ax +jbe 1f +mov (np),ax +sub ax,bx +jbe 2f +call xbrk +2: +mov ax,bx +pop bp +ret +1: +mov ax,0xc +pop bp +jmp cerror diff --git a/mach/i86/libsys/setgid.s b/mach/i86/libsys/setgid.s new file mode 100644 index 000000000..52f9b11e2 --- /dev/null +++ b/mach/i86/libsys/setgid.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _setgid +.extern _setgid, cerror +setgid: int 0xae + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/setuid.s b/mach/i86/libsys/setuid.s new file mode 100644 index 000000000..e27c0fd14 --- /dev/null +++ b/mach/i86/libsys/setuid.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _setuid +.extern _setuid, cerror +_setuid: int 0x97 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/signal.s b/mach/i86/libsys/signal.s new file mode 100644 index 000000000..cc23eb830 --- /dev/null +++ b/mach/i86/libsys/signal.s @@ -0,0 +1,62 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _signal +.extern _signal, cerror +NSIG=16 +_signal: mov bx,sp + mov cx,4(bx) + mov bx,2(bx) + cmp bx,NSIG + jae 1f + shl bx,1 + mov dx,dvect(bx) + cmp cx,1 + jbe 2f + mov dvect(bx),cx + mov bx,sp + mov 4(bx),enter + mov bx,dx + int 0xb0 + mov dx,bx + mov bx,sp + mov 4(bx),cx + jb 3f + jmp 4f +2: + int 0xb0 + jb 3f + mov dvect(bx),cx +4: + cmp ax,1 + jbe 5f + mov ax,dx +5: + ret +1: + mov ax,22 +3: + jmp cerror + +enter: + push bx + push cx + push dx + push di + push si + mov bx,sp + mov di,10(bx) + mov 10(bx),ax + push di + shl di,1 + call dvect(di) + add sp,2 + pop si + pop di + pop dx + pop cx + pop bx + pop ax + popf + ret +.sect .bss +dvect: .space 2*NSIG +.sect .text diff --git a/mach/i86/libsys/stat.s b/mach/i86/libsys/stat.s new file mode 100644 index 000000000..31153b4a7 --- /dev/null +++ b/mach/i86/libsys/stat.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _stat +.extern _stat, cerror +_stat: int 0x92 + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/stty.s b/mach/i86/libsys/stty.s new file mode 100644 index 000000000..701bb18a3 --- /dev/null +++ b/mach/i86/libsys/stty.s @@ -0,0 +1,15 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _stty +.extern _stty, _ioctl +_stty: + push bp + mov bp,sp +push 6(bp) +mov ax,29705 +push ax +push 4(bp) +call _ioctl +add sp,6 +mov sp,bp +pop bp +ret diff --git a/mach/i86/libsys/sync.s b/mach/i86/libsys/sync.s new file mode 100644 index 000000000..973cc27a6 --- /dev/null +++ b/mach/i86/libsys/sync.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _sync +.extern _sync, cerror +_sync: int 0xa4 + jb 9f + ret +9: + jmp cerror diff --git a/mach/i86/libsys/time.s b/mach/i86/libsys/time.s new file mode 100644 index 000000000..ec87adb63 --- /dev/null +++ b/mach/i86/libsys/time.s @@ -0,0 +1,27 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _time +.extern _time, _ftime +_time: + push si + push di + push bp + mov bp,sp + sub sp,10 + lea ax,-10(bp) + push ax + call _ftime + add sp,2 + cmp 8(bp),0 + je 1f + mov ax,-10(bp) + mov dx,-8(bp) + mov di,8(bp) + mov (di),ax + mov 2(di),dx +1: mov ax,-10(bp) + mov dx,-8(bp) + mov sp,bp + pop bp + pop di + pop si + ret diff --git a/mach/i86/libsys/umount.s b/mach/i86/libsys/umount.s new file mode 100644 index 000000000..bee18150e --- /dev/null +++ b/mach/i86/libsys/umount.s @@ -0,0 +1,9 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _umount +.extern _umount, cerror +_umount: int 0x96 + jb 9f + xor ax,ax + ret +9: + jmp cerror diff --git a/mach/i86/libsys/unlink.s b/mach/i86/libsys/unlink.s new file mode 100644 index 000000000..6d5459975 --- /dev/null +++ b/mach/i86/libsys/unlink.s @@ -0,0 +1,8 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _unlink +.extern _unlink, cerror +_unlink: int 0x8a + jb 9f + xor ax,ax + ret +9: jmp cerror diff --git a/mach/i86/libsys/wait.s b/mach/i86/libsys/wait.s new file mode 100644 index 000000000..ae27c3bdc --- /dev/null +++ b/mach/i86/libsys/wait.s @@ -0,0 +1,17 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _wait +.extern _wait, cerror +_wait: + mov bx,sp + mov ax,2 ! void info about unused memory + ! Should be 0 according to /usr/include/sys.s, but + ! that doesn't work + push ax + push 2(bx) + push ax ! dummy return address + int 0x87 + jb 9f + add sp,6 + ret +9: add sp,6 + jmp cerror diff --git a/mach/i86/libsys/write.s b/mach/i86/libsys/write.s new file mode 100644 index 000000000..935d3eeab --- /dev/null +++ b/mach/i86/libsys/write.s @@ -0,0 +1,7 @@ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define _write +.extern _write, cerror +_write: int 0x84 + jb 9f + ret +9: jmp cerror