## Overview

The PR-STANDARD print driver simply sends a character stream to a one of the computers local ports, shared network printers or disk file. It makes no use of windows fonts or device contexts. The driver requires a setup/configuration file that is used at intialization time. Since characters are sent directly to the printer the only avaiable font(s) is the font that is part of the printers hardware. This driver is not well suited for distributing generic software but might be required for special printing devices.

## Configuration

The 1st phase of the configuation is to add a pr-standard device to the Device Page of the SM32 property pages:

Device: | X | Where X is usually the next available. 1 if you delete the LP pr-rtf device or 2 if you have not.
ID: | XX | Where XX is up to 6 characters and is the name used to OPEN this device. Must be LP if you intend to use LISTFILE/LTF(there can only be 1 device named LP). Other printer names are usually P1,P2 ect.
I/O Buffer: | 4096 |
Driver: | pr-standard: |
Driver Info: | xxx.xxx | Where xxx.xxx is the name of a file containing more configuartion info. Traditionally something like fx100.mne

## Mnemonics/Configuration File

There is a sample of this file call fx100.mne in the SamplesExtras directory. Lines beginning * are comment lines.

The .MNE PR-STANDARD Configuration File
LINE | NAME | WINDOWS | LINUX
1: | OS Name | PORT name such as LPT1 or COM1. Shared printer name like \\PSERVER\CANON. | There are 3 types: 1. Enter - to indicate the FID(0) device and enter lines 4(a),4(b),4(c) 2. Enter a physical device followed by a lock file name (eg./dev/lp /tmp/lp.lck) 3. Enter > follow a linux command to pipe print lines to the command (eg. >lp -o nobanner -s 2>/dev/null)
2: | Init String | This string is sent to the printer at open time. Enter - for no string ; Enter the string HEX format.
3: | Term String | This string is sent to the printer at close time. Enter - for no string ; Enter the string HEX format.
4: | Pass Thru | Always enter - lines 4(a),4(b) and 4(c) do not apply | IF the OS Name was NOT - THEN enter - here and lines 4(a),4(b) and 4(c) do not apply ELSE this line become lines 4(a),4(b),4(c)
4(a): | Pass On | Not Applicable | A HEX string that will turn on the Pass Thru Port
4(b): | Pass Off | Not Applicable | A HEX string that will turn off the Pass Thru Port
4(c): | Off Code | Not Applicable | Enter # of characters returned when Print Thru port turns off. 0 for none.
5: | Ex Print | The 1st # is the # of columns an expanded print character requires. The second # is the # of lines an expanded print character requires.(eg. 2 1)
6: | SP Cols | The number of columns when in SP mode
7: | CP Cols | The number of columns when in CP mode
8: | Mnemonics Start | Should always contain -start- This is the start of what is called the user mnemonic table. Each line folowing has the following format: XX HHHH Y where XX is the mnemonic name.(eg. CP) where HHHH is a hex string that execute the mnemonic.(eg. OF) where Y=0 if the mnemonic cause the printer to return to column 0 ELSE Y=1
8+N: |  | the Nth mnemonic in the user mnemonic table.(eg EP 1B5701 1)
| Mnemonics End | Should always contain -end-
Last | Open Mode | Contains MS if the driver starts in serial mode or MP to start in parallel mode

## Parallel/Serial Mode

Parallel MODE (buffered)
This mode (set by 'MP') compiles an entire line before sending it to the printer. This mode attemps to keep track of current position, Expanded Print mode,Compressed Print Mode, Bold(double strike) Mode,Underline Mode by keeping all the characters in buffer before printing. In this mode the following features are supported inside the driver:

single at positiong @(x)
Simulates a Vertical Format Unit (VFU) slew positioning 'S2'->'S8'('VT'='S6'). Slew channels have to be loaded by 'SL',A$,'EL'. A$ contains 1 charater for each line of the page. Start with a "1" (top of form) and contains slew positions numbers "2"->"8" "0"=no stop.
double striking character attribute ('BB' to start 'EB' to end)
over striking with underline char ('BU' to start 'EU' to end)
'EP' applies to the whole line and is turned off by 'CR'. 'FF','LF','Sx' will execute a 'CR' to empty buffer before positioning takes place.

SERIAL MODE
This mode (set by 'MS') sends all characters and mnemonics and data directly to the printer. There is no @ positioning allowed.

## Internal Mnemonics

## 'BB' and 'EB' - Begin/End Bold

PARALLEL MODE: Set/Reset bold mode.
SERIAL MODE: Error 29. If no user mnemonic

## 'BG' and 'EG' - Begin/End Error 29

Once the 'EG' is output no ERROR 29's will be generated for invalid MNEMONICS. The 'BG' restores the generation of ERROR 29's

## 'BO' and 'EO' - Begin/End Output Transparency

Once a 'BO' has been output no MNEMONICS are detected except the 'EO' MNEMONIC.

## 'BS' - Backspace

PARALLEL MODE: decrements the buffer position by 1
SERIAL MODE: Outputs user mnemonic or $08$

## 'BU' and 'EU' - Begin/End Underline

PARALLEL MODE: Set/Reset underline mode.
SERIAL MODE: Error 29. If no user mnemonic

## 'CP' - Compressed Print

PARALLEL MODE: Adjust buffer line size and outputs the user mnemonic or $0F$
SERIAL MODE: Error 29. If no user mnemonic

## 'CR' - Carriage Return

PARALLEL MODE: Outputs the buffer
SERIAL MODE: Outputs user mnemonic or $0D$

## 'EP' - Expanded Print

PARALLEL MODE: Set/Reset expanded print mode. Note: At Line print time(CR) the 'EP' Mnemonic from the user mnemonic table is output befoe the line. If there is no 'EP' user mnemonic an Error 29 occurs.
SERIAL MODE: Error 29. If no user mnemonic

## 'ES' - Escape

PARALLEL MODE: Error 29
SERIAL MODE: Outputs $1B$

## 'FF' - Form Feed

PARALLEL MODE: Prints the line in the buffer. Then if the VFU has been loaded positions the paper to channel 1. If the VFU has not been loaded outputs either the 'FF' from the user mnemonics or $0C$
SERIAL MODE: Outputs either the 'FF' from the user mnemonics or $0D0C$

## 'LF' - Line Feed

PARALLEL MODE: Prints the line in the buffer. Then outputs either the 'LF' from the user mnemonics or $0A$
SERIAL MODE: outputs either the 'LF' from the user mnemonics or $0D0A$

## 'MP' - Parallel Mode

Turns on Parallel Mode.

## 'MS' - Serial Mode

Turns on Serial Mode.

## 'RB' - Ring Bell

Outputs $07$

## 'S2','S3','S4','S4','S6','S7' and'S8' - Slew

PARALLEL MODE: Prints the line in the buffer. Then calculates the number of Lines between the current line and the destination line and outputs that number of $0A$ or a single $0A$ if the destination line not loaded in the VFU
SERIAL MODE: Error 29. If no user mnemonic

## 'SL' and 'EL' - Start/End Load

PARALLEL MODE: Loads the VFU as described above
SERIAL MODE: Error 29. If no user mnemonic

## 'SP' - Standard Print

PARALLEL MODE: Adjust buffer line size and outputs the user mnemonic or $12$
SERIAL MODE: Error 29. If no user mnemonic

## 'VT' - Vertical Tab

PARALLEL MODE: Prints the line in the buffer. If the VFU is not loaded outputs either the 'VT' from the user mnemonics or $0B$. If the VFU is loaded then same as 'S6'
SERIAL MODE: If the a user 'VT' mnemonic does not exist optputs $0D0B$