libmon_s.a
+_alarm.s
+_sbrk.s
+_brk.s
+_close.s
+_execl.s
+_execve.s
+_fork.s
+_fstat.s
+_ftime.s
+_getpid.s
+_gtty.s
+_ioctl.s
+_kill.s
+_link.s
+_lseek.s
+_open.s
+_pause.s
+_pipe.s
+_read.s
+_unlink.s
+_wait.s
+_write.s
exit.s
_exit.s
abort.s
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __alarm
+.extern __alarm, cerror
+__alarm: int 0x9b
+ jb 9f
+ ret
+9:
+ jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __brk
+.define xbrk
+.define np
+.extern __brk
+.extern xbrk,endbss
+.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 endbss
+.sect .text
--- /dev/null
+.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
--- /dev/null
+.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
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __execve
+.extern __execve, cerror
+__execve:
+ int 0x8b
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.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
--- /dev/null
+.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
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __ftime
+.extern __ftime, cerror
+__ftime: int 0xa3
+ jb 9f
+ ret
+9:
+ jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __getpid
+.extern __getpid, cerror
+__getpid: int 0x94
+ jb 9f
+ ret
+9:
+ jmp cerror
--- /dev/null
+.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,0x5401
+push ax
+push 4(bp)
+call __ioctl
+add sp,6
+mov sp,bp
+pop bp
+ret
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __ioctl
+.extern __ioctl, cerror
+__ioctl: int 0xb6
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.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
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __link
+.extern __link, cerror
+__link: int 0x89
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __lseek
+.extern __lseek, cerror
+__lseek: int 0x93
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __open
+.extern __open, cerror
+__open: int 0x85
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __pause
+.extern __pause, cerror
+__pause: int 0x9d
+ jb 9f
+ ret
+9:
+ jmp cerror
--- /dev/null
+.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
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __read
+.extern __read, cerror
+__read: int 0x83
+ jb 9f
+ ret
+9: jmp cerror
--- /dev/null
+.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
--- /dev/null
+.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
--- /dev/null
+.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
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
+.define __write
+.extern __write, cerror
+__write: int 0x84
+ jb 9f
+ ret
+9: jmp cerror