.TITLE GETPUT - GET/PUT RECORDS FROM FILE .IDENT /01/ .ENABL LC ;+ ; ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided ; or otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: GETPUT ; Author: Robin Miller ; Date: January 9, 1982 ; ; Description: ; ; This module is used to GET the next record from the input file ; or to PUT specified records to an output file. ; ; Modification History: ; ;- .ENABL AMA .MCALL GET$ ;+ ; ; GET - Get next record from the input file. ; ; This routine gets the next record from the input file. If end of file ; is encountered, it will also set B.EOF in the status word. ; ; Inputs: ; FDBADR = Address of the FDB. ; ; Outputs: ; C bit set if error occurs. ;+ GET:: MOV R0,-(SP) ; SAVE R0 ON THE STACK MOV FDBADR,R0 ; COPY THE FDB ADDRESS BIC #B.EOF,STATUS ; PRESUME NOT END OF FILE GET$ R0,#BUFFER,#BUFSIZ ; GET THE NEXT RECORD BCC 30$ ; IF CC, SUCCESS CMPB F.ERR(R0),#IE.EOF ; WAS ERROR END OF FILE ? BNE 10$ ; IF NE, NO (REPORT ERROR) BIS #B.EOF,STATUS ; YEP, SET IN STATUS WORD BR 20$ ; AND CONTINUE ... 10$: CALL FCSERR ; REPORT THE ERROR 20$: SEC ; SHOW FAILURE 30$: MOV (SP)+,R0 ; RESTORE R0 RETURN .END