1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 23:36:30 +00:00

VERSA: Add support for XGP ;LFTMAR and ;TOPMAR.

Since this means adding support for parsing numeric arguments in XGP
control lines, also check that ;SKIP's argument is 1.
This commit is contained in:
Adam Sampson 2018-05-26 00:06:12 +01:00 committed by Adam Sampson
parent 5b968e9ac5
commit e82ebb56d4

View File

@ -4328,9 +4328,12 @@ xgp50: call mapper"finish ;"no longer need the file
call plot"finish ;"finished plotting (for this file)
return ;and th.th.th.that's all folks
.scalar nskip,ksetok
.scalar nskip,ksetok,lftmar,topmar
scrimp: setzm nskip
setzm ksetok
movei a,128
movem a,topmar
movem a,lftmar
scrmor: call mapper"nxtbyt ;"
jrst scrfin
cain x,"; ;"
@ -4349,8 +4352,9 @@ scrfin: skipn ksetok
movei x,string"badreq ;"
call util"throw ;"
]
skipn nskip
jrst [ movei x,[ [asciz "~%~T XGP: File error: no ;SKIP command"]]
movei 1
came nskip
jrst [ movei x,[ [asciz "~%~T XGP: File error: must have ;SKIP 1"]]
call log"log ;"
movei x,string"badreq ;"
call util"throw ;"
@ -4362,7 +4366,11 @@ scrcom: call scrget ;get the command
camn a,['kset]
jrst scrkset ;get fonts
camn a,['skip]
jrst scrskip ;do a ;skip (assume 1 for now)
jrst scrskip ;do a ;skip
camn a,['lftmar]
jrst scrlft
camn a,['topmar]
jrst scrtop
jrst scrloo ;ignore rest
scrget: setzi a,
@ -4377,9 +4385,29 @@ scrge2: call mapper"nxtbyt ;"
addi a,(x)
jrst scrge2
scrnum: setzi a, ;read numeric arg into a
scrnm2: call mapper"nxtbyt
return ;eof
cail x,"0 ;"numeric?
caile x,"9 ;"
return ;no, done
subi x,"0
imuli a,10
add a,x
jrst scrnm2
scrskip:
setom nskip
jrst scrloo ;assume just one for now
call scrnum
movem a,nskip
jrst scrloo
scrlft: call scrnum
movem a,lftmar
jrst scrloo
scrtop: call scrnum
movem a,topmar
jrst scrloo
.vector ksetbf(50.),ksetfi(4)
.scalar ksetnm,ksetmr
@ -4466,7 +4494,8 @@ xarg2: call xarg1
return
dopage: setzm eopp ;not end of page
setzm scanln
move y,topmar
movem y,scanln
; setzm nscanl ;next scan line
dopag1: call doline
jrst [ ;end of page, maybe end of file
@ -4479,6 +4508,8 @@ doline: setzm outena ;disable output
setzm chrrct ;should really be current height??
setzm movdwn ;nothing forced us down yet
setzm count ;count of saved characters
move x,lftmar ;underline from left margin by default
movem x,stubit
move x,[440700,,rescan]
movem x,ptr
call dolin1
@ -4550,8 +4581,8 @@ linfin: skipn outena
return]
return
cretrn: ;get leftmargin
movem x,xgp.x
cretrn: move lftmar ;get leftmargin
movem xgp.x
aos (p)
return