Best use of 'ES' mnemonic

Started by James Zukowski, July 03, 2018, 10:01:13 AM

Previous topic - Next topic

James Zukowski

There are several methods within PxPlus to generate an ESCape character: CHR(27), $1B$, esc variable, and 'ES' mnemonic. In most cases, the 'ES' mnemonic is (and should be) set to a value of $1B$.
However, certain printers may use a different "attention" character, e.g., Printronix typically uses $01$. Would this be a better use of the 'ES' mnemonic, since a $1B$ wouldn't necessarily do what one would expect?
Thoughts?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Mike King

If you have a printer where the ESCAPE is other than $1B$ you can set the value of the 'ES' mnemonic in the device driver using the MNEMONIC directive.

For Example:
->open (1) "*memory*
->mnemonic (1) 'es'=$01$
->print (1) 'es'
->read record (1,ind=0) R$
->print hta(R$)
01
->


Changing the mnemonic will not change value of ESC however, only change what will output when you issue the 'ES' mnemonic to the device.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com