ack/mach/xenix3/libsys/sys.s

68 lines
677 B
ArmAsm
Raw Permalink Normal View History

1987-10-06 16:39:14 +00:00
.sect .text; .sect .rom; .sect .data; .sect .bss
1987-10-30 15:35:50 +00:00
.define sysal, sysn, sysnl, sysnx, sysc, syse, cerror, _errno
1987-10-06 16:39:14 +00:00
.sect .bss
.comm _errno, 2
.sect .text
sysal:
push bp
mov bp,sp
push di
push si
mov di,10(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
mov dx,bx
pop si
pop di
pop bp
jb cerror
ret
syse:
mov bx,sp
add bx,2
call syscal
cerror:
mov (_errno),ax
mov ax,-1
cwd
ret
sysn:
mov bx,sp
add bx,2
call syscal
jb cerror
ret
sysnl:
mov bx,sp
add bx,2
call syscal
jb cerror
mov dx,bx
ret
sysnx:
mov bx,sp
add bx,2
call syscal
jb cerror
xchg bx,ax
ret
sysc:
mov bx,sp
add bx,2
call syscal
jb cerror
xor ax,ax
cbw
ret