.title closef ; ; subroutine to close file opened by tools openf ; ; call sequence (from fortran) ; call closef(fdb) ; where fdb is the address returned by openf when file opened ; .mcall close$ ; ; local constants ; ok=0 err=-3 ap=%5 fdb=2 ; ; start of code ; closef:: mov @fdb(ap),r0 ; FDB address in r0 close$ ; close the file bcs clserr ; if c set, error closing the file mov #ok,r0 ; return success status return clserr: mov #err,r0 ; return error status return .end