.title dfind ; ; this routine implements the following fortran interface ; ; status = dfind(desc, buf) ; ; where desc is the RFDB address returned by dopen ; buf is an array to hold the file name, type and version ; ; status = OK if another file was found in the directory ; EOF if no more files in the directory ; .mcall fdof$l, nbof$l fdof$l nbof$l ap=%5 desc=2 buf=4 .psect $r.roi,con,ro,rel,lcl,i .enabl lsb dfind:: mov @desc(ap),r1 ; RFDB address in r1 mov r.fdb(r1),r0 ; FDB address mov r0,r1 ; FDB address in r1 add #f.fnb,r1 ; FNB address in r1 call .find ; find next directory entry bcs 10$ ; if c set, no more files mov buf(ap),r0 ; output buffer address call r$cvtf ; get ascii file name mov #ok,r0 ; return OK return 10$: mov #eof,r0 ; return EOF return .end