The text of a manual · part 21 of 42
JANUS PSK for C/C++ Reference Manual, Version 2.1, pages 201 to 210
Pages 201 to 210 of 414
The original document is the PDF (690 KB). 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 J2020, Intermec J2010 and Intermec J2050
Page 201
Software Interrupts
3
This chapter explains how to use software interrupts in your programs.
Using the Software Interrupts If PSK library functions are not available for your programming language, you can use software interrupts to invoke the special functions of the reader. These special functions are called reader services. Reader services include several functions, ranging in complexity from controlling the beeper to controlling the internal power management software. The reader supports other standard PC/AT interrupts that control the DOS and BIOS functions of a normal PC. It is beyond the scope of this manual to list all the normal PC interrupts. This chapter deals only with the interrupts specific to the JANUS family of PC-compatible readers. Use the following tables as a quick reference point for finding the interrupts you need. Interrupt Range
Usage
00H – 1FH
Internal hardware interrupts
20H – 3FH
DOS interrupts
3FH and above
Intermec-specific interrupts
3-3
Page 202
JANUS PSK for C/C++ Reference Manual
Vector Interrupts Vector
Standard PC
Reader
0
Divide by Zero
Divide by 0
1
Single Step
Single Step
2
Nonmaskable Interrupt
Nonmaskable Interrupt
3
Breakpoint
Breakpoint
4
Overflow
Overflow
5
Print Screen or Bounds Check
Print Screen or Bounds Check
6
Invalid Opcode
Invalid Opcode
7
Coprocessor Not Available
Coprocessor Not Available
8
System Timer (IRQ 0) or Double Fault
System Timer (IRQ 0) or Double Fault
9
Keyboard (IRQ 1) or Coprocessor
Keyboard (IRQ 1) or Coprocessor Segment Overflow
A
Reserved
Slave PIC (IRQ 2) or Invalid TSS
B
COM
COM 2 or 4 (IRQ 3) or Segment Not Present COM 2 is available only on the 2010 or 2050
C
COM
COM 1 or 3 (IRQ 4) or Stack Exception
D
Hard Disk or LPT
Intermec Count Gathering (IRQ 5) or General Protection
E
Floppy Disk
Reserved (IRQ 6) or Page Fault
F
LPT
Reserved (IRQ 7)
10–1F
BIOS
BIOS
20–3F
DOS
DOS
40–43
BIOS
Pointers to BIOS Table
44–45
BIOS
Reserved
46
BIOS
Pointers to BIOS Table
47–49
Reserved
4A
User Alarm (RTC)
4B–59
Reserved
5A–5B
NET
Cluster Adapter
5C
NET
Net BIOS
5D–5F
3-4
Power Management (IPM)
Page 203
Software Interrupts
3
Vector Interrupts (continued) Vector
Standard PC
60–66
Reader User Reserved
67
EMS Driver
EMS Driver
68–6F
VGA
Reserved
70
IRQ 8
RTC (IRQ 8)
71
IRQ 9
Reserved (IRQ 9)
72
IRQ 10
Keypad Scanner (IRQ 10)
73
IRQ 11
Reserved (IRQ 11)
74
IRQ 12
Reserved (IRQ 12)
75
IRQ 13
Reserved (IRQ 13)
76
IRQ 14
Reserved (IRQ 14)
77
IRQ 15
Power Management (IRQ 15)
78
System Configuration and Control Services
79
Display Services
7A
Bootstrap Services
7B
Reserved
7C
Beep Utility
7D
Reader Services
7E
Special Keypad Services
7F
Bootstrap Hook
80–F0
BASIC
BASIC
F1–FF
User Reserved
User Reserved
3-5
Page 204
JANUS PSK for C/C++ Reference Manual
Programming With Software Interrupts To invoke the Intermec utilities, you must have a programming language that supports interrupt-level routines. Most programming languages include this type of functionality, but the support methods vary from language to language. For example, Microsoft C uses the INT86 and INT86X functions to execute software interrupts, and Microsoft QuickBasic uses the INTERRUPT and INTERRUPTX calls. For more information about interrupt functions, see the documentation for your compiler and the programming examples in Appendix B, “Sample Interrupt Programs.”
Specific Software Interrupt Definitions The following pages list software interrupts that are unique to the JANUS readers, along with notes on usage and examples of how each interrupt is generated in a program. Note: Do not run programs that use PSK library functions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, you will receive an error message and the program will not run.
CAUTION
Caution Do not run programs that use Intermec-specific interrupt extensions on your PC, unless you have the JANUS Application Simulator installed. If you attempt to run these programs without the Simulator, they will cause your PC to lock up and possibly corrupt your system BIOS. Consiel N’exécutez pas de programmes utilisant des extensions d’interruption spécifiques à Intermec sur votre PC, à moins que JANUS Application Simulator soit installé. Si vous tentez de les exécuter sans le Simulator, ces programmes risquent de verrouiller votre PC et d’altérer le BIOS de votre système.
3-6
Page 205
INT 14H, Function 17H
3
INT 14H, Function 17H Receive Next Buffer Purpose:
This function requests the protocol handler to receive the next data buffer from the communications port. Use this function to receive subsequent transmissions after INT 14H, function 60H, has established the link to the protocol handle.
Call With:
AH =
17H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
Return Value:
AX = nnnn
See Also:
PHTERM.CPP in Appendix B, “Sample Interrupt Programs.”
Receive next buffer
One of the standard status codes defined in Appendix A, “Status Codes.”
3-7
Page 206
INT 14H, Function 50H
INT 14H, Function 50H Transmit Buffer Purpose:
This function transmits the contents of a data buffer using the selected communications port. You must install a protocol handler to use this interrupt.
Call With:
AH =
50H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
ES:BX =
Transmit buffer
Pointer to the data buffer structure defined in IM20LIB.H.
Return Value:
AX =
See Also:
PHTERM.CPP in Appendix B, “Sample Interrupt Programs.”
3-8 nnnn
One of the standard status codes defined in Appendix A, “Status Codes.”
Page 207
INT 14H, Function 60H
3
INT 14H, Function 60H Receive Buffer Purpose:
This function first establishes a link with the protocol handler and then receives the first record through the selected communications port.
Call With:
AH =
60H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
ES:BX =
Receive buffer
Pointer to the IM_COM_DATA_BUFFER data structure defined in IM20LIB.H. The buffer must be larger than 256 bytes.
Return Value:
AX =
Notes:
You must install a protocol handler to use this interrupt.
nnnn
One of the standard status codes defined in Appendix A, “Status Codes.”
Use this function only once at the start of your program. See Also:
PHTERM.CPP in Appendix B, “Sample Interrupt Programs.”
3-9
Page 208
INT 14H, Function 71H
INT 14H, Function 71H Protocol Extended Status Purpose:
This function returns the protocol extended status for a selected communications port.
Call With:
AH =
71H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
Protocol extended status
CX =
Status buffer length
ES:BX =
Pointer to the status buffer. See the file IM20LIB.H for details.
Return Value:
AX =
See Also:
EXSTAT.CPP in Appendix B, “Sample Interrupt Programs.”
3-10 nnnn
One of the standard status codes defined in Appendix A, “Status Codes.”
Page 209
INT 14H, Function 84H
3
INT 14H, Function 84H Cancel RX Buffer Purpose:
This function terminates the protocol handler’s connection to the receiving buffer.
Call With:
AH =
84H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
Return Value:
AX = nnnn
Notes:
You must install a protocol handler to use this interrupt.
See Also:
PHTERM.CPP in Appendix B, “Sample Interrupt Programs.”
Cancel RX buffer
One of the standard status codes defined in Appendix A, “Status Codes.”
3-11
Page 210
INT 14H, Function 85H
INT 14H, Function 85H Cancel TX Buffer Purpose:
This function terminates the protocol handler’s connection to the transmit buffer for a selected communications port.
Call With:
AH =
85H
DX =
Port ID: 00H COM1 01H COM2, scanner port (2010 and 2050) 03H COM4
Return Value:
AX = nnnn
Notes:
You must install a protocol handler to use this interrupt.
See Also:
PHTERM.CPP in Appendix B, “Sample Interrupt Programs.”
3-12
Cancel TX buffer
One of the standard status codes defined in Appendix A, “Status Codes.”