Dos considerations -2, Dos considerations – Rockwell Automation 1747-PCINT API Software for 1746 I/O User Manual
Page 18
2–2
Using the API
Publication 1747-6.5.3 June 1998
DOS Considerations
The DOS API is as consistent as possible with APIs for other operating system
platforms. This makes it easier for you to migrate applications and it simplifies
support.
To create a consistent API, careful consideration was given to these requirements:
This requirement:
Considerations:
memory mapping
The dual port RAM, or shared memory, is mapped automatically at power-up by the PCI bus in
the host processor’s memory address space on any even 8K boundary between 0xC0000 and
0xDFFFF. For MS-DOS, it is important that any installed memory managers (such as EMM386)
or other TSR software avoid accessing the 8K dual port memory window.
Place the base memory select jumper in 1M position to allow the PCI BIOS to assign a base
memory address.
DOS interrupts
An interrupt is automatically assigned to the scanner by the PCI bus at power-up.
control-break handler
Because communication with the scanner requires memory and interrupt resources (as
described above), improper termination of the host application can leave these resources
allocated by the scanner and unusable by other applications. For this reason the API includes a
default control-break handler.
The default control-break handler is installed by OC_OpenScanner. If you press a
[Ctrl-C]
or
[Ctrl-Break]
key sequence, the following prompt is displayed:
Terminate Application? (Y/N) _
A response of
Y
properly exits the application; a response of
N
causes the application to continue.
If you need a different control-break handler, you must install it after calling the OC_OpenScanner
function. Always call the OC_CloseScanner function before exiting an application.