The text of a manual · part 24 of 38
PEN*KEY 6100 Computer Programmer's Reference Guide: Section 6: Conversions and Interfaces, pages 207 to 216
Pages 207 to 216 of 328, from PEN*KEY 6100 Computer Programmer's Reference Guide
The original document is the PDF (1.2 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.
Filed in the catalog under the Intermec 6110
Page 207
SECTION 6
Conversions and Interfaces
INT 15h, Function AX = 010Ah: Accept Message from Queue (No Pend)
6. Conversions and Interfaces
4000API On Entry: AH = 01h AL = 0Ah ES:BX = Pointer to queue On Return: AX = (Undefined) DX:CX = Pointer to queue message node if queue not empty; 0 if queue empty INT 15h, Function AX = 010Bh: Post Message to Queue 4000API On Entry: AH = 01h AL = 0Bh ES:BX = Pointer to queue DX:CX = Pointer to queue message node On Return: AX = (Undefined) INT 15h, Function AX = 010Ch: Delay Current Task 4000API On Entry: AH = 01h AL = 0Ch DX:CX = Timeout value in milliseconds; 0 forces a task switch On Return: AX = (Undefined) " NOTE:
INTERRUPT ROUTINES MUST NOT ISSUE THIS CALL.
INT 15h, Function AX = 010Dh: Initialize a Queue Structure as Empty 4000API On Entry: AH = 01h AL = 0Dh ES:BX = Pointing at queue. On Return: None INT 15h, Function AX = 010Eh: Enable Time-Slicing 4000API On Entry: AH = 01h AL = 0Eh On Return: None PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-71
Page 208
Conversions and Interfaces
SECTION 6
INT 15h, Function AX = 010Fh: Disable Time-Slicing
6. Conversions and Interfaces
4000API On Entry: AH = 01h AL = 0Fh On Return: None INT 15h, Function AX = 0110h: Set Task Identifier 4000API On Entry: AH = 01h AL = 10h CX = New task ID for current task On Return: None INT 15h, Function AX = 01F4h: Accumulate CRC 16h 4000API The CRC is computed for the block using the seed passed in BX. The generator polynomial is CRC-16 = X**16 + X**15 + X**2 + X. On Entry: AH = 01h AL = 0F4h DS:SI = Points at the data block CX = Contains the block length in bytes BX = Contains the CRC seed Output DS:SI = Points past the end of the block CX = Zero AX = Contains the CRC
6-72
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 209
SECTION 6
Conversions and Interfaces
INT 15h, Function AX = 01F5h: Exchange Network Packets 4000API
On Entry: AH = 01h AL = 0F5h ES:BX = Pointer to cbuf to receive DS:DI = Pointer to cbuf to send DL = COM port (0 or 1) CX = Timeout value in milliseconds for send and receive On Return: AX = (Undefined) DX = (Undefined) CX = +Length or -Error -21 = Packet too long for this address -41 = CRC error in packet for this address -A1 = Timeout, transmit operation did not complete -B1 = Timeout, receive macro service has stalled -C1 = Timeout, transmit complete, no receive activity -FF = Timeout, receive activity Code fragment: cbuf len adr ctl buffer cbuf struc dd ? db ? db ? dw ? dw ? db ? dw ? db ? db ? dw ? ends
; BIOS scratch area ; unused by BIOS ; BIOS scratch area ; length of buffer data ; BIOS scratch area ; network address ; BIOS scratch area ; frame control field ; dup(?); frame i-field buffer ; BIOS scratch area
INT 15h, Function AX = 01F8h: Adjust CX for Processor Speed 4000API Programs that use software timing loops should use this function to adjust their loop counts to match the processor speed. The input value of CX is assumed to be the loop count for 4-Mhz operation (8-MHz crystal speed). On Entry: AH = 01h AL = 0F8h CX = Count value for 4-MHz operation On Return: CX = Adjusted count value for current processor speed Zero = 0 = No counter underflow error 1 = Counter value underflowed Carry =0 = No counter overflow error 1 = Counter value overflowed PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-73
6. Conversions and Interfaces
Allows access to the BIOS Media ACcess (MAC) layer for sending and then imĆ mediately receiving a network packet. Set the COM channel for the proper comĆ munication rate, parity, and bits before making this call.
Page 210
Conversions and Interfaces
SECTION 6
INT 15h, Function AX = 01FAh: Beep the Buzzer
6. Conversions and Interfaces
4000API On Entry: AH = 01h AL = 0FAh CX = Beep duration in milliseconds (Approximate) On Return: None INT 15h, Function AX = 01FBh: Return Pointer to BIOS Version 4000API On Entry: AH = 01h AL = 0FBh On Return: ES:BX = Pointer to nullĆterminated ASCII string that contains the BIOS version number. (For example, BIOS 3.00". However, if the /PC switch is used on 4000API, BIOS 3.00" is returned.) INT 15h, Function AX = 01FDh: Receive a Network Packet 4000API Allows access to the BIOS MAC layer for receiving a network packet. Set the COM channel for the proper communication rate, parity, and bits before making this call. On Entry: AH = 01h AL = 0FDh CX = Timeout value in milliseconds DX = COM port (0 or 1) ES:BX = Pointer to cbuf (cbuf as in Function 1F5h) es:[bx].len must indicate number bytes available in the buffer. On Return: DX = (Undefined) AX = (Undefined) CX = +length or -error (errors defined as Function 1F5h) es:[bx].adr = Contains the destination address for this packet (all addresses are received). es:[bx].ctl = Contains the packet control character. es:[bx].buffer = Contains additional packet information, if appropriate.
6-74
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 211
SECTION 6
Conversions and Interfaces
INT 15h, Function AX = 01FEh: Send a Network Packet
INT 15h, Function AX = 01FFh: Compute CRC 16 on Block of Data 4000API Generator polynomial is CRC-16 = X**16 + X**15 + X**2 + X. On Entry: AX = 01FFh DS:SI = Points at the data block CX = Contains the block length in bytes On Return: DS:SI = Points past the end of the block CX = Zero AX = CRC INT 15h, Function AX = 4200h: Request System Shutdown, Normal 4000API Wakes the unit from sleep with the ON/OFF key. Puts the processor to sleep to save power. It is issued by the BIOS whenever the system is idle. The display is turned off. On Entry: AH = 42h AL = 00h On Return: None INT 15h, Function AX = 4201h: Request System Shutdown, Low Battery 4000API On Entry: AH = 42h AL = 01h On Return: None " NOTE:
Applications you write should NOT allow the ON/OFF key to wake the unit from sleep. Force the display off, and turn off all peripherals. This function is issued by the BIOS in case of a critical power failure. PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-75
6. Conversions and Interfaces
4000API Allows access to the BIOS MAC layer for sending a network packet. Set the COM channel for the proper communication rate, parity, and bits before making this call. On Entry: AH = 01h AL = 0FEh DX = COM port (0 or 1) ES:BX = Pointer to cbuf (cbuf as in Function 1F5h) es:[bx].len = Length of the data to be sent. es:[bx].adr = The network address of this node. es:[bx].ctl = The packet control character. es:[bx].buffer = Additional packet information, if appropriate. On Return: AX = (Undefined) CX = (Undefined)
Page 212
Conversions and Interfaces
SECTION 6
INT 15h, Function AH = 4Fh: Translate Keyboard Scan Code
6. Conversions and Interfaces
4000API Invoked by the keyboard interrupt (INT 09h) handler to allow a user routine to translate the raw keyboard scan code. These scan codes are not PCĆcompatible. Refer to the topic on keyboard scan codes in the Standard Keyboard Interface paragraph on page 6-35 in this section. On Entry: AH = 4Fh AL = Original scan code Carry = Set On Return: AL = Original or modified scan code Carry = Set means to post the key value Reset forces the keyboard interrupt routine to ignore the key INT 15h, Function AH = 4Fh: Keyboard Intercept BIOS Called by INT 09h ISR each time a key is pressed. It creates alternate keyboard layouts. Scan codes may be substituted or discarded by the intercept routine. The default BIOS routine returns the input scan code unmodified and carry set. Applications can call INT 15h, Function C0h to determine whether this feature is supported by the BIOS. On Entry: AH = 4Fh AL = Scan code On Return: AL = Scan code Carry = 0 = Scan code processed, does not buffer scan code 1 = Scan code not processed, does buffer the scan code
6-76
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 213
SECTION 6
Conversions and Interfaces
INT 15h, Function AX = 5300h: APM Installation Check
On Entry: AH = 53h AL = 00h BX = 0000h On Return: Carry = 0 = APM is supported by BIOS AH = 1 - APM major version number (in BCD format) AL = 1 - APM minor version number (in BCD format) BH = ASCII character BL = ASCII character CX = APM flags: Bit 0 = 1 16Ćbit protected mode interface supported 1 = 1 32Ćbit protected mode interface supported 2 = 1 CPU Idle call slows processor clock speed 2 = 0 CPU Idle call stops the clock 3 = 1 APM BIOS Power Management disabled 4 = 1 APM BIOS Power Management disengaged Other bits reserved Carry = 1 if unsuccessful: AH = Error code 09h Unrecognized device ID 86h APM not present INT 15h, Function AX = 5301h: APM Real Mode Interface Connect ELANAPM Provides compatibility with the Microsoft APM 1.01 specification. Use of the call is not required for any of the APM functions to succeed, other than the DisconĆ nect function. On Entry: AH = 53h AL = 01h BX = 0000h On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 02h Real mode interface connection already established 05h 16Ćbit protected mode interface already established 07h 32Ćbit protected mode interface already established 09h Unrecognized device ID
PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-77
6. Conversions and Interfaces
ELANAPM Allows the APM driver (caller) to determine whether the system's BIOS supports the APM functionality and, if so, which version of the specification it supports. The APM version number returned from this call is the highest level of APM supported by the APM BIOS.
Page 214
Conversions and Interfaces
SECTION 6
INT 15h, Function AX = 5304h: APM Interface Disconnect
6. Conversions and Interfaces
ELANAPM Provides compatibility with the Microsoft APM 1.01 specification. Use of the call does not prevent any of the APM functions from succeeding or failing, except for the Connect function. Use of the function has no effect upon the power manageĆ ment configuration. On Entry: AH = 53h AL = 04h BX = 0000h On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 03h Interface not connected 09h Unrecognized device ID INT 15h, Function AX = 5305h: CPU Idle ELANAPM An APM driver or powerĆaware application can use this call to reduce the power consumed by the system. This call causes the system to halt the CPU and reĆ duce the clock frequency of the system until an interrupt occurs. Any interrupt routine that generates I/O activity to one of the defined activity monitors or isĆ sues an APM busy call causes the IDLE state to exit and return control to the driver or powerĆaware application. On Entry: AH = 53h AL = 05h On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 03h Interface not connected 0Bh Unrecognized device ID
6-78
PEN*KEY R 6100 Computer Programmer’s Reference Guide
Page 215
SECTION 6
Conversions and Interfaces
INT 15h, Function AX = 5306h: CPU Busy
INT 15h, Function AX = 5307h: Set Power State ELANAPM Sets system or device specified in power device ID into the requested power state. On Entry: AH = 53h AL = 07h BX = Power device ID: 0001h = All devices power managed by the APM BIOS 01XXh = Display 02XXh = PC Card controller 04XXh = RS-232 05XXh = Network adapters 06XXh = PC Card Slots 0EXXh = Intermec defined devices where XXh = unit number (0 based) unit number of FFh means all devices in this class CX = Power state: 0000h = Ready 0001h = Standby 0002h = Suspend 0003h = OFF 0004h = Last request processing notification 0005h = Last request rejected ** Supported only for Power Device ID 0001h On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 01h = Power management functionality disabled 09h = Unrecognized device ID 0Ah = Parameter value out of range 0Bh = Interface not engaged 60h = Unable to enter requested state PEN*KEY R 6100 Computer Programmer’s Reference Guide
6-79
6. Conversions and Interfaces
ELANAPM Informs the APM BIOS that system is now busy. Busy calls prevent the system from entering Idle or Suspend states and cause the timers associated with these states to be reset. System APM drivers or powerĆaware applications should call Busy during procĆ essing that does not generate I/O activity to one of the defined activity monitors to prevent slowdown of processing that occurs if the system enters Idle or SusĆ pend during normal application processing. On Entry: AH = 53h AL = 06h On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 03h Interface not connected 0Bh Unrecognized device ID
Page 216
Conversions and Interfaces
SECTION 6
INT 15h, Function AX = 5308h: Enable/Disable Power Management
6. Conversions and Interfaces
ELANAPM Enables or disables automatic System Idle and System Suspend functions. On Entry: AH = 53h AL = 08h BX = 0001h CX = Function code: 0000h Disable power management 0001h Enable power management On Return: Carry = 0 if successful: 1 if unsuccessful: AH = Error code: 01h Power management functionality disabled 03h Interface not connected 09h Unrecognized device ID 0Ah Parameter value out or range (Function code) INT 15h, Function AX = 530Ah: Get Power Status ELANAPM Returns the current power status of the system. On Entry: AH = 53h AL = 0Ah BX = 0001h = APM BIOS On Return: Carry = 0 if successful: BH = AC line status 00h OffĆline 01h OnĆline FFh (undefined) All other values reserved BL = Battery status 00h High 01h Low 02h Critical 03h Charging FFh (undefined) All other values reserved CH = Battery flag: Bit 0 = 1 High 1 = 1 Low 2 = 1 Critical 3 = 1 Charging 7 = 1 No system battery or powerfail has occurred All other bits reserved FFh = (undefined) All other values reserved
6-80
PEN*KEY R 6100 Computer Programmer’s Reference Guide