1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-22 10:32:13 +00:00
PDP-10.its/src/libdoc/ttyhak.gjc1

32 lines
1.0 KiB
Common Lisp
Executable File

;;;-*-lisp-*-
(herald ttyhak)
;;; opening an ITS tty channel for the rawest kind of
;;; input/output.
;;; This is for you hackers who like to download & debug micros
;;; and other randomness over tty lines.
;;; N.B. To set the line-speed you have to use the LSPEED program.
;;; The random bits to syscall used here are documented via
;;; :CALL TTYGET
(defun open-raw-tty (tty)
;; takes a hardwire line device spec. e.g. T37 is |T37:|
;; and returns a cons:
;; (<input-tty> . <output-tty>)
(let ((dbg-outfile (open tty '(out image single tty)))
(dbg-infile (open tty '(in fixnum single tty))))
(let (( (st1 st2 sts) (SYSCALL 3. 'TTYGET dbg-infile)))
;; this turns off the echoing of every character
;; group.
(setq st1 (logand st1 #o070707070707))
(setq st2 (logand st2 #o070707070707))
;; set %TSSII
;;this turns off special
;;interpetaion of ^_ and ^z
(setq sts (logior #.(lsh 2 18.) sts))
(syscall 0 'ttyset dbg-infile st1 st2 sts))
(cons dbg-infile dbg-outfile)))