1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-14 07:40:05 +00:00

GOTO - go to specified terminal line.

This commit is contained in:
Lars Brinkhoff 2018-08-31 19:48:15 +02:00
parent 48121a4801
commit d4e793b3a6
4 changed files with 101 additions and 1 deletions

View File

@ -24,7 +24,7 @@ SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
tensor transl wgd zz graphs lmlib pratt quux scheme gsb ejs mudsys \
draw wl taa tj6 budd sharem ucode rvb kldcp math as imsrc gls demo \
macsym lmcons dmcg hack hibou agb gt40 rug maeda ms kle aap common \
fonts zork 11logo
fonts zork 11logo kmp
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 \

View File

@ -194,6 +194,10 @@ expect ":KILL"
respond "*" ":midas sys2;ts octpus_gren;octpus\r"
expect ":KILL"
# GOTO
respond "*" ":midas sys3;ts goto_kmp; goto\r"
expect ":KILL"
# binprt
respond "*" ":midas sys3;ts binprt_sysen1;binprt\r"
expect ":KILL"

View File

@ -95,6 +95,7 @@
- GLPDEV/XGPDEV, device for viewing GLPSPL/XGPSPL printer queues.
- GTLEM, GT40 Lunar Lander.
- GO, the Go board game.
- GOTO, go to specified terminal line.
- GUESS, a very silly game.
- GMSGS, copy system messages to mail file.
- H3MAKE, a job that requests DRAGON to build host table.

95
src/kmp/goto.12 Normal file
View File

@ -0,0 +1,95 @@
title LINE -- jump to screen line given by JCL
a=:1
b=:2
ttyo=:4
ch=:6
vpos=:10
jclflg=:11
jclbuf: block 20 ; Give us 16. x 5 = 80. chars of JCL space
-1 ; Tell DDT this is end of buffer
define type &string
movei a,<.length string>
move b,[440700,,[ascii string]]
syscal SIOT,[%climm,,ttyo ? b ? a]
.lose %lsfil
termin
define syscal op,args
.call [setz ? sixbit /op/ ? args ((setz))]
termin
line: setzm vpos ; Init vpos to 0
setzm jclflg ; Make sure loser uses jcl
.break 12,[..RJCL,,JCLBUF] ; Read JCL
move a,[440700,,JCLBUF] ; Init JCLBUF byte-pointer in a
loop: ildb ch,a ; Load char from JCLBUF into ch
caie ch,^M ; If char is a Carriage return...
cain ch,^C ; or if char is a Control-C
jrst print ; then done with loop
caie ch,^@ ; (Also...) If char is a Null
cain ch,^_ ; or if char is a Control-_
jrst print ; then done with loop
cail ch,"0 ; If less than 0
caile ch,"9 ; or greater than 9
jrst loop ; then retry
setom jclflg ; Say he used jcl
imuli vpos,10. ; Move it over a bit
addi vpos,-60(ch) ; Add into vpos the new char
jrst loop ; Loop
print: syscal OPEN,[ %clbit,,.uao\%tjdis ? %climm,,ttyo ;open TTY for output
[sixbit /TTY/]]
.lose %lsfil
jumpe jclflg,jclwrn
movei a,^P
.iot ttyo,a
movei a,"V
.iot ttyo,a
movei a,10(vpos)
.iot ttyo,a
movei a,^P
.iot ttyo,a
movei a,"H
.iot ttyo,a
movei a,0
.iot ttyo,a
movei a,^P
.iot ttyo,a
movei a,"L
.iot ttyo,a
.value [ asciz \:KILL \ ]
die: .logout 1,
jclwrn: movei a,^P
.iot ttyo,a
movei a,"H
.iot ttyo,a
movei a,0
.iot ttyo,a
movei a,^P
.iot ttyo,a
movei a,"L
.iot ttyo,a
.value [ asciz \
.jname/ : Usage is :6type
: <screenline><Control-C> :KILL KILL
:jobp
=:if e q
(.jname/ :6type
45200,,= :6type
)
:v \ ]
jrst die
end line