Interdata_v6/usr/source/liba/src.a
ebrk.s [ brk title unix c svc library -- sbrk, brk
entry sbrk,brk
extrn end
r0 equ 0
r1 equ 1
sp equ 7
rf equ 15
impur
svcbrk svc 14,17
top dc a(end)
pure
brk equ *
l r0,top previous top
l r1,0(sp) new top
b dosvc
*
sbrk equ *
l r0,top previous top
lr r1,r0
a r1,0(sp) add increment
dosvc equ *
st r1,top new top
svc 14,0
dc a(svcbrk) * set new break *
bncr rf ok - return
st r0,errno error
lcs r0,1
br rf
errno comn
das 1
ends
end
chdir.s [9 H chdir title unix c svc library -- chdir
entry chdir
r0 equ 0
rf equ 15
sp equ 7
*
impur
chdirsvc equ *
svc 14,12
dirname dc a(*-*)
*
pure
chdir equ *
l r0,0(sp) dirname
st r0,dirname
svc 14,0
dc a(chdirsvc)
bc error
lis r0,0
br rf
error equ *
st r0,errno
lcs r0,1 error return
br rf
errno comn
das 1
ends
end
chmod.s [Z m chmod title unix c svc library -- chmod
entry chmod
r0 equ 0
rf equ 15
sp equ 7
*
impur
chmodsvc equ *
svc 14,15
name dc a(*-*)
mode dc a(*-*)
*
pure
chmod equ *
l r0,0(sp) name
st r0,name
l r0,adc(sp) mode
st r0,mode
svc 14,0
dc a(chmodsvc)
bc error
lis r0,0
br rf
error equ *
st r0,errno
lcs r0,1 error return
br rf
errno comn
das 1
ends
end
chown.s [n p chown title unix c svc library -- chown
entry chown
r0 equ 0
rf equ 15
sp equ 7
*
impur
chownsvc equ *
svc 14,16
name dc a(*-*)
owner dc a(*-*)
*
pure
chown equ *
l r0,0(sp) name
st r0,name
l r0,adc(sp) owner
st r0,owner
svc 14,0
dc a(chownsvc)
bc error
lis r0,0
br rf
error equ *
st r0,errno
lcs r0,1 error return
br rf
errno comn
das 1
ends
end
close.s [ close title unix c svc library -- close
entry close
r0 equ 0
rf equ 15
sp equ 7
*
pure
close equ *
l r0,0(sp) file descriptor
svc 14,6
bc error
lis r0,0 normal return
br rf
error equ *
st r0,errno
lcs r0,1 error return
br rf
errno comn
das 1
ends
end
icreat.s \ h creat title unix c svc library -- creat
entry creat
r0 equ 0
rf equ 15
sp equ 7
*
impur
creatsvc equ *
svc 14,8
fname dc a(*-*)
mode dc a(*-*)
*
pure
creat equ *
l r0,0(sp) filename
st r0,fname
l r0,adc(sp) mode
st r0,mode
svc 14,0
dc a(creatsvc)
bc error
br rf
error equ *
st r0,errno
lcs r0,1 error return
br rf
errno comn
das 1
ends
end
csw.s , t csw title unix c svc library -- csw
entry csw
r0 equ 0
rf equ 15
sp equ 7
*
pure
csw equ *
svc 14,38
br rf
end
dup.s \>