t91_textout.pas 614 B

123456789101112131415161718192021222324
  1. program t91_textout;
  2. { t91 -- text-file output. CALC.INC's Print does
  3. Writeln(MCFile);
  4. Write(MCFile, ' ');
  5. writeln(MCFile, Line);
  6. These are lowered to DOS INT 21h AH=40h writes: CRLF for the bare
  7. Writeln, one CHAR for the space, and a length-prefixed STRING followed by
  8. CRLF for the line. Compile-only: neither boot harness has a filesystem, so
  9. there is no execution oracle for a successful text-file write. }
  10. var
  11. F : text;
  12. begin
  13. assign (F, 'T91.TXT');
  14. rewrite (F);
  15. writeln (F);
  16. write (F, ' ');
  17. writeln (F, 'hello');
  18. close (F);
  19. writeln ('text output compiled')
  20. end.