mirror of
https://github.com/PDP-10/its.git
synced 2026-01-31 14:02:09 +00:00
VERSA: Implement tab and backspace.
@ uses tabs when formatting /C cross-reference pages.
This commit is contained in:
committed by
Adam Sampson
parent
71541561ba
commit
0fb43293bc
@@ -4578,7 +4578,30 @@ normal: skipn outena
|
||||
return
|
||||
|
||||
backsp:
|
||||
tab: aos (p)
|
||||
tab: skipn outena ;do nothing if output disabled
|
||||
jrst bspfin
|
||||
push p,x ;save char
|
||||
move x,xgp.x ;save original pos
|
||||
push p,x
|
||||
movei x,40 ;output space
|
||||
call normal
|
||||
jfcl
|
||||
move z,xgp.x ;compute width of space (including seper)
|
||||
pop p,x ;restore original pos
|
||||
sub z,x
|
||||
pop p,y ;are we doing a backspace?
|
||||
cain y,^H
|
||||
jrst bspbsp
|
||||
imuli z,8 ;compute width of tab
|
||||
sub x,lftmar ;how many tabs are we from the margin?
|
||||
idiv x,z
|
||||
aos x ;move right to next tab stop
|
||||
imul x,z
|
||||
add x,lftmar
|
||||
skipa
|
||||
bspbsp: sub x,z ;move left by one space
|
||||
movem x,xgp.x
|
||||
bspfin: aos (p)
|
||||
return
|
||||
|
||||
linefd: jrst linfin
|
||||
|
||||
Reference in New Issue
Block a user