VT52.def 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. DEFINITION MODULE VT52;
  2. (*#
  3. # All codes below are for use in VT52 compatibility mode.
  4. #
  5. altkeypad Enter alternate keypad mode ^[=
  6. numkeypad Exit alternate keypad mode ^[>
  7. setgr Use special graphics character set ^[F
  8. resetgr Use normal US/UK character set ^[G
  9. cursorup Move cursor up one line ^[A
  10. cursordn Move cursor down one line ^[B
  11. cursorrt Move cursor right one char ^[C
  12. cursorlf Move cursor left one char ^[D
  13. cursorhome Move cursor to upper left corner ^[H
  14. cursorpos(v,h) Move cursor to v,h location ^[Y<v><h>
  15. revindex Generate a reverse line-feed ^[I
  16. cleareol Erase to end of current line ^[K
  17. cleareos Erase to end of screen ^[J
  18. ident Identify what the terminal is ^[Z
  19. identresp Correct response to ident ^[/Z
  20. Cursor positioning
  21. The ESC Y code was used to position the cursor anywhere on the screen, using two parameters
  22. representing the X and Y coordinates of the cursor position, with the upper left corner of the screen being
  23. position 1,1. These numbers were sent as ASCII characters of that value, adding 31. For instance, to
  24. position the cursor at column 30 and line 20, you would add 31 to each value to get 61 and 51, then look
  25. up those ASCII characters, = and 3 . The complete command would then be ESC Y 3 = (note the
  26. row, column ordering, not X, Y).[10] Adding 31 ensures that the characters are shifted out of the control
  27. range into the printable character range, so they will transmit properly.
  28. Terminal identifier codes
  29. The ESC Z command allowed the host computer to identify the capabilities of the terminal. There were
  30. eight possible responses.
  31. ModelWithout printerWith printer
  32. VT50ESC / A(not available)
  33. VT50HESC / HESC / J
  34. VT52ESC / KESC / L
  35. VT55ESC / EESC / E
  36. Enter/exit ANSI mode (VT52) ESC <
  37. *)
  38. PROCEDURE vt52;
  39. PROCEDURE altkeypad;
  40. PROCEDURE numkeypad;
  41. PROCEDURE setgr;
  42. PROCEDURE resetgr;
  43. PROCEDURE cursorup;
  44. PROCEDURE cursordn;
  45. PROCEDURE cursorrt;
  46. PROCEDURE cursorlf;
  47. PROCEDURE cursorhome;
  48. PROCEDURE cursorpos(X : CARDINAL; y : CARDINAL);
  49. PROCEDURE revindex;
  50. PROCEDURE cleareol;
  51. PROCEDURE cleareos;
  52. PROCEDURE ident;
  53. PROCEDURE identresp;
  54. PROCEDURE cls;
  55. END VT52.