The text of a manual · part 22 of 28
PEN*KEY 6400 Computer Programmer's Reference Guide: Section 5: BIOS Interrupt Support, pages 181 to 188
Pages 181 to 188 of 234, from PEN*KEY 6400 Computer Programmer's Reference Guide
The original document is the PDF (1.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 6400
Page 181
BIOS Interrupt Support
SECTION 5
INT 7Ah, Scanner Services: 6400IKPS.EXE INT 7Ah, Function AH = 80h: Scanner On
SCANBIOS Turns the scanner on. The scanning system must be on in order to scan and decode bar codes. On Entry: AH = 80h AL = 0FFh = On decode, the API puts the SCAN_Key into the BIOS key buffer, then the value is read from the keyboard by the application. BX = SCAN_Key value. The application recognizes that bar code data should be available when this value is read from the keyboard.
On Return: None
INT 7Ah, Function AH = 81h: Scanner Off
SCANBIOS Turns the scanner off. The scanning system must be off when the Set Scanner Type function is called. On Entry:
AH = 81h
On Return: None
INT 7Ah, Function AH = 82h: Set Scanner Type
SCANBIOS Establishes the scanner type. It must be issued while the scanner is off. Using this function while the scanner is on, has no effect. On Entry: AH = 82h DL = Scanning type 02h Laser 10h Auto_Scan causes the scanner to scan and decode once, when the Scanner On function is called. To do an Auto_Scan, calls are required to be made to the Scanner Off function, to the Set Scanner Type function (optional), and to the Scanner On function.
On Return: None
PEN*KEYR 6400 Programmer’s Reference Guide
5-71
Page 182
SECTION 5
BIOS Interrupt Support
INT 7Ah, Function AH = 83h: Set Bar Code Options
SCANBIOS Tells the scanning system which symbologies to enable, as well as which options. All symbologies are disabled; then those symbology types, passed in the Symbology_Type member of the Barcode_Options structure, are enabled. Some of the following options are validated by the internal engine and some are validated by software. An explanation of these validations is included in the Internal Laser Engine Symbology Validations paragraph and the Tethered Laser Symbology Validations paragraph, in the Supported DOS Applications section of this publication. This function can be called anytime to set the bar code options. On Entry:
AH = 83h DS:DX = Segment:Offset pointer to array of Barcode_Options structures, with Symbology_Type of last structure set to 00h.
On Return: None
Definitions of structures, values, and bits: Barcode_Options structure byte Symbology_Type byte Minimum_length byte Maximum_length byte Generic_Options byte Symbology_Options byte Drop_Leading_Trailing byte Reserved_1 byte Fixed_Length_1 byte Fixed_Length_2 byte Fixed_Length_3 byte Fixed_Length_4 Symbology_Type values Hex ASCII Symbology 0x00 <NUL> last Barcode_Option structure in array 0x01 <SOH> ignore this Barcode_Option structure 0x08 <BS> MSI Plessey 0x10 <DLE> UPC 0x11 <DC1> EAN H 0x20 <space> Codabar 0x28 ’(’ Code 39 0x32 ’2’ Interleaved 2 of 5 0x40 ’@’ Code 128 H
5-72
The enabling Symbology_Type, for EAN-8 with addon 5, is different from the Decoded_Symbology_Type (see the Read Bar Code Data function), to differentiate it from the ambiguous EAN-13 with no addon.
PEN*KEYR 6400 Programmer’s Reference Guide
Page 183
BIOS Interrupt Support
SECTION 5
Minimum_Length value Maximum_Length value The number of decoded bar code data characters must be between the value of Minimum_Length and the Maximum_Length, inclusive. Minimum_Length must not be greater than Maximum_Length. If any of the fixed lengths are non-zero, then these two parameters are ignored. If all six parameters are zero, then any length bar code is decoded. The Minimum_Length and Maximum_Length values are not used for Interleaved 2 of 5 bar codes. Use the Fixed_Length_1 and Fixed_Length_2 parameters. Generic_Options bits bit 0 Enable redundancy for this symbology. If any Barcode_Options structure has this bit set, then the engine redundancy is enabled for all symbologies. Symbology_Options bits MSI Plessey Symbology_Options bits bit 1 Enable validation application check digit as modulus 10 type, bit 2 Enable validation application check digit as modulus 11 type: Bits 1 and 2 are mutually exclusive. If both are on, then both mod check types are executed, causing a validation failure, resulting in no decode. The check character is returned as part of the decoded data. UPC and/or EAN Symbology_Options bits bit 0 Enable decode of addon 2, if detectable, bit 1 Enable decode of addon 5, if detectable, bit 3 Enable decode of UPC-E (short UPC), bit 4 Enable expanding UPC-E format to UPC-A: UPC-E bar codes are expanded to the UPC-A format by insertion of the suppressed zeros. Expansion reverses the UPC-specified process for suppressing the zeros from the original bar code. bit 5 Enable expanding EAN-8 format to EAN-13: EAN-8 bar codes are expanded to the full EAN-13 format by insertion of five leading zeros, and calculation of a new check digit. Decode formats for UPC/EAN are as follows: Format Bar Code UPC-E nddddddC EAN-8 fndddddC UPC-A nddddddddddC EAN-13 fnddddddddddC * UPC-E Addon 2 nddddddCaa EAN-8 Addon 2 fndddddCaa UPC-A Addon 2 nddddddddddCaa EAN-13 Addon 2 fnddddddddddCaa UPC-E Addon 5 nddddddCaaaaa EAN-8 Addon 5 fndddddCaaaaa * UPC-A Addon 5 nddddddddddCaaaaa EAN-13 Addon 5 fnddddddddddCaaaaa
PEN*KEYR 6400 Programmer’s Reference Guide
5-73
Page 184
SECTION 5
BIOS Interrupt Support where: n d C f a a number system digit a bar code data digit a check digit an EAN flag 1 an addon digit
* The Decoded_Symbology_Type (see the Read Bar Code Data function) is different from the enabling Symbology_Type for EAN-8 with addon 5 to differentiate it from the ambiguous EAN-13 with no addon. Code 39 Symbology_Options bits bit 0 Enable mod check validation: The last encoded character is validated as a modulus 43 check character, as specified by Automatic Identification Manufacturers (AIM) appendix E.3. The check character is returned as part of the decoded data. bit 1 Enable concatenation: Each Code 39 bar code beginning with a space character causes the next bar code to be appended to the prior decodes as specified by AIM (appendix E.1). The leading space character is not included in the decode data. Refer to the Read Bar Code Data function output values for CX and DX, for a description of the concatenation process. bit 2 Enable translation of full ASCII escape sequences: Encoded escape sequences are translated to ASCII characters according to the full ASCII mode of AIM (appendix E.2). An invalid Code 39 full ASCII sequence causes a no-decode. Interleaved 2 of 5 Symbology_Options bits bit 0 Enable validation of I2/5 check digit: The last digit of I2/5 bar codes is validated as a check digit as specified by AIM (appendix E.1). The check digit is returned as part of the decoded data. Code 128 Symbology_Options bits bit 0 Enable UCC/EAN-128 format: UCC/EAN Func1 support is provided with minor distinction from the specification. Embedded Func1 characters are decoded as the ASCII sequence, “]C1”, instead of <GS> (0x1D), because <GS> is not displayable. If the UCC/EAN-128 standard support is enabled and a Func1 character immediately follows the Start character, then “]C1” is prepended to the decoded bar code data, and each subsequent Func1 in the bar code will be decoded as “]C1”. If the UCC/EAN-128 standard support is enabled and a Func1 character does NOT immediately follow the start character then “]C0” is prepended to the decoded bar code data and each subsequent Func1 is dropped from the decoded bar code data. If the UCC/EAN-128 standard support is not enabled, then Func1 characters in the bar code are dropped from the decoded data. Func2 concatenation is always enabled. Func3 is used by the physical scanner device; and the decoded data is not returned. Func4 is ignored and dropped from the decoded data. 5-74
PEN*KEYR 6400 Programmer’s Reference Guide
Page 185
SECTION 5
BIOS Interrupt Support
Drop_Leading_Trailing Byte value The high 4 bits represent the number of characters to remove from the leading end of the bar code data. The low 4 bits represent the number of characters to remove from the trailing end of the bar code data. The drop trailing option drops characters from the trailing end of UPC and EAN addon supplements. This option cannot be used to remove the check digit character from UPC or EAN bar codes when they have an addon supplement. Fixed_Length_1 value Fixed_Length_2 value Fixed_Length_3 value Fixed_Length_4 value If any Fixed_Length is non-zero, then only bar codes of those lengths are valid; and Minimum_Length and Maximum_Length are ignored. Fixed_Length values of zero are ignored. Use Fixed_Length s to increase the reliability of symbologies that are less secure. For Interleaved 2 of 5: Fixed_Length_3 and Fixed_Length_4 are ignored. Fixed_Length_1 must be set to the actual number of barcode digits. A second barcode length can be set to Fixed_length_2. If only one length of barcode is to be scanned, set Fixed_Length_2 to zero.
PEN*KEYR 6400 Programmer’s Reference Guide
5-75
Page 186
SECTION 5
BIOS Interrupt Support
INT 7Ah, Function AH = 84h: Read Bar Code Data
SCANBIOS Initiates the reading of bar code data, then returns with a value that determines if bar code data is available at the location specified by the input pointer. On Entry: AH = 84h DS:DX = Segment:Offset pointer to buffer where bar code is to be stored CX = Length of buffer
On Return:
AL = Scanner data indicator 0 = Bar code data available 1 = No bar code data BH = Decode type (Decoded_Symbology_Type) ASCII Symbology HEX 0x08 <BS> MSI Plessey 0x10 <DLE> UPC-A with or without addon 2 or 5 UPC-E with or without addon 2 or 5 0x11 <DC1> EAN-13 with or without addon 2 or 5 EAN-8 with or without addon 2 EAN-8 without addon 5 0x12 <DC2> EAN-8 with addon 5 (ambiguous with EAN-13 with no addon) H 0x20 <space> Codabar 0x28 ’(’ Code 39 0x32 ’2’ Interleaved 2 of 5 0x40 ’@’ Code 128 H The Decoded_Symbology_Type for EAN-8 with addon 5, is different from the enabling Symbology_Type (see the Set Bar Code Options function) to differentiate it from the ambiguous EAN-13 with on addon. BL = Direction of scan 0 = Reverse – right-to-left 1 = Forward – left-to-right CX = Length of data read (number of bar code characters) This includes previously concatenated characters for those symbologies that have concatenation enabled. DX = Previously concatenated characters. This is the number of characters that were concatenated (prepended) to this bar code from previous scan(s), excluding this scan. The high bit of the DX register is set, if this decode indicates a need to concatenate the next scan. Concatenation is terminated when one of the following is true: 1 a non-concatenating bar code is scanned 2 a different symbology is decoded (where the Decoded_Symbology_Type changes) 3 the Flush Scanner Concatenation Buffer function is called
5-76
PEN*KEYR 6400 Programmer’s Reference Guide
Page 187
BIOS Interrupt Support
SECTION 5
INT 7Ah, Function AH = FEh: Flush Scanner Concatenation Buffer
SCANBIOS The concatenation buffer is flushed automatically, if a non-concatenating bar code is scanned or the decoded symbology type changes. The application may need to flush the buffer, if it recognizes that the last bar code scanned was concatenated. On Entry: AH = 0FEh
On Return: None
PEN*KEYR 6400 Programmer’s Reference Guide
5-77
Page 188
BIOS Interrupt Support
5-78
PEN*KEYR 6400 Programmer’s Reference Guide
SECTION 5