Since the ZX/TS machines do not use ASCII internally, printer interfaces must translate ZX/TS character codes into ASCII before sending them to the printer. The ASCII code runs from 0 to 127, and uses the eighth bit of each byte for parity. Some printers, however, use the ASCII code from 0-127 and an extension to ASCII from 128-255. Some interfaces filter out certain codes (less than 32 or over 128). If you need to send codes to your printer that your interface won’t allow, use this.
We need only find the routine in the interface firmware that actually accesses the printer port, and send codes to the printer without translation. This routine starts at 10549 in the Memotech Centronics I/F, and 11104 in the AERCO Centronics I/F.
Type in listing one and RUN. Enter the following numbers, depending on the interface you use:
Memotech: 62 65 205 53 41 201 AERCO: 62 65 205 96 43 201
Now if you POKE 16515 with the ASCII code you want to print and then execute RAND USR 16514, the printer will be sent the code in location 16515.
10 REM 123456
20 FOR A=16514 TO 16519
30 INPUT D
40 POKE A,D
50 NEXT A
SYNTACTIC SUM: 3511, 8K ROM
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.