System information
 010D 111502  lxi d,badver
 0110 CDD501  call print
 0113 C30000   jmp reboot
 ;
 versok:
 ; correct version for random access
 0116 0E0F  mvi c,openf ; open default fcb
 0118 115C00   lxi d,fcb
 011B CD0500  call  bdos
 011E 3C  inr a ; err 255 becomes zero
 011F C23701   jnz  ready
 ;
 ; cannot open file, so create it
 0122 0E16  mvi c,makef
 0124 115C00  lxi d,fcb
 0127 CD0500 call bdos
 012A 3C  inr a ; err 255 becomes zero
 012B C23701   jnz ready
 ;
 ; cannot create file, directory full
 012E 113402   lxi  d,nospace
 0131 CDD501  call print
 0134 C30000  jmp reboot ; back tp CCP
 ;
 ; loop back to ready after each read command
 ;
 ready:
 ; file is ready for processing
 ;
 0137 CDE001  call readcom ; read next command
 013A 227D00 shld ranrec ; store input record #
 013D 217F00  lxi h,ranovf
 0140 3600  mvi m,0  ; clear high byte if set
 0142 FE51  cpi  'Q'  ; Quit?
 0144 C25601   jnz notq
 ; quit processing, close file
 0147 0E10  mvi c,closef
 0149 115C00  lxi d,fcb
 014C CD0500  call bdos
5.5 A Sample Random Access Program CP/M Operating System Manual
5-48










