Proportional Print Routine...
=============================
16.May.2011
Well, I got the right justification working reasonably well.

[center][img]http://www.users.globalnet.co.uk/~jg27paw4/pourri/tnog_old.gif[/img]
[img]http://www.users.globalnet.co.uk/~jg27paw4/pourri/tnog_newer.gif[/img][/center]

I've included the various small changes which have been suggested. There
was a convenient 15 bytes spare between the end of the character set and
the start of PropSys, so I was able to save another 14 bytes by moving the
PropSys workspace into that gap, leaving about 10 bytes again between the
end of the code and the start of the UDGs. The
[url=http://www.users.globalnet.co.uk/~jg27paw4/pourri/propwrap.zip]propwrap.zip[/url]
file now contains both the old and new versions.

To disable or re-enable the right justification in the new version, enter
the relevant set of five POKEs below:
[code]
Disable
        XOR A                    ; 64059 175
        LD (IX+6), A             ; 64060 221 119 6
        RET                      ; 64063 201
Enable
        LD HL, 64200             ; 64059 33  200 250
        LD A, 255                ; 64062 62  255
[/code]



Proportional Print Routine...
=============================
18.May.2011
OK, having thought of it I had to do it, so here's a mod to linewrap which
will take an optional parameter to toggle right justification off/on. This
needs RAMTOP dropped by 50 and makes the linewrap CODE block 246 bytes.
Options in the demo line 935 are:
[code]
 935 LET end=USR 63850 ...    no change
 935 LET end=0+USR 63850 ...  right justification off
 935 LET end=1+USR 63850 ...  right justification on
 935 LET end=flag+USR 63850 ...  right justification depends on 'flag'
[/code]
Any numeric variable can be used as the parameter, and any non-zero
parameter will set right justification on.

[code]
lnwrap: LD BC, (STKBOT)  ; 63850 237 75  99  92
        LD HL, (STKEND)  ; 63854 42  101 92
        XOR A            ; 63857 175
        SBC HL, BC       ; 63858 237 66          check if parameter on stack
        PUSH AF          ; 63860 245             save flags
        JR Z, npatch     ; 63861 40  18          no change if no parameter
        CALL FPTOA       ; 63863 205 213 45
        OR A             ; 63866 183
        LD BC, 5         ; 63867 1   5   0
        LD DE, padchk    ; 63870 17  59  250
        LD HL, justno    ; 63873 33  139 249
        JR Z, cpatch     ; 63876 40  1           disable if parameter=0
        ADD HL, BC       ; 63878 9               enable otherwise
cpatch: LDIR             ; 63879 237 176
npatch: JR gowrap        ; 63881 24  27
justno: XOR A            ; 63883 175             Disable right justification
        JP nonspc        ; 63884 195 80  250
        NOP              ; 63887 0
juston: LD HL, 64200     ; 63888 33  200 250     Enable  right justification
        LD A, 255        ; 63891 62  255
...
        POP AF           ; 64083 241             get parameter flags
        RET Z            ; 64084 200             "end" in BC if stack empty
        CALL STAKBC      ; 64085 205 43  45      otherwise "end" on stack
        LD BC, 0         ; 64088 1   0   0       and reset BC
        RET              ; 64091 201
padspc: SRL (HL)         ; 64092 203 62          widen "space" by one pixel
        JR chkspc        ; 64094 24  232
[/code]
