;+ ; File i/o macros - does csi parsing and block or record i/o opens. ; The general usage: ; CSI ;data space ; fdblabel: ; FDB lun B/R [block] ;data space ; /\ ;block=block io buf ; B=block R=record ; ; ; FILE string-address string-len ;instruction space ; IF CC ;continue on success ; OPEN #fdblabel wrt/rd/upd/mod ;instruction space ; IF CC ;continue on success ; ; ; The output of the comment on usage for each macro is unnecessary ; but is used when one wants to just see the code that gets generated and ; runs the macro expander interactively. ;- $MACRO CSI .MCALL CSI$ CSI$ .EVEN CSIBLK:: .BLKB C.SIZE $ENDM ; $MACRO FILE ADDR-OF-STRING LEN-STR I%DOUT <;FILE addr-of-string len-str> ?? 4 .MCALL CSI$1,CSI$2 CSI$1 #CSIBLK,#@1,#@2 BCS #@4 CSI$2 ,OUTPUT #@4=. $ENDM ; $MACRO FDB lun,B/R,[block] I%DOUT <;FDB lun B/R,[block]> .mcall fdop$a,fdat$a,fdbdf$,fdrc$a,fdbk$a fdbdf$ fdop$a #@1,csiblk+c.dsds I%IDN <#@2> < fdat$a r.fix,,512.> I%IDN <#@2> < fdrc$a fd.rwm> I%IDN <#@2> < fdat$a r.var,fd.cr> I%NB <#@3> < fdbk$a #@3,512.> $ENDM ; $MACRO OPEN fdb RD/WRT/UPD/MOD I%DOUT <;OPEN fdb rd/wrt/upd/mod> .mcall open$ open$ #@1,#fo.#@2 $ENDM