crt.sl 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. % CRT.SL.14 07 April 83
  2. % derived from <NOVAK>H19.PSL.1 20-Mar-83 12:40:06
  3. % Written by Gordon Novak Jr.
  4. % Copyright (c) 1983 Hewlett-Packard
  5. (GLOBAL '(TERMINAL))
  6. (GLISPOBJECTS
  7. (TERMINAL ATOM
  8. MSG ((MOVETOXY TERMINAL-MOVETOXY)
  9. (PRINTCHAR TERMINAL-PRINTCHAR OPEN T)
  10. (PRINTSTRING TERMINAL-PRINTSTRING)
  11. (INVERTVIDEO (nil))
  12. (NORMALVIDEO (nil))
  13. (GRAPHICSMODE (nil))
  14. (NORMALMODE (nil))
  15. (ERASEEOL ((PBOUT (CHAR ESC))
  16. (PBOUT (char K))))))
  17. )
  18. (GLISPGLOBALS
  19. (TERMINAL TERMINAL)
  20. )
  21. (GLISPCONSTANTS
  22. (BLANKCHAR 32 integer)
  23. (HORIZONTALLINECHAR 45 integer)
  24. (HORIZONTALBARCHAR 95 integer)
  25. (LVERTICALBARCHAR 124 integer)
  26. (RVERTICALBARCHAR 124 integer)
  27. (escapechar 27 INTEGER)
  28. )
  29. % edited: 14-Mar-83 22:48
  30. % Move cursor to a specified X Y position.
  31. (DG TERMINAL-MOVETOXY (TERM:TERMINAL X:INTEGER Y:INTEGER)
  32. (IF X<0 THEN X_0 ELSEIF X>79 X_79)(IF Y<0 THEN Y_0 ELSEIF Y>23 THEN Y_23)(SEND
  33. TERMINAL PRINTCHAR (CHAR ESC))(SEND TERMINAL PRINTCHAR (char Y))(SEND
  34. TERMINAL PRINTCHAR (55 - Y))(SEND TERMINAL PRINTCHAR
  35. (32 + X)))
  36. % edited: 19-Mar-83 20:29
  37. (DG TERMINAL-PRINTCHAR (TERM:TERMINAL S:STRING)
  38. (PBOUT S))
  39. % edited: 19-Mar-83 20:29
  40. (DG TERMINAL-PRINTSTRING (TERM:TERMINAL S:STRING)
  41. (prog (i n)
  42. (if s is not a string then (S _ (gevstringify s)))
  43. (n _ s:length)
  44. (i _ 0)
  45. (while (i<n) do (pbout (indx s i)) (i _+ 1)) ))
  46. (SETQ TERMINAL 'VT52)