title Module from library BASE_6 : CRERND name ('CRERND') maclib baselib.lib ; Create file with variable record length ; Copyright (C) Werner Cirsovius ; Hohe Weide 44 ; D-20253 Hamburg ; Tel.: +49-40-4223247 ; Version 1.1 June 1987 ; ENTRY Accu holds record length (1 .. 255) ; Reg pair BC holds max record number (1 .. 65535) ; Reg pair DE holds FCB of new file ; Reg pair HL holds pointer to 128 byte scratch area ; EXIT Carry set on error, either disk or parameter error ; New empty (filled with blanks) file created ; if carry reset, file opened entry crernd extrn open,create,@rndpr,@blrec,@outrc crernd: call @rndpr ; Test parameter ret c ; Error call open ; Test file on disk ccf ret c ; Yes, exit call create ; Else create it ret c ; Cannot do so call @blrec ; Prepare scratch jp @outrc ; Output records end