mirror of
https://github.com/PDP-10/its.git
synced 2026-02-01 06:22:14 +00:00
Update TVREAD to version 90.
This commit is contained in:
63
src/sysen2/tvread.82 → src/vis/tvread.90
Executable file → Normal file
63
src/sysen2/tvread.82 → src/vis/tvread.90
Executable file → Normal file
@@ -1,9 +1,12 @@
|
||||
;; -*-midas-*-
|
||||
|
||||
TITLE PICTURE INPUT
|
||||
|
||||
;; Type TVREAD <file-name> 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
|
||||
Reference in New Issue
Block a user