We have a program written in C language under DOS and we want to compile it
and run it under QNX.
The problem is the following:
the program is using the library: dos.h and in particular the
macros:_disable, _enable, _dos_getvect, _dos_setvect.
What are the equivalent of these macros in QNX?
Danielle
Previously, Charles K. wrote in comp.os.qnx:
We have a program written in C language under DOS and we want to compile it
and run it under QNX.
The problem is the following:
the program is using the library: dos.h and in particular the
macros:_disable, _enable, _dos_getvect, _dos_setvect.
What are the equivalent of these macros in QNX?
_disable → _disable(),
_enable → _enable(),
_dos_setvect → qnx_hint_attach()
There is not equivalent to _dos_getvect, nor is one needed.
–
Mitchell Schoenbrun --------- maschoen@pobox.com
Oppse,
Did you mean QNX4 or NTO? My answer was for QNX4.
Previously, Mitchell Schoenbrun wrote in comp.os.qnx:
Previously, Charles K. wrote in comp.os.qnx:
We have a program written in C language under DOS and we want to compile it
and run it under QNX.
The problem is the following:
the program is using the library: dos.h and in particular the
macros:_disable, _enable, _dos_getvect, _dos_setvect.
What are the equivalent of these macros in QNX?
_disable → _disable(),
_enable → _enable(),
_dos_setvect → qnx_hint_attach()
There is not equivalent to _dos_getvect, nor is one needed.
–
Mitchell Schoenbrun --------- > maschoen@pobox.com
\
–
Mitchell Schoenbrun --------- maschoen@pobox.com
Charles K. <kha@proxyma.net> wrote:
We have a program written in C language under DOS and we want to compile it
and run it under QNX.
The problem is the following:
the program is using the library: dos.h and in particular the
macros:_disable, _enable, _dos_getvect, _dos_setvect.
What are the equivalent of these macros in QNX?
Which QNX?
Under QNX4:
Read the docs for qnx_hint_attach() for handling an interrupt – but
the method of handling is a lot different, the OS handles the interrupt
vector, register save/restores, issuing the EOI, etc.
For the enable/disable – grab /usr/include/sys/inline.h – it has
enable() and disable() macros in it.
Under QNX Neutrino (QNX 6 / QNX RTP):
Look at InterruptAttach() in the docs. See notes on qnx_hint_attach().
For enable/disable, look at InterruptLock() and InterruptUnlock().
-David
QNX Training Services
dagibbs@qnx.com