VT52.def 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. DEFINITION MODULE VT52;
  2. (*
  3. Strict DEC VT52 escape sequences.
  4. No VT100/ANSI CSI. Pure ESC emitter, plus Unbuffered/Buffered
  5. input-mode helpers (termios) for reading device replies.
  6. Direct cursor address is ESC Y row col with +31 offset.
  7. *)
  8. PROCEDURE EnterAnsi; (* ESC < : enter ANSI mode *)
  9. PROCEDURE SetAltKeypad; (* ESC = : alternate keypad *)
  10. PROCEDURE SetNumKeypad; (* ESC > : numeric keypad *)
  11. PROCEDURE SetGraphics; (* ESC F : special graphics charset *)
  12. PROCEDURE SetAscii; (* ESC G : normal US/UK charset *)
  13. PROCEDURE CursorUp; (* ESC A *)
  14. PROCEDURE CursorDown; (* ESC B *)
  15. PROCEDURE CursorRight; (* ESC C *)
  16. PROCEDURE CursorLeft; (* ESC D *)
  17. PROCEDURE CursorHome; (* ESC H *)
  18. PROCEDURE CursorPosition(row, col : CARDINAL); (* ESC Y r c, r=row+31, c=col+31 *)
  19. PROCEDURE ReverseFeed; (* ESC I : reverse line feed *)
  20. PROCEDURE ClearToEndOfLine; (* ESC K *)
  21. PROCEDURE ClearToEndOfScreen; (* ESC J *)
  22. PROCEDURE Identify; (* ESC Z *)
  23. PROCEDURE IdentifyResponse; (* ESC / Z *)
  24. (* Terminal input mode: call Unbuffered before reading device
  25. replies so no RETURN key is needed; call Buffered
  26. afterwards to restore the saved state. *)
  27. PROCEDURE Unbuffered;
  28. PROCEDURE Buffered;
  29. END VT52.