Files
harbour-core/harbour/external/hbpmcom/wrap_ow.c
Przemyslaw Czerpak 6dc33b15c3 2010-10-22 15:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/external/Makefile
  + harbour/external/hbpmcom
  + harbour/external/hbpmcom/Makefile
  + harbour/external/hbpmcom/wrap_ow.c
  + harbour/external/hbpmcom/com.c
  + harbour/external/hbpmcom/irq.h
  + harbour/external/hbpmcom/irq_ow.c
  + harbour/external/hbpmcom/irq_g.c
  + harbour/external/hbpmcom/com.h
  + harbour/external/hbpmcom/wrap_g.sx
  + harbour/external/hbpmcom/irqwrap.h
  + harbour/external/hbpmcom/doc
  + harbour/external/hbpmcom/doc/readme.txt
  + harbour/external/hbpmcom/doc/com.txt
    + added PMCOM library - RS-232 DOS communication library by Peter Marinov.
      The original PMCOM 1.0 library has not been updated for very long
      time and this code is quite strongly modified so I haven't tried to
      generate any .diff files. I do not think it will be possible to make
      autoamtic merege with newwer version (if any appears).
      This is also the reason I decided to use HBPMCOM name instead of
      PMCOM to avoid potential conflicts with some local versions of
      this library.
      TODO: add support for flow control - now flow control functions are
            dummy and do not enable any handshaking.

  * harbour/src/rtl/hbcom.c
  * harbour/config/dos/watcom.mk
  * harbour/config/dos/djgpp.mk
    + added support for serial port in DOS builds (hb_com*() PRG and C API)
      using HBPMCOM library.
2010-10-22 13:09:55 +00:00

72 lines
1.1 KiB
C

/* wrap_ow.c */
#include <mem.h>
#include <dos.h>
#include "irqwrap.h"
/*
IRQ wrappers for OpenWatcom
*/
typedef void interrupt (*IRQ_ISR)(void);
extern TIRQWrapper OldIRQVectors[16];
#define IRQWRAP(x)\
void interrupt IRQWrap##x(void)\
{\
if (IRQHandlers[##x]())\
((IRQ_ISR)OldIRQVectors[##x])();\
}
void interrupt IRQWrap(void)
{
}
IRQWRAP(0);
IRQWRAP(1);
IRQWRAP(2);
IRQWRAP(3);
IRQWRAP(4);
IRQWRAP(5);
IRQWRAP(6);
IRQWRAP(7);
IRQWRAP(8);
IRQWRAP(9);
IRQWRAP(10);
IRQWRAP(11);
IRQWRAP(12);
IRQWRAP(13);
IRQWRAP(14);
IRQWRAP(15);
void interrupt IRQWrap_End(void)
{
}
TIRQWrapper IRQWrappers[16] =
{
(TIRQWrapper)IRQWrap0,
(TIRQWrapper)IRQWrap1,
(TIRQWrapper)IRQWrap2,
(TIRQWrapper)IRQWrap3,
(TIRQWrapper)IRQWrap4,
(TIRQWrapper)IRQWrap5,
(TIRQWrapper)IRQWrap6,
(TIRQWrapper)IRQWrap7,
(TIRQWrapper)IRQWrap8,
(TIRQWrapper)IRQWrap9,
(TIRQWrapper)IRQWrap10,
(TIRQWrapper)IRQWrap11,
(TIRQWrapper)IRQWrap12,
(TIRQWrapper)IRQWrap13,
(TIRQWrapper)IRQWrap14,
(TIRQWrapper)IRQWrap15
};
TIRQHandler IRQHandlers[16] =
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};