home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
forum16.lzh
/
SOFTWARE
/
ASSEMBLER
/
FPERMIT
/
fpermit.a
next >
Wrap
Text File
|
1991-01-09
|
898b
|
59 lines
nam fpermit
ttl subroutines with C interface to fpermit etc
use /dd/defs/oskdefs.d
Edition equ 1
Typ_lang equ 0
Attr_Rev equ (ReEnt<<8)+0
Stacksiz equ 16
psect fpermit,Typ_lang,Attr_Rev,Edition,Stacksiz,0
* status = FPermit (addr,size,permission)
FPermit:
link a5,#0
movem.l a2/d1,-(sp)
move.l d0,a2
move.l d1,d0
move.l 16(a7),d1
os9 F$Permit
testit bcs.s xerror
clr.l d0
endit movem.l (sp)+,a2/d1
final unlk a5
rts
xerror move.l d1,errno(a6)
move.l #-1,d0
bra.s endit
* status = FProtect (addr, size)
FProtect:
link a5,#0
movem.l a2/d1,-(sp)
move.l d0,a2
move.l d1,d0
os9 F$Protect
bra.s testit
* status = FGSPUMp (procid, addr, size)
FGSPUMp:
link a5,#0
movem.l a0/d2/d1,-(sp)
move.l 20(a7),d2
move.l d1,a0
os9 F$GSPUMp
bcs.s xerror2
clr.l d0
endit2 movem.l (sp)+,a0/d2/d1
bra.s final
xerror2 move.l d1,errno(a6)
move.l #-1,d0
bra.s endit2
ends