diff --git a/Makefile b/Makefile index f0cdcee9..2e391b73 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ SRC = syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ fonts zork 11logo kmp info aplogo bkph bbn pdp11 chsncp sca music1 \ moon teach ken lmio1 llogo a2deh chsgtv clib sys3 lmio turnip \ mits_s rab stan_k bs cstacy kp dcp2 -pics- victor imlac rjl mb bh \ - lars drnil radia gjd maint bolio cent shrdlu + lars drnil radia gjd maint bolio cent shrdlu vis DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \ chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \ xfont maxout ucode moon acount alan channa fonts games graphs humor \ diff --git a/build/misc.tcl b/build/misc.tcl index 67edf956..265f9f8b 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -1196,7 +1196,7 @@ respond "*" ":midas bkph; ts lines_lines\r" expect ":KILL" # View bitmap file on TV. -respond "*" ":midas sys2; ts tvread_sysen2; tvread\r" +respond "*" ":midas sys2; ts tvread_vis; tvread\r" expect ":KILL" # Save TV display as bitmap file. diff --git a/src/sysen2/tvread.82 b/src/vis/tvread.90 old mode 100755 new mode 100644 similarity index 86% rename from src/sysen2/tvread.82 rename to src/vis/tvread.90 index f12fa7b6..d2705bac --- a/src/sysen2/tvread.82 +++ b/src/vis/tvread.90 @@ -1,9 +1,12 @@ +;; -*-midas-*- + TITLE PICTURE INPUT ;; Type TVREAD CR to read binary image file onto your TV-screen. ;; [Parameter following "/" is sent along as expansion factor to ZAP] ;; [Parameter following "" is another user's tty number, to snarf his ;; screen instead.] +;; [$ means quick exit after putting up picture - without waiting for user] ;; (If file is not a binary image file, bits are packed onto your screen ;; as they are found in file. The result may not look very informative.) ;; @@ -38,14 +41,14 @@ dtyoc==3 BEG: MOVE P,[-20,,pdl] .open ttyin,[sixbit / $TTY/] - jrst failur + jrst losers .CALL [SETZ SIXBIT /CNSGET/ 1000,,TTYIN 2000,,A 2000,,B 402000,,C] - JRST FAILUR + JRST losers CAIE C,5 ;CHECK IF TV CONSOLE JRST KILL ;NO -- STOP THE LOSER ! PUSHJ P,TVMAPC @@ -63,25 +66,30 @@ BEG: MOVE P,[-20,,pdl] .suset [.stvcreg,,a] ;set it (isn't memory mapping fun?) restar: pushj p,readhd ;read headin of image file + .open dtyoc,[sixbit / 1TTY/] + jrst failur + pushj p,saver ;save screen pushj p,bull ;move cursor - pushj p,clears ;clear screen pushj p,unpack ;unpack things onto screen .call [ setz sixbit \close \ setz inchn] jrst failur - -surlp: skipe quick ;quick exit? +surlp: skipe quick ;quick exit? leaving screen as is! jrst kill .iot ttyin,a ;await user's command cain a,177 .value valmes ;magic .value stuff -- call ZAP for XGP cain a,15 jrst restar ;do it again -exit: pushj p,clears -kill: .break 16,124000 + cain a,40 ;restore screen if he types a space +exit: pushj p,restore + pushj p,cow +kill: .close dtyoc, + .break 16,124000 -failur: .value [asciz /:err +failur: pushj p,restore +losers: .value [asciz /:err :vp /] jrst kill ;an open failed -- exit @@ -149,13 +157,22 @@ readlp: move a,bufpnt ;read a line of image sojg e,readlp popj p, -bull: .open dtyoc,[sixbit / 1TTY/] - jrst failur - .iot dtyoc,[^P] +bull: .iot dtyoc,[^P] .iot dtyoc,["T] ;home cursor up .iot dtyoc,[^P] .iot dtyoc,["B] ;MOVE TO RIGHT OF FRAME - .close dtyoc, + popj p, + +cow: .iot dtyoc,[^P] + .iot dtyoc,["H] + hrrz a,mppos + movei a,10(a) + .iot dtyoc,a + .iot dtyoc,[^P] + .iot dtyoc,["V] + hlrz a,mppos + movei a,10(a) + .iot dtyoc,a popj p, blknup: move a,(d) ;get first word @@ -303,7 +320,21 @@ param: ildb a,c ;ignore for now (the slash) quiset: setom quick ;quick return flag jrst spacer -clears: movsi f,-10*2000+1 +saver: .call [ setz + sixbit /rcpos/ + 1000,,dtyoc + 2000,,mppos + 402000,,echpos] + .value + move a,[tv,,saved] + blt a,saved+10*2000-1 + popj p, + +restor: move a,[saved,,tv] + blt a,tv+10*2000-1 + popj p, + +clears: movsi f,-10*2000+1 ;no longer used move a,[setzm tv(f)] move b,[aobjn f,a] move c,[popj p,] @@ -320,6 +351,10 @@ valmes: asciz $:bkph;zap /1 :vp $ +mppos: 0 + +echpos: 0 + quick: 0 ;QUICK EXIT FLAG bufpnt: 0 ;i/o pointer @@ -336,6 +371,8 @@ headin: block 200 buffin: block 4000 +saved: block 10*2000 + -1 end beg