.title fdel ; ; subroutine to delete a file opened by the software tools io ; primitives ; ; call sequence status = fdel(rab) ; ; where rab is the integer descriptor from an openf call ; status is OK(0) or ERR(-3) ; rab=4 ok=0 err=-3 .psect st_pure_code rel,con,lcl,exe,nowrt,rd,pic,shr,usr,novec,long .entry fdel ^m movl @rab(ap),r3 ; rab address in r3 movl rab$l_fab(r3),r2 ; fab address in r2 pushal @rab(ap) ; place address on stack calls #1,closef ; make sure file is closed $erase fab=r2 ; delete file blbc r0,error ; low bit clear => error movl #ok,r0 ; return success status ret error: movl #err,r0 ; return error status ret .end