From 71aada08fcec79efa8640253fdb359a1a55eda10 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sat, 26 May 2018 21:36:14 +0100 Subject: [PATCH] VERSA: Fix XGP baseline adjustment. This is used by TJ6 for superscripts and subscripts. It worked fine for positive offsets, but "addi a,(x)" didn't do the right thing when the offset x was negative (because it double-indirects). The XGP documentation says that the baseline adjustment sticks until the font is changed. Looking at SYSEN2; XGP 31 (and SAIL's XGPSER), it is also reset at the start of each line. TJ6 relies on this behaviour. Since VERSA scans each line twice (once to compute the line height, once to draw the characters), and baseline adjustment directives will be interpreted on both passes, we need to reset the adjustment at the start of both passes. --- src/dcp/versa.211 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dcp/versa.211 b/src/dcp/versa.211 index 186fc608..0367c78f 100644 --- a/src/dcp/versa.211 +++ b/src/dcp/versa.211 @@ -4519,11 +4519,13 @@ doline: setzm outena ;disable output setzm count ;count of saved characters move x,lftmar ;underline from left margin by default movem x,stubit + setzm basel move x,[440700,,rescan] movem x,ptr call dolin1 setom outena setzm seper + setzm basel move x,[440700,,rescan] movem x,ptr call dolin1 @@ -4702,7 +4704,7 @@ bsladr: skipa a,basel bsladj: setzi a, ;relative to 0 (absolute) call xarg1s return - addi a,(x) + add a,x movem a,basel aos (p) return