Printers
The COMX Printer card allows connection of parallel and serial printers. Depending on what type of printer is connected the firmware ROM is either using the parallel firmware between memory location @C000-@CFFF and the serial firmware between memory location @D000-@DFFF or the other way around.
Parallel Printer Controller
OUT 2 is used to send a byte to the printer and INP 2 for the printer status, where:
b0=1: Acknowledge Fault
b1=0: Device Busy
b2=0: Paper Empty
b3=1: Device Not Selected
CALL and CARD Routines
The printer can be controlled from the COMX by using the CARD Pm commands as described below and on the Expansion Box page. If no expansion box is used the same commands can be activated by CALL statements:
CALL Syntax | CARD Syntax | Function |
CALL (@C040, m) | CARD P0m | Selection routine (m = 1-11, for P1-P11) |
CALL (@C050) | CARD P1 | Switch off the printer |
CALL (@C060) | CARD P2 | Switch on the printer with control character suppressed |
CALL (@C070) | CARD P3 | Switch on the printer |
CALL (@C080) | CARD P4 | Switch on the printer and TV display mode with control character suppressed |
CALL (@C090) | CARD P5 | Switch on the printer and TV display mode |
CALL (@C0A0) | CARD P6 | Disable keyboard input to printer |
CALL (@C030) | CARD P7 | F&M Feature Select (CARD P7 is only available in F&M ROM version 1.1 or 1.2, in 1.0 use CALL (@C030)) |
CALL (@C0C0) | CARD P8 | Memory dump |
CALL (@C0D0, m) | Shape characters m = 1: Default m = 2: small shift m = 3: capitals shift (F&M rom only) |
|
CARD P9 | Shape lower case characters (only available in F&M ROM) |
|
CALL (@C0E0) | CARD P10 | Self test |
CALL (@C0F0) | CARD P11 | Recall Basic after reset, will only work if Basic program started with '10 REM' before restart (only available in F&M ROM) |
CALL (@C800) | TURBO PSAVE (F&M rom only) | |
CALL (@C810) | TURBO PLOAD (F&M rom only) | |
CALL (@C820) | TURBO DSAVE (F&M rom only) | |
CALL (@C830) | TURBO DLOAD (F&M rom only) | |
CALL (@C800)+ | TURBO PSAVE+ (F&M rom only) | |
CALL (@C810)+ | TURBO PLOAD+ (F&M rom only) | |
CALL (@C820)+ | TURBO DSAVE+ (F&M rom only) | |
CALL (@C830)+ | TURBO DLOAD+ (F&M rom only) |
Note: if the expansion box is used the user should enable the standard printer card first before any assembly call is initiated. This can be done by the OUT 1 instruction or in BASIC by using any CARD Pm statement before the CALL statement.
Serial Printer Controller
OUT 2 is used to send a bit to the printer and INP 2 for the printer status and to start a new range of bits for the next byte.
Address @41B0:
b0-5: Number of stop bits.
b6: If 1 special characters will be send to the printer, if 0 the hex value will be send.
b7: TV bit, if 1 the text to be printed will also be shown on the TV screen.
Address @41B2:
b0-3: Indicate the number of bits, 5, 7 or 8.
b4: If 1 parity will be send
b5: If 1 even parity (ignored if b4 = 0)
b6: If 1 no line feed to the printer
Address @41B3:
Pause after return in multiple of 10 ms.
Serial Printer CALL and CARD Routines
The printer can be activated by using the CARD Pm commands as described below and on the Expansion Box page. If no expansion box is used the same commands can be activated by CALL statements:
CALL Syntax | CARD Syntax | Function |
CALL (@C040, m) | CARD P0m | Selection routine (m = 1-11, for P1-P11) |
CALL (@C050) | CARD P1 | Switch off the printer |
CALL (@C060) | CARD P2 | Switch on the printer with control character suppressed |
CALL (@C070) | CARD P3 | Switch on the printer |
CALL (@C080) | CARD P4 | Switch on the printer and TV display mode with control character suppressed |
CALL (@C090) | CARD P5 | Switch on the printer and TV display mode |
CALL (@C0A0) | CARD P6 | Disable keyboard input to printer |
CALL (@C0B0) | CARD P7 | Change RS232 Settings |
CALL (@C0E0) | CARD P10 | Self test |
Note: if the expansion box is used the user should enable the standard printer card first before any assembly call is initiated. This can be done by the OUT 1 instruction or in BASIC by using any CARD Pm statement before the CALL statement.