(loader '((title |ttywindow.lo|))) (if (not (>= (version) 15.2)) (progn (error 'load 'erricf 'ttywindow))) (if (not (featurep 'virbitmap)) (progn (libload virbitmap))) (setq #:sys-package:colon 'window) (if (not (boundp '#:tty:window:tyshowcursor)) (progn (defvar #:tty:window:tyshowcursor t))) (putprop '#:image:rectangle:window:tty '((0 0 () () t '#:tty:window ()) cx cy lmargin rmargin tyshowcursor tty itsoft) 'defstruct) (loader'((fentry #:image:rectangle:window:tty:make subr0) (entry #:image:rectangle:window:tty:make subr0) (push (@ 101)) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push nil) (push '0) (push nil) (push nil) (push '0) (push '0) (push nil) (push nil) (push 't) (push '#:tty:window) (push nil) (mov '21 a4) (jmp vector) 101 (eval ()) (push a1) (push (@ 102)) (push a1) (push '#:image:rectangle:window:tty) (mov '2 a4) (jmp typevector) 102 (eval ()) (mov (& 0) a1) (adjstk '1) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:x '#:image:rectangle:window:tty:x 'setf-inverse) '#:image:rectangle:window:tty:x))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:x (struct . valeur) (ifn valeur (list 'vref struct 0) (list 'vset struct 0 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:y '#:image:rectangle:window:tty:y 'setf-inverse) '#:image:rectangle:window:tty:y))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:y (struct . valeur) (ifn valeur (list 'vref struct 1) (list 'vset struct 1 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:w '#:image:rectangle:window:tty:w 'setf-inverse) '#:image:rectangle:window:tty:w))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:w (struct . valeur) (ifn valeur (list 'vref struct 2) (list 'vset struct 2 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:h '#:image:rectangle:window:tty:h 'setf-inverse) '#:image:rectangle:window:tty:h))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:h (struct . valeur) (ifn valeur (list 'vref struct 3) (list 'vset struct 3 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:title '#:image:rectangle:window:tty:title 'setf-inverse) '#:image:rectangle:window:tty:title))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:title (struct . valeur) (ifn valeur (list 'vref struct 4) (list 'vset struct 4 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:hilited '#:image:rectangle:window:tty:hilited 'setf-inverse) '#:image:rectangle:window:tty:hilited))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:hilited (struct . valeur) (ifn valeur (list 'vref struct 5) (list 'vset struct 5 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:visible '#:image:rectangle:window:tty:visible 'setf-inverse) '#:image:rectangle:window:tty:visible))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:visible (struct . valeur) (ifn valeur (list 'vref struct 6) (list 'vset struct 6 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:graph-env '#:image:rectangle:window:tty:graph-env 'setf-inverse) '#:image:rectangle:window:tty:graph-env))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:graph-env (struct . valeur) (ifn valeur (list 'vref struct 7) (list 'vset struct 7 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:extend '#:image:rectangle:window:tty:extend 'setf-inverse) '#:image:rectangle:window:tty:extend))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:extend (struct . valeur) (ifn valeur (list 'vref struct 8) (list 'vset struct 8 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:father '#:image:rectangle:window:tty:father 'setf-inverse) '#:image:rectangle:window:tty:father))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:father (struct . valeur) (ifn valeur (list 'vref struct 9) (list 'vset struct 9 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:properties '#:image:rectangle:window:tty:properties 'setf-inverse) '#:image:rectangle:window:tty:properties))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:properties (struct . valeur) (ifn valeur (list 'vref struct 10) (list 'vset struct 10 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:cursor '#:image:rectangle:window:tty:cursor 'setf-inverse) '#:image:rectangle:window:tty:cursor))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:cursor (struct . valeur) (ifn valeur (list 'vref struct 11) (list 'vset struct 11 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:display '#:image:rectangle:window:tty:display 'setf-inverse) '#:image:rectangle:window:tty:display))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:display (struct . valeur) (ifn valeur (list 'vref struct 12) (list 'vset struct 12 (car valeur)))))) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:subwindows '#:image:rectangle:window:tty:subwindows 'setf-inverse) '#:image:rectangle:window:tty:subwindows))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:subwindows (struct . valeur) (ifn valeur (list 'vref struct 13) (list 'vset struct 13 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:cx nsubr) (entry #:image:rectangle:window:tty:cx nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:cx) (push '14) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:cx '#:image:rectangle:window:tty:cx 'setf-inverse) '#:image:rectangle:window:tty:cx))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:cx (struct . valeur) (ifn valeur (list 'vref struct 14) (list 'vset struct 14 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:cy nsubr) (entry #:image:rectangle:window:tty:cy nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:cy) (push '15) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:cy '#:image:rectangle:window:tty:cy 'setf-inverse) '#:image:rectangle:window:tty:cy))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:cy (struct . valeur) (ifn valeur (list 'vref struct 15) (list 'vset struct 15 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:lmargin nsubr) (entry #:image:rectangle:window:tty:lmargin nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:lmargin) (push '16) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:lmargin '#:image:rectangle:window:tty:lmargin 'setf-inverse) '#:image:rectangle:window:tty:lmargin))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:lmargin (struct . valeur) (ifn valeur (list 'vref struct 16) (list 'vset struct 16 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:rmargin nsubr) (entry #:image:rectangle:window:tty:rmargin nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:rmargin) (push '17) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:rmargin '#:image:rectangle:window:tty:rmargin 'setf-inverse) '#:image:rectangle:window:tty:rmargin))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:rmargin (struct . valeur) (ifn valeur (list 'vref struct 17) (list 'vset struct 17 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:tyshowcursor nsubr) (entry #:image:rectangle:window:tty:tyshowcursor nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:tyshowcursor) (push '18) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:tyshowcursor '#:image:rectangle:window:tty:tyshowcursor 'setf-inverse) '#:image:rectangle:window:tty:tyshowcursor))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:tyshowcursor (struct . valeur) (ifn valeur (list 'vref struct 18) (list 'vset struct 18 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:tty nsubr) (entry #:image:rectangle:window:tty:tty nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:tty) (push '19) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:tty '#:image:rectangle:window:tty:tty 'setf-inverse) '#:image:rectangle:window:tty:tty))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:tty (struct . valeur) (ifn valeur (list 'vref struct 19) (list 'vset struct 19 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:itsoft nsubr) (entry #:image:rectangle:window:tty:itsoft nsubr) (push a4) (push (@ 101)) (push '#:image:rectangle:window:tty:itsoft) (push '20) (mov (& 3) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (mov (& 4) a4) (plus '3 a4) (xspmov a4 a4) (push a4) (push (& 5)) (mov '5 a4) (jmp #:system:structaccess) 101 (eval ()) (pop a4) (adjstk a4) (return) )) (if (featurep 'setf) (progn (progn (putprop '#:image:rectangle:window:tty:itsoft '#:image:rectangle:window:tty:itsoft 'setf-inverse) '#:image:rectangle:window:tty:itsoft))) (if (featurep 'compiler) (progn (defmacro-open #:image:rectangle:window:tty:itsoft (struct . valeur) (ifn valeur (list 'vref struct 20) (list 'vset struct 20 (car valeur)))))) (loader'((fentry #:image:rectangle:window:tty:create nsubr) (entry #:image:rectangle:window:tty:create nsubr) (cnbeq a4 '7 0) (mov '#:image:rectangle:window:tty:create a1) (mov '7 a2) (jmp #:llcp:errwna) 0 (push (@ 101)) (push 'window) (push (& 8)) (push (& 8)) (push (& 8)) (push (& 8)) (push (& 8)) (push (& 8)) (push (& 8)) (mov '8 a4) (jmp create-window) 101 (eval ()) (push a1) (jcall #:image:rectangle:window:tty:make) (push a1) (mov a1 a2) (mov (& 1) a1) (jcall exchvector) (push (@ 102)) (push (& 2)) (push '#:image:rectangle:window:tty) (mov '2 a4) (jmp typevector) 102 (eval ()) (push (@ 103)) (push (& 2)) (push '0) (push (& 3)) (push '0) (mov '4 a4) (jmp bltvector) 103 (eval ()) (jcall x-base-space) (hpmovx a1 (& 1) '14) (jcall y-base-space) (hpmovx a1 (& 1) '15) (hpmovx '0 (& 1) '16) (hpxmov (& 1) '2 a1) (push a1) (jcall width-space) (mov a1 a2) (pop a1) (jcall quo) (hpmovx a1 (& 1) '17) (mov (cvalq #:sys-package:itsoft) a2) (mov 'window a1) (jcall memq) (btnil a1 104) (mov (cvalq #:sys-package:itsoft) a4) (bra 105) 104 (mov (cvalq #:sys-package:itsoft) a2) (mov 'window a1) (jcall cons) (mov a1 a4) 105 (hpmovx a4 (& 1) '20) (mov (& 1) a1) (adjstk '9) (return) )) (loader'((fentry #:image:rectangle:window:tty:current-window subr1) (entry #:image:rectangle:window:tty:current-window subr1) (push a1) (call #:window:flip-tty) (mov (& 0) a1) (call #:window:adjust) (push (@ 101)) (push '#:image:rectangle:window:tty) (push 'current-window) (push (& 3)) (mov '3 a4) (jmp send-super) 101 (eval ()) (adjstk '1) (return) )) (loader'((fentry #:image:rectangle:window:tty:uncurrent-window subr1) (entry #:image:rectangle:window:tty:uncurrent-window subr1) (push a1) (mov nil a2) (mov 'flush a1) (jcall itsoft) (jcall tyflush) (push (@ 103)) (mov '0 a4) (jmp outchan) 103 (eval ()) (cabne a1 nil 102) (push (@ 104)) (mov '0 a4) (jmp lmargin) 104 (eval ()) (hpmovx a1 (& 0) '16) (push (@ 105)) (mov '0 a4) (jmp rmargin) 105 (eval ()) (hpmovx a1 (& 0) '17) 102 (mov (& 0) a1) (call #:window:flip-tty) (push (@ 106)) (push '#:image:rectangle:window:tty) (push 'uncurrent-window) (push (& 3)) (mov '3 a4) (jmp send-super) 106 (eval ()) (adjstk '1) (return) )) (loader'((fentry #:image:rectangle:window:tty:modify-window nsubr) (entry #:image:rectangle:window:tty:modify-window nsubr) (cnbeq a4 '8 0) (mov '#:image:rectangle:window:tty:modify-window a1) (mov '8 a2) (jmp #:llcp:errwna) 0 (push (@ 101)) (push '#:image:rectangle:window:tty) (push 'modify-window) (push (& 10)) (push (& 10)) (push (& 10)) (push (& 10)) (push (& 10)) (push (& 10)) (push (& 10)) (push (& 10)) (mov '10 a4) (jmp send-super) 101 (eval ()) (push (@ 104)) (mov '0 a4) (jmp current-window) 104 (eval ()) (cabne (& 7) a1 102) (bfnil (& 4) 105) (btnil (& 3) 102) 105 (mov (& 7) a1) (adjstk '8) (bra #:window:adjust) 102 (mov nil a1) (adjstk '8) (return) )) (loader'((entry #:window:flip-tty subr1) (push a1) (push (@ 101)) (mov '0 a4) (jmp tyshowcursor) 101 (eval ()) (push (cvalq #:sys-package:tty)) (push (cvalq #:sys-package:itsoft)) (push a1) (hpxmov (& 3) '19 a4) (mov a4 (cvalq #:sys-package:tty)) (hpxmov (& 3) '20 a3) (mov a3 (cvalq #:sys-package:itsoft)) (push (@ 102)) (hpxmov (& 4) '18 a2) (push a2) (mov '1 a4) (jmp tyshowcursor) 102 (eval ()) (hpmovx (& 2) (& 3) '19) (hpmovx (& 1) (& 3) '20) (hpmovx (& 0) (& 3) '18) (mov (& 0) a1) (adjstk '4) (return) )) (loader'((entry #:window:adjust subr1) (push a1) (hpxmov a1 '2 a1) (push a1) (jcall width-space) (mov a1 a2) (pop a1) (jcall quo) (diff '1 a1) (mov a1 (cvalq #:tty:window:xmax)) (hpxmov (& 0) '3 a1) (push a1) (jcall height-space) (mov a1 a2) (pop a1) (jcall quo) (diff '1 a1) (mov a1 (cvalq #:tty:window:ymax)) (mov (cvalq #:tty:window:xmax) (cvalq #:tty:xmax)) (mov a1 (cvalq #:tty:ymax)) (push (@ 103)) (mov '0 a4) (jmp outchan) 103 (eval ()) (cabne a1 nil 101) (push (@ 104)) (hpxmov (& 1) '17 a4) (push a4) (mov '1 a4) (jmp rmargin) 104 (eval ()) (push (@ 105)) (hpxmov (& 1) '16 a4) (push a4) (mov '1 a4) (jmp lmargin) 105 (eval ()) (adjstk '1) (return) 101 (mov nil a1) (adjstk '1) (return) )) (loader'((fentry #:tty:window:tycn subr1) (entry #:tty:window:tycn subr1) (push '"x") (hbmovx a1 (& 0) '0) (mov '1 a2) (mov (& 0) a1) (adjstk '1) (jmp #:tty:window:tystring) )) (loader'((fentry #:tty:window:tystring subr2) (entry #:tty:window:tystring subr2) (push a2) (push a1) (push (@ 101)) (push (@ 102)) (mov '0 a4) (jmp current-window) 102 (eval ()) (hpxmov a1 '14 a4) (push a4) (push (@ 103)) (mov '0 a4) (jmp current-window) 103 (eval ()) (hpxmov a1 '15 a4) (push a4) (push (& 3)) (push '0) (push (& 6)) (mov '5 a4) (jmp draw-substring) 101 (eval ()) (push (@ 104)) (mov '0 a4) (jmp current-window) 104 (eval ()) (push a1) (push (@ 105)) (push (@ 106)) (mov '0 a4) (jmp current-window) 106 (eval ()) (hpxmov a1 '2 a4) (push a4) (push (@ 107)) (mov '0 a4) (jmp current-window) 107 (eval ()) (hpxmov a1 '14 a4) (push a4) (mov (& 5) a3) (mov '0 a2) (mov (& 4) a1) (jcall x-inc-substring) (pop a4) (plus a1 a4) (push a4) (mov '2 a4) (jmp min) 105 (eval ()) (pop a4) (hpmovx a1 a4 '14) (adjstk '2) (return) )) (defvar #:tty:window:page-mode t) (loader'((fentry #:tty:window:tynewline subr0) (entry #:tty:window:tynewline subr0) (btnil (cvalq #:tty:window:page-mode) 102) (jcall tycleol) 102 (push (@ 103)) (mov '0 a4) (jmp current-window) 103 (eval ()) (hpmovx '0 a1 '14) (push (@ 104)) (mov '0 a4) (jmp current-window) 104 (eval ()) (push a1) (push (@ 105)) (mov '0 a4) (jmp current-window) 105 (eval ()) (hpxmov a1 '15 a4) (push a4) (jcall height-space) (pop a4) (plus a1 a4) (pop a3) (hpmovx a4 a3 '15) (push (@ 108)) (mov '0 a4) (jmp current-window) 108 (eval ()) (hpxmov a1 '15 a4) (push a4) (jcall height-space) (pop a4) (plus a1 a4) (push a4) (jcall y-base-space) (pop a4) (diff a1 a4) (push a4) (push (@ 109)) (mov '0 a4) (jmp current-window) 109 (eval ()) (hpxmov a1 '3 a3) (pop a4) (cnble a4 a3 106) (btnil (cvalq #:tty:window:page-mode) 110) (jmp tycls) 110 (push (@ 112)) (mov '0 a4) (jmp current-window) 112 (eval ()) (hpxmov a1 '3 a4) (quo '3 a4) (push a4) (jcall height-space) (pop a4) (quo a1 a4) (plus '1 a4) (push a4) (jcall height-space) (pop a4) (times a1 a4) (push a4) (push (@ 113)) (mov '0 a4) (jmp current-mode) 113 (eval ()) (push a1) (push (@ 114)) (push dlink) (push prot) (stack dlink) (push (@ 116)) (push (cvalq #:mode:set)) (mov '1 a4) (jmp current-mode) 116 (eval ()) (push (@ 117)) (push (@ 118)) (mov '0 a4) (jmp current-window) 118 (eval ()) (jcall window-bitmap) (push a1) (push (@ 119)) (mov '0 a4) (jmp current-window) 119 (eval ()) (jcall window-bitmap) (push a1) (push '0) (push '0) (push '0) (push (& 10)) (push (@ 120)) (mov '0 a4) (jmp current-window) 120 (eval ()) (hpxmov a1 '2 a4) (push a4) (push (@ 121)) (mov '0 a4) (jmp current-window) 121 (eval ()) (hpxmov a1 '3 a4) (diff (& 12) a4) (push a4) (mov '8 a4) (jmp bitblit) 117 (eval ()) (push (@ 122)) (mov '0 a4) (jmp current-window) 122 (eval ()) (push a1) (push (@ 123)) (mov '0 a4) (jmp current-window) 123 (eval ()) (hpxmov a1 '15 a4) (diff (& 5) a4) (pop a3) (hpmovx a4 a3 '15) (push (@ 124)) (push '0) (mov '1 a4) (jmp current-mode) 124 (eval ()) (push (@ 125)) (push (@ 126)) (mov '0 a4) (jmp current-window) 126 (eval ()) (jcall window-bitmap) (push a1) (push (@ 127)) (mov '0 a4) (jmp current-window) 127 (eval ()) (jcall window-bitmap) (push a1) (push '0) (push (@ 128)) (mov '0 a4) (jmp current-window) 128 (eval ()) (hpxmov a1 '15 a4) (push a4) (jcall y-base-space) (pop a4) (diff a1 a4) (push a4) (push '0) (push '0) (push (@ 129)) (mov '0 a4) (jmp current-window) 129 (eval ()) (hpxmov a1 '2 a4) (push a4) (push (@ 130)) (mov '0 a4) (jmp current-window) 130 (eval ()) (hpxmov a1 '3 a4) (push a4) (mov '8 a4) (jmp bitblit) 125 (eval ()) (mov (& 1) dlink) (adjstk '3) (push a1) (mov (@ 115) a3) 114 (push a3) (push a2) (push (@ 131)) (push (& 4)) (mov '1 a4) (jmp current-mode) 131 (eval ()) (pop a2) (pop a3) (pop a1) (bri a3) 115 (eval ()) (adjstk '2) (return) 106 (mov nil a1) (return) )) (loader'((fentry #:tty:window:tybs subr1) (entry #:tty:window:tybs subr1) (push '"x") (hbmovx a1 (& 0) '0) (push (@ 101)) (mov '0 a4) (jmp current-window) 101 (eval ()) (push a1) (push (@ 102)) (push '0) (push (@ 103)) (mov '0 a4) (jmp current-window) 103 (eval ()) (hpxmov a1 '14 a4) (push a4) (mov '1 a3) (mov '0 a2) (mov (& 4) a1) (jcall x-inc-substring) (pop a4) (diff a1 a4) (push a4) (mov '2 a4) (jmp max) 102 (eval ()) (pop a4) (hpmovx a1 a4 '14) (adjstk '1) (return) )) (loader'((fentry #:tty:window:tycr subr0) (entry #:tty:window:tycr subr0) (push (@ 101)) (mov '0 a4) (jmp current-window) 101 (eval ()) (hpmovx '0 a1 '14) (mov '0 a1) (return) )) (defvar #:window:blankscreen (makestring 256 32)) (loader'((fentry #:tty:window:tycleol subr0) (entry #:tty:window:tycleol subr0) (push (@ 101)) (push (@ 102)) (mov '0 a4) (jmp current-window) 102 (eval ()) (hpxmov a1 '14 a4) (push a4) (push (@ 103)) (mov '0 a4) (jmp current-window) 103 (eval ()) (hpxmov a1 '15 a4) (push a4) (push (cvalq #:window:blankscreen)) (push '0) (push (@ 104)) (mov '0 a4) (jmp current-window) 104 (eval ()) (hpxmov a1 '2 a1) (push a1) (push (@ 105)) (mov '0 a4) (jmp current-window) 105 (eval ()) (hpxmov a1 '14 a4) (pop a3) (diff a4 a3) (push a3) (jcall width-space) (mov a1 a2) (pop a1) (jcall quo) (push a1) (mov '5 a4) (jmp draw-substring) 101 (eval ()) (return) )) (loader'((fentry #:tty:window:tycls subr0) (entry #:tty:window:tycls subr0) (mov '0 a2) (mov '0 a1) (jcall tycursor) (jmp clear-graph-env) )) (defvar #:tty:window:tyattrib ()) (loader'((fentry #:tty:window:tyattrib subr1) (entry #:tty:window:tyattrib subr1) (push a1) (mov nil a2) (mov 'flush a1) (jcall itsoft) (push (@ 101)) (btnil (& 1) 102) (mov '1 a4) (bra 103) 102 (mov '0 a4) 103 (push a4) (mov '1 a4) (jmp current-font) 101 (eval ()) (adjstk '1) (return) )) (defvar #:window:event (#:event:make)) (loader'((fentry #:tty:window:tyi subr0) (entry #:tty:window:tyi subr0) (jcall tyflush) (push (@ 103)) (mov '0 a4) (jmp tyshowcursor) 103 (eval ()) (btnil a1 102) (push (@ 104)) (mov '0 a4) (jmp current-window) 104 (eval ()) (hpxmov a1 '14 a1) (push a1) (push (@ 105)) (mov '0 a4) (jmp current-window) 105 (eval ()) (hpxmov a1 '15 a2) (mov 't a3) (pop a1) (jcall draw-cursor) 102 (push (@ 106)) (push (cvalq #:window:event)) (mov '1 a4) (jmp read-event) 106 (eval ()) 107 (hpxmov (cvalq #:window:event) '0 a4) (cabeq a4 'ascii-event 108) (push (@ 109)) (push (cvalq #:window:event)) (mov '1 a4) (jmp read-event) 109 (eval ()) (bra 107) 108 (push (@ 112)) (mov '0 a4) (jmp tyshowcursor) 112 (eval ()) (btnil a1 111) (push (@ 113)) (mov '0 a4) (jmp current-window) 113 (eval ()) (hpxmov a1 '14 a1) (push a1) (push (@ 114)) (mov '0 a4) (jmp current-window) 114 (eval ()) (hpxmov a1 '15 a2) (mov nil a3) (pop a1) (jcall draw-cursor) 111 (hpxmov (cvalq #:window:event) '2 a1) (return) )) (defvar #:event:code) (loader'((fentry #:tty:window:tys subr0) (entry #:tty:window:tys subr0) (jcall eventp) (btnil a1 101) (push (@ 103)) (push (cvalq #:window:event)) (mov '1 a4) (jmp read-event) 103 (eval ()) (hpxmov (cvalq #:window:event) '0 a4) (cabeq a4 'ascii-event 104) (jmp #:tty:window:tys) 104 (hpxmov (cvalq #:window:event) '2 a1) (return) 101 (mov nil a1) (return) )) (defvar #:tty:window:xmax 79) (defvar #:tty:window:ymax 23) (loader'((fentry #:tty:window:tycursor subr2) (entry #:tty:window:tycursor subr2) (push a2) (push a1) (jcall tyflush) (push (@ 101)) (mov '0 a4) (jmp current-window) 101 (eval ()) (push a1) (jcall x-base-space) (push a1) (jcall width-space) (times (& 2) a1) (pop a4) (plus a1 a4) (pop a3) (hpmovx a4 a3 '14) (push (@ 102)) (mov '0 a4) (jmp current-window) 102 (eval ()) (push a1) (jcall y-base-space) (push a1) (jcall height-space) (times (& 3) a1) (pop a4) (plus a1 a4) (pop a3) (hpmovx a4 a3 '15) (mov a4 a1) (adjstk '2) (return) )) (loader'((fentry #:tty:window:tyback subr1) (entry #:tty:window:tyback subr1) (jcall tybs) (push (@ 101)) (mov '0 a4) (jmp current-window) 101 (eval ()) (hpxmov a1 '14 a1) (push a1) (push (@ 102)) (mov '0 a4) (jmp current-window) 102 (eval ()) (hpxmov a1 '15 a2) (mov '32 a3) (pop a1) (jmp draw-cn) )) (loader'((fentry #:tty:window:tydelcn subr1) (entry #:tty:window:tydelcn subr1) (mov nil a1) (return) )) (loader'((fentry #:tty:window:tyinscn subr1) (entry #:tty:window:tyinscn subr1) (mov nil a1) (return) )) (loader '((end)))