PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Best use of 'ES' mnemonic  (Read 1122 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 225
    • View Profile
Best use of 'ES' mnemonic
« on: July 03, 2018, 10:01:13 AM »
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?
James Zukowski
Sr. Developer - J&E

Brand Industrial Services

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3617
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Best use of 'ES' mnemonic
« Reply #1 on: July 03, 2018, 10:10:48 AM »
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$)

Changing the mnemonic will not change value of ESC however, only change what will output when you issue the 'ES' mnemonic to the device.