(loader '((title |virtty.lo|))) (if (not (>= (version) 15.2)) (progn (error 'load 'erricf 'virtty))) (add-feature 'virtty) (defvar #:sys-package:tty 'tty) (loader'((fentry tyod subr2) (entry tyod subr2) (push a2) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyod) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (push (& 4)) (mov '3 a4) (jmp funcall) 101 (eval ()) (adjstk '2) (return) )) (loader'((fentry #:tty:tyod subr2) (entry #:tty:tyod subr2) (push a1) (cnbgt a2 '1 103) (cnble a1 '9 102) 103 (quo '10 a1) (diff '1 a2) (jcall #:tty:tyod) 102 (push (@ 104)) (mov (& 1) a4) (rem '10 a4) (mov '48 a3) (plus a4 a3) (push a3) (mov '1 a4) (jmp tyo) 104 (eval ()) (adjstk '1) (return) )) (loader'((fentry to-tty dmsubr) (entry to-tty dmsubr) (mov (cdr a1) a4) (mov (car a1) a1) (push a4) (push (@ 101)) (push 'funcall) (push (@ 102)) (push 'getfn) (push '#:sys-package:tty) (push a1) (push '(())) (mov '4 a4) (jmp mcons) 102 (eval ()) (push a1) (push (& 3)) (mov '3 a4) (jmp mcons) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry get-tty dmsubr) (entry get-tty dmsubr) (mov (car a1) a1) (push (@ 101)) (push 'symeval) (push (@ 102)) (push 'getsymb) (push '#:sys-package:tty) (push a1) (push '(())) (mov '4 a4) (jmp mcons) 102 (eval ()) (push a1) (mov '2 a4) (jmp list) 101 (eval ()) (return) )) (loader'((fentry tyerror subr1) (entry tyerror subr1) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyerror) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (mov '2 a4) (jmp funcall) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry typrologue subr0) (entry typrologue subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'typrologue) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tyepilogue subr0) (entry tyepilogue subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyepilogue) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tycleol subr0) (entry tycleol subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tycleol) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tycleos subr0) (entry tycleos subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tycleos) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tybeep subr0) (entry tybeep subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tybeep) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tyinsch subr1) (entry tyinsch subr1) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyinsch) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (mov '2 a4) (jmp funcall) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry tydelch subr0) (entry tydelch subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tydelch) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tyinscn subr1) (entry tyinscn subr1) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyinscn) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (mov '2 a4) (jmp funcall) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry tydelcn subr1) (entry tydelcn subr1) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tydelcn) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (mov '2 a4) (jmp funcall) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry tyinsln subr0) (entry tyinsln subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tyinsln) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tydelln subr0) (entry tydelln subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tydelln) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tyattrib nsubr) (entry tyattrib nsubr) (jcall #:llcp:nlist) (push a1) (bfnil a1 101) (push (@ 103)) (push (cvalq #:sys-package:tty)) (push 'tyattrib) (push nil) (mov '3 a4) (jmp getsymb) 103 (eval ()) (mov (cval a1) a1) (adjstk '1) (return) 101 (push (@ 104)) (push (@ 105)) (push (cvalq #:sys-package:tty)) (push 'tyattrib) (push nil) (mov '3 a4) (jmp getfn) 105 (eval ()) (push a1) (mov (& 2) a4) (push (car a4)) (mov '2 a4) (jmp funcall) 104 (eval ()) (push (@ 106)) (push (cvalq #:sys-package:tty)) (push 'tyattrib) (push nil) (mov '3 a4) (jmp getsymb) 106 (eval ()) (mov (& 0) a4) (mov (car a4) (cval a1)) (mov (car a4) a1) (adjstk '1) (return) )) (loader'((fentry tybs subr1) (entry tybs subr1) (push a1) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tybs) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (push (& 2)) (mov '2 a4) (jmp funcall) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry tycr subr0) (entry tycr subr0) (push (@ 101)) (push (@ 102)) (push (cvalq #:sys-package:tty)) (push 'tycr) (push nil) (mov '3 a4) (jmp getfn) 102 (eval ()) (push a1) (mov '1 a4) (jmp funcall) 101 (eval ()) (return) )) (loader'((fentry tyshowcursor nsubr) (entry tyshowcursor nsubr) (jcall #:llcp:nlist) (push a1) (bfnil a1 101) (push (@ 103)) (push (cvalq #:sys-package:tty)) (push 'tyshowcursor) (push nil) (mov '3 a4) (jmp getsymb) 103 (eval ()) (mov (cval a1) a1) (adjstk '1) (return) 101 (push (@ 104)) (push (@ 105)) (push (cvalq #:sys-package:tty)) (push 'tyshowcursor) (push nil) (mov '3 a4) (jmp getfn) 105 (eval ()) (push a1) (mov (& 2) a4) (push (car a4)) (mov '2 a4) (jmp funcall) 104 (eval ()) (push (@ 106)) (push (cvalq #:sys-package:tty)) (push 'tyshowcursor) (push nil) (mov '3 a4) (jmp getsymb) 106 (eval ()) (mov (& 0) a4) (mov (car a4) (cval a1)) (mov (car a4) a1) (adjstk '1) (return) )) (loader'((fentry tyname subr0) (entry tyname subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'name) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tyxmax subr0) (entry tyxmax subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'xmax) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tyymax subr0) (entry tyymax subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'ymax) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tyupkey subr0) (entry tyupkey subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'up) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tydownkey subr0) (entry tydownkey subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'down) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tyleftkey subr0) (entry tyleftkey subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'left) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry tyrightkey subr0) (entry tyrightkey subr0) (push (@ 101)) (push (cvalq #:sys-package:tty)) (push 'right) (push nil) (mov '3 a4) (jmp getsymb) 101 (eval ()) (mov (cval a1) a1) (return) )) (loader'((fentry #:tty:tyerror subr1) (entry #:tty:tyerror subr1) (mov nil a1) (return) )) (loader'((fentry #:tty:typrologue subr0) (entry #:tty:typrologue subr0) (mov nil a1) (return) )) (loader'((fentry #:tty:tyepilogue subr0) (entry #:tty:tyepilogue subr0) (mov nil a1) (return) )) (loader'((fentry #:tty:tycleol subr0) (entry #:tty:tycleol subr0) (mov '(tycleol) a1) (jmp tyerror) )) (loader'((fentry #:tty:tycleos subr0) (entry #:tty:tycleos subr0) (mov '(tycleos) a1) (jmp tyerror) )) (loader'((fentry #:tty:tybeep subr0) (entry #:tty:tybeep subr0) (push (@ 101)) (push '7) (mov '1 a4) (jmp tyo) 101 (eval ()) (return) )) (loader'((fentry #:tty:tyinsch subr1) (entry #:tty:tyinsch subr1) (push (@ 101)) (push 'tyinsch) (push a1) (mov '2 a4) (jmp list) 101 (eval ()) (jmp tyerror) )) (loader'((fentry #:tty:tyinscn subr1) (entry #:tty:tyinscn subr1) (push (@ 101)) (push 'tyinscn) (push a1) (mov '2 a4) (jmp list) 101 (eval ()) (jmp tyerror) )) (loader'((fentry #:tty:tydelch subr0) (entry #:tty:tydelch subr0) (mov '(tydelch) a1) (jmp tyerror) )) (loader'((fentry #:tty:tydelcn subr1) (entry #:tty:tydelcn subr1) (jmp tydelch) )) (loader'((fentry #:tty:tyinsln subr0) (entry #:tty:tyinsln subr0) (mov '(tyinsln) a1) (jmp tyerror) )) (loader'((fentry #:tty:tydelln subr0) (entry #:tty:tydelln subr0) (mov '(tydelln) a1) (jmp tyerror) )) (loader'((fentry #:tty:tyattrib subr1) (entry #:tty:tyattrib subr1) (push (@ 101)) (push 'tyattrib) (push a1) (mov '2 a4) (jmp list) 101 (eval ()) (jmp tyerror) )) (loader'((fentry #:tty:tybs subr1) (entry #:tty:tybs subr1) (push (@ 101)) (push '8) (mov '1 a4) (jmp tyo) 101 (eval ()) (return) )) (loader'((fentry #:tty:tycr subr0) (entry #:tty:tycr subr0) (push (@ 101)) (push '13) (mov '1 a4) (jmp tyo) 101 (eval ()) (return) )) (loader'((fentry #:tty:tyshowcursor subr1) (entry #:tty:tyshowcursor subr1) (push (@ 101)) (push 'tyshowcursor) (push a1) (mov '2 a4) (jmp list) 101 (eval ()) (jmp tyerror) )) (defvar #:tty:tyattrib ()) (defvar #:tty:tyshowcursor ()) (defvar #:tty:name 'dumb) (defvar #:tty:xmax 79) (defvar #:tty:ymax 23) (defvar #:tty:up 16) (defvar #:tty:down 14) (defvar #:tty:left 2) (defvar #:tty:right 6) (loader'((fentry tyco nsubr) (entry tyco nsubr) (cnbge a4 '3 0) (mov 'tyco a1) (mov '3 a2) (jmp #:llcp:errwna) 0 (diff '3 a4) (jcall #:llcp:nlist) (push a1) (mov (& 2) a2) (mov (& 3) a1) (jcall tycursor) (push (@ 101)) (push (& 2)) (mov '1 a4) (jmp tyo) 101 (eval ()) 102 (btnil (& 0) 103) (push (@ 104)) (mov (& 1) a4) (mov (cdr a4) (& 1)) (push (car a4)) (mov '1 a4) (jmp tyo) 104 (eval ()) (bra 102) 103 (mov nil a1) (adjstk '4) (return) )) (loader'((fentry tycot nsubr) (entry tycot nsubr) (cnbge a4 '3 0) (mov 'tycot a1) (mov '3 a2) (jmp #:llcp:errwna) 0 (diff '3 a4) (jcall #:llcp:nlist) (push a1) (mov (& 2) a2) (mov (& 3) a1) (jcall tycursor) (push (@ 101)) (push 't) (mov '1 a4) (jmp tyattrib) 101 (eval ()) (push (@ 102)) (push (& 2)) (mov '1 a4) (jmp tyo) 102 (eval ()) 103 (btnil (& 0) 104) (push (@ 105)) (mov (& 1) a4) (mov (cdr a4) (& 1)) (push (car a4)) (mov '1 a4) (jmp tyo) 105 (eval ()) (bra 103) 104 (push (@ 106)) (push nil) (mov '1 a4) (jmp tyattrib) 106 (eval ()) (adjstk '4) (return) )) (loader'((fentry initty nsubr) (entry initty nsubr) (jcall #:llcp:nlist) (bfcons a1 101) (mov (car a1) a2) (bra 102) 101 (mov '"TERM" a1) (jcall getenv) (mov a1 a2) (bfnil a2 102) (jcall system) (mov a1 a2) 102 (mov nil a1) (jcall symbol) (mov a1 (cvalq #:tty:name)) (btnil (cvalq #:sys-package:tty) 106) (jcall string) (push a1) (mov (cvalq #:sys-package:tty) a1) (jcall string) (mov a1 a2) (pop a1) (jcall equal) (bfnil a1 104) 106 (push (@ 107)) (push (cvalq #:system:virtty-directory)) (push (cvalq #:tty:name)) (push (cvalq #:system:lelisp-extension)) (mov '3 a4) (jmp catenate) 107 (eval ()) (push a1) (jcall probefile) (btnil a1 108) (mov 't a2) (mov (& 0) a1) (jcall loadfile) (bra 109) 108 (push 't) (push (cvalq #:system:error-flag)) (mov (& 1) (cvalq #:system:error-flag)) (push '1) (push '(#:system:error-flag)) (push 'lambda) (push llink) (push dlink) (push cbindn) (stack dlink) (push (@ 111)) (push '#:system:error-tag) (push dlink) (push tag) (stack dlink) (mov '(termcap) a1) (jcall libload) (push (@ 112)) (push '#:termcap:compile) (push (cvalq #:tty:name)) (push (& 15)) (mov '3 a4) (jmp funcall) 112 (eval ()) (push (@ 113)) (push 'termcap) (mov '1 a4) (jmp oblist) 113 (eval ()) (push a1) 114 (bfcons (& 0) 115) (mov (& 0) a1) (mov (cdr a1) (& 0)) (mov (car a1) a1) (jcall remob) (bra 114) 115 (adjstk '1) (mov 't a2) (mov (& 12) a1) (jcall loadfile) (jcall ncons) (mov (& 1) dlink) (adjstk '4) 111 (eval ()) (mov (& 1) dlink) (mov (& 6) (cvalq #:system:error-flag)) (adjstk '8) (jcall consp) (bfnil a1 109) (push 't) (push (cvalq #:system:error-flag)) (mov (& 1) (cvalq #:system:error-flag)) (push '1) (push '(#:system:error-flag)) (push 'lambda) (push llink) (push dlink) (push cbindn) (stack dlink) (push (@ 116)) (push '#:system:error-tag) (push dlink) (push tag) (stack dlink) (mov '(terminfo) a1) (jcall libload) (push (@ 117)) (push '#:terminfo:compile) (push (cvalq #:tty:name)) (push (& 15)) (mov '3 a4) (jmp funcall) 117 (eval ()) (push (@ 118)) (push 'terminfo) (mov '1 a4) (jmp oblist) 118 (eval ()) (push a1) 119 (bfcons (& 0) 120) (mov (& 0) a1) (mov (cdr a1) (& 0)) (mov (car a1) a1) (jcall remob) (bra 119) 120 (adjstk '1) (mov 't a2) (mov (& 12) a1) (jcall loadfile) (jcall ncons) (mov (& 1) dlink) (adjstk '4) 116 (eval ()) (mov (& 1) dlink) (mov (& 6) (cvalq #:system:error-flag)) (adjstk '8) (jcall consp) 109 (mov (cvalq #:tty:name) a1) (adjstk '1) (return) 104 (mov nil a1) (return) )) (loader '((end)))