pascal-support.red 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. { XXX Support Routines, Test Version
  2. M. L. Griss, and S. Lowder 9 July 1982
  3. }
  4. Var Ctime:Integer; { For CPU Time }
  5. Procedure XXX_Init(var c:integer);
  6. begin
  7. WriteLn(Output, ' Init the XXX package ',c);
  8. Ctime :=10*SysClock; { First Call on Timer }
  9. end;
  10. Procedure XXX_PutC(var c:integer);
  11. begin
  12. Write(Output,chr(c));
  13. end;
  14. Procedure XXX_GetC(var c:integer);
  15. var ch:char;
  16. begin
  17. read(keyboard,ch);
  18. c := ord(ch);
  19. end;
  20. Procedure XXX_TimC(var c:integer);
  21. var i:integer;
  22. begin
  23. i:=10* SysClock; {Call timer again}
  24. c := i-Ctime;
  25. Writeln(Output,' Ctime ', i, c);
  26. Ctime := i;
  27. end;
  28. Procedure XXX_Quit(var c:integer); { close files, cleanup and exit }
  29. begin
  30. Writeln(Output,' Quitting ');
  31. ESCAPE(0); { "normal" exit, ie HALT}
  32. end;
  33. Procedure XXX_Err(var c:integer);
  34. begin
  35. Writeln(Output,' XXX Error call Number: ', c);
  36. ESCAPE(c);
  37. end;
  38. Procedure XXX_PutI(var c:integer); { Print an Integer }
  39. begin
  40. Writeln(Output,' PutI: ', c);
  41. end;
  42. end.