t88_fileops.pas 764 B

1234567891011121314151617181920212223242526
  1. program t88_fileops;
  2. { t88 -- the file control-block operations CALC.INC's Exist uses:
  3. assign(F, 'T88.DAT');
  4. reset(F); (with I/O checking disabled)
  5. if IOResult <> 0 then ...
  6. close(F)
  7. Assign copies the counted filename into the file variable, Reset asks DOS
  8. to open it, IOResult returns the DOS status and clears it, and Close closes
  9. the handle. The boot harnesses have no filesystem, so this fixture checks
  10. the missing-file path: both oracles answer AH=3Dh with CF set and AX=2,
  11. exactly as DOS does when the file is absent. The success path needs a real
  12. filesystem and is not executed here. }
  13. var
  14. F : file;
  15. begin
  16. assign (F, 'T88.DAT') ;
  17. {$I-}
  18. reset (F) ;
  19. {$I+}
  20. writeln (IOResult <> 0) ;
  21. close (F)
  22. end.