; WORDBEE MODIFICATIONS ; Listing 1 which implements additional dot commands for ; printing enhancements using Alpha-80 or similar. ; DEFR 16 LINE EQU 0CC6EH ; Line space, Left margin, etc HEAD EQU 0CCE1H ; Page header PAGE EQU 0CCA9H ; Page number, length, gap CRLF EQU 0CD04H ; Line feed suppression (.ZN) ES EQU 0CD14H ; .ES ORG 0CBDCH ; Where the existing test routine is located CJUST CP 'J' ; .JY ? JR Z,JUST CNEW CP 'N' ; .NP ? JR Z,NEW CLINE CP 'L' ; .LS#xx, .LM#xx, .LL#xx ? JP Z,LINE ; To add a .LH letterhead, amend line 210 to read JP Z,LHEAD - refer text CHEAD CP 'H' ; .HE ? JP Z,HEAD CPAGE CP 'P' ; .PN#xx ? JP Z,PAGE CCRLF CP 'Z' ; .ZN ? JP Z,CRLF CUNDR CP 'U' ; Underline ? JR Z,UNDR CITAL CP 'I' ; Italics ? JR Z,ITAL CEMPH CP 'M' ; eMphasised ? JR Z,EMPH CDUBL CP 'D' ; Double strike ? JR Z,DUBL ; JP CFORM ; Tests are continued at another location ( C039 ) ; NOP ; a few spare bytes NOP NOP CONTIN POP HL ; an unchanged part of the original program @ CC0E LD (0521H),IY ; put back pointer RET ; to the normal printing routine ; JUST LD A,(IY+2) ; Get the next char CP 'Y' ; is it .JY ? JR Z,JY ; if yes XOR A ; else it must be .JN JY LD (0512H),A ; flag for Justify ( 0 if no ) RET ; The justify routine has been shortened by deleting the test for .JN assuming it must be, if it was not a .JY ; NEW LD A,(IY+2) ; Get next char CP 'P' ; .NP ? JR NZ,CONTIN ; if no then the test failed JP 0CA0EH ; the .NP routine has not changed ; ITAL LD A,(IY+2) ; Get next char LD B,34H ; ESC 34 turns italics on Š; ; The following short OUT routine sends ESC and the ; contents of B to the print routine if YES or else ; the B register is increased by 1 before sending SOUT CP 'Y' ; is char 'Y' in register A ? JR Z,PRINT ; if yes INC B ; else increase B register JR PRINT ; and then send it ; EMPH LD A,(IY+2) ; Get next char LD B,45H ; eMphasised on is ESC 45 JR SOUT ; use same routine as italics ; DUBL LD A,(IY+2) ; Get next char LD B,47H ; Double on is ESC 47 JR SOUT ; as above, increases B for no ; PRINT LD A,1BH ; the ESC char CALL 0CD54H ; actually send it to printer LD A,B ; ready to send contents of B PRINT2 CALL 0CD54H ; send that to printer too RET ; printer codes have now been sent, continue PRINT3 LD B,C ; if there are more codes to go JR PRINT ; send them too ; BIG LD A,(IY+2) ; Get next char LD BC,5701H ; ESC 57 1 for on, ESC 57 0 off JR LOUT ; a longer OUT routine below ; UNDR LD A,(IY+2) ; Get next char LD BC,2D01H ; ESC 2D 1 - on, ESC 2D 0 - off ; ; This longer OUT routine sends (if yes) ESC, contents ; of B, contents of C. If no, C is decreased by 1. ; LOUT CP 'Y' ; is it yes ? JR Z,LPRINT ; if yes, print ESC, (B), (C) DEC C ; must be no, decrease C LPRINT CALL PRINT ; print ESC, (B) LD A,C ; ready with next code JR PRINT2 ; now print that too ; NOP NOP NOP NOP ; ; ; ORG 0C017 ; The start of 'Checking . . . ; CALL 0C1C8 ; switches on parallel port LD A,2 ; but is no longer required LD (00E3),A ; as parallel is now default. ; ; The next part is just a copy of C057 - C068 which has ; in effect been moved to C01F ; LD HL,0500 Š LD A,(HL) CP 55 JP Z,0C1D5 ; Top of file LD (HL),55 LD B,0E1 AGAIN INC HL LD (HL),0 DJNZ AGAIN JP 0C069 ; which used to follow this ; a few NOPs to fill a hole NOP NOP NOP NOP NOP ; CFORM CP 'F' ; Form feed ? JR NZ,CCOND LD A,0CH ; FF character CALL 0CD54 ; send it to printer RET ; finished ; CCOND CP 'C' ; Condensed ? JR Z,COND CSUBP CP 'S' ; Subscript or Superscript ? JP Z,SUBP CES CP 'E' ; .ES command ? JP Z,ES CBIG CP 'B' ; Big (enlarged) ? JP Z,BIG ; No more tests, so must have been a wrong command. JP CONTIN ; Continue on with printing ; COND LD A,(IY+2) ; Get next char CP 'Y' ; is it .CY ? LD A,0FH ; it may be JR Z,CONOUT ; if it was LD A,12 ; must be no CONOUT JP 0CD54 ; send char 0F for yes or 12 for no NOP NOP ; a few more gaps ; ; Out of space so jump to another hole ; ORG 0C138 ; Where 'Are you sure' used to be ; SUBP LD A,(IY+2) ; Get next char LD BC,5301 ; Subscript perhaps CP 'B' ; is it ? JR Z,SUB ; if so CP 'P' ; superscript ? JR Z,SUPER ; if correct LD BC,4854 ; must be a cancellation CALL PRINT ; to send ESC (B) JP PRINT3 ; to send ESC (C) SUPER DEC C ; change BC to 5300 SUB JP LPRINT ; which sends ESC (B) (C) ; Note how the contents of BC vary for each condition. END ; of listing 1 Š