;;;-*-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: ;; ( . ) (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)))