tty-size.sl 676 B

123456789101112131415161718192021222324
  1. % JSYS call to get dimensions of "TTY" screen.
  2. % Written by M. L. Griss. Modifications by William Galway.
  3. % **** SubField should be included as part of the JSYS system? ****
  4. % Return a subfield from a "word". (Bit 0 is leftmost on DEC-20.)
  5. % (FieldSize might be better?)
  6. (DM SubField (args)
  7. `(Land ,(indx args 3)
  8. (LSH ,(indx args 1)
  9. (difference ,(indx args 2)
  10. 35))))
  11. % Return JFN mode word for terminal.
  12. (DE TTyWord ()
  13. (JSYS2 8#101 0 0 0 8#107)) % jsRFMOD
  14. % Return system's idea of the terminal's "page length".
  15. (DE PageLength ()
  16. (SubField (TTyWord) 10 8#177))
  17. (DE PageWidth ()
  18. (SubField (TTyWord) 17 8#177))