set-terminal-20.sl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %
  3. % Set-Terminal-20.SL (Tops-20 Version)
  4. %
  5. % Author: Alan Snyder
  6. % Hewlett-Packard/CRC
  7. % Date: 1 November 1982
  8. %
  9. % This file contains functions that set NMODE's terminal.
  10. %
  11. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  12. (BothTimes (load objects))
  13. % External variables used here:
  14. (fluid '(nmode-terminal))
  15. % Global variables defined here:
  16. (fluid '(terminal-type))
  17. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  18. % Terminal Selection Functions:
  19. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  20. (de nmode-default-terminal ()
  21. (nmode-set-terminal)
  22. )
  23. (de nmode-set-terminal ()
  24. (setf terminal-type (jsys2 65 0 0 0 (const jsgttyp)))
  25. (selectq terminal-type
  26. (21 % HP2621
  27. (ensure-terminal-type 'hp2648a)
  28. )
  29. (6 % HP264X
  30. (ensure-terminal-type 'hp2648a)
  31. )
  32. (15 % VT52
  33. (ensure-terminal-type 'vt52x)
  34. )
  35. (t
  36. (or nmode-terminal (ensure-terminal-type 'hp2648a))
  37. )
  38. ))
  39. (de ensure-terminal-type (type)
  40. (cond ((or (null nmode-terminal)
  41. (not (eq type (object-type nmode-terminal))))
  42. (setf nmode-terminal (make-instance type))
  43. (nmode-new-terminal)
  44. )))
  45. % These functions defined for compatibility:
  46. (de hp2648a () (ensure-terminal-type 'hp2648a))
  47. (de vt52x () (ensure-terminal-type 'vt52x))