; WORDBEE MODIFICATIONS ; Listing 2 which enables the additional printer dot ; commands to be utilised mid-line with a '\' trip. DEFR 16 UNDR EQU 0CC5CH ; Note the different EQU labels ITAL EQU 0CC2DH ; compared to listing 1. In each EMPH EQU 0CC39H ; case the address jumps into the DUBL EQU 0CC40H ; routine just after the command: COND EQU 0C05AH ; LD A,(IY+2) BIG EQU 0CC54H ; If you study the code below, SUBP EQU 0C13BH ; will see we load the A register PRINT EQU 0CD54H ; before jumping to the address. ORG 0CA96H ; All printing goes to here. START CP '\' ; Is this char a slosh ? JP NZ,PRINT; If not, just print it. DEC C ; Adjust line length LD A,(HL) ; Get next char AND 0DFH ; Convert to upper case LD (HL),A ; and put it back INC HL ; Ready for next char PUSH BC ; Save reg CALL FIRST ; Test for each attribute POP BC ; Restore reg RET ; To program for next character to print. ORG 0DF28 ; Where there is now space ; Each possibility is tested until one is found: FIRST CP 'U' ; underline ? JR NZ,NXT1 ; if not underline LD A,(547) ; get switch XOR 1H ; change switch pointer BIT 0,A ; test for on or off LD (547),A ; save it again JR Z,UNDOUT; if 0, switch underline off LD A,'Y' ; switch underline on UNDOUT JP UNDR ; to where A is tested for 'Y' NXT1 CP 'I' ; italics ? JR NZ,NXT2 ; LD A,(547) ; Each one is the same as above XOR 2H ; BIT 1,A LD (547),A JR Z,ITOUT LD A,'Y' ITOUT JP ITAL NXT2 CP 'M' ; emphasised ? JR NZ,NXT3 LD A,(547) XOR 4H BIT 2,A LD (547),A Š JR Z,EMPOUT LD A,'Y' EMPOUT JP EMPH NXT3 CP 'D' ; double ? JR NZ,NXT4 LD A,(547) XOR 8H BIT 3,A LD (547),A JR Z,DBLOUT LD A,'Y' DBLOUT JP DUBL NXT4 CP 'C' ; condensed ? JR NZ,NXT5 LD A,(547) XOR 10H BIT 4,A LD (547),A JR Z,CONOUT LD A,'Y' CONOUT JP COND NXT5 CP 'B' ; BIG ? JR NZ,NXT6 LD A,(547) XOR 20H BIT 5,A LD (547),A JR Z,BIGOUT LD A,'Y' BIGOUT JP BIG NXT6 CP ']' ; new identifier for SUBscript ! JR NZ,NXT7 LD A,(547) XOR 40H BIT 6,A LD (547),A JR Z,SBPOUT LD A,'B' SBPOUT JP SUBP NXT7 CP '^' ; new ident for SUPERscript ! JR NZ,LAST ; It was none of above, so . . LD A,(547) XOR 80H BIT 7,A LD (547),A JR Z,SBPOUT LD A,'P' JR SBPOUT LAST POP DE ; This routine restores all POP BC ; pointers, registers, etc INC C PUSH BC PUSH DE Š DEC HL BIT 6,(HL) JR NZ,OUT SET 5,(HL) OUT LD A,'\' ; Back to where we started JP PRINT END