home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / s920603.zip / HARDWARE.H < prev    next >
C/C++ Source or Header  |  1992-05-30  |  3KB  |  96 lines

  1. #ifndef    _PC_H
  2. #define    _PC_H
  3. #define _HARDWARE_H
  4.  
  5. #ifndef    _GLOBAL_H
  6. #include "global.h"
  7. #endif
  8.  
  9. #ifndef _SESSION_H
  10. #include "session.h"
  11. #endif
  12.  
  13. #define    NSW    10    /* Number of stopwatch "memories" */
  14.  
  15. struct stopwatch {
  16.     long calls;
  17.     int16 maxval;
  18.     int16 minval;
  19. };
  20. /* Macros for disabling and restoring interrupts inline.
  21.  * Since the previous flags are saved on the stack, these macros
  22.  * MUST be called in pairs within a single function.
  23.  */
  24. #define    DISABLE() {asm pushf;asm cli;}
  25. #define    RESTORE() {asm popf;}
  26.  
  27. extern struct stopwatch Sw[];
  28. extern int16 Intstk[];    /* Interrupt stack defined in pcgen.asm */
  29. extern int16 *Stktop;    /* Top of interrupt stack */
  30. extern void (*Shutdown[])();    /* List of functions to call at shutdown */
  31. extern int Mtasker;    /* Type of multitasker, if any */
  32.  
  33. /* In n8250.c: */
  34. void asytimer __ARGS((void));
  35.  
  36. /* In dos.c: */
  37. extern unsigned *Refcnt;
  38. int _creat __ARGS((const char *file,int mode));
  39. int _open __ARGS((const char *file,int mode));
  40. int dup __ARGS((int fd));
  41. int _close __ARGS((int fd));
  42. int _read __ARGS((int fd,void *buf,unsigned cnt));
  43. int _write __ARGS((int fd,void *buf,unsigned cnt));
  44. long _lseek __ARGS((int fd,long offset,int whence));
  45.  
  46. /* In scc.c: */
  47. void scctimer __ARGS((void));
  48. void sccstop __ARGS((void));
  49.  
  50. /* In pc.c: */
  51. long bioscnt __ARGS((void));
  52. void clrbit __ARGS((unsigned port,char bits));
  53. void ctick __ARGS((void));
  54. int32 divrem __ARGS((int32 dividend,int16 divisor));
  55. INTERRUPT  (*getirq __ARGS((unsigned int)) ) __ARGS((void));
  56. void freescreen __ARGS((struct session *sp));
  57. int getmask __ARGS((unsigned irq));
  58. int intcontext __ARGS((void));
  59. void ioinit __ARGS((void));
  60. void iostop __ARGS((void));
  61. void kbint __ARGS((void));
  62. int kbread __ARGS((void));
  63. int maskoff __ARGS((unsigned irq));
  64. int maskon __ARGS((unsigned irq));
  65. void newscreen __ARGS((struct session *sp));
  66. void pctick __ARGS((void));
  67. void setbit __ARGS((unsigned port,char bits));
  68. int setirq __ARGS((unsigned irq,INTERRUPT (*handler) __ARGS((void))));
  69. void sysreset __ARGS((void));
  70. void systick __ARGS((void));
  71. void writebit __ARGS((unsigned port,char mask,int val));
  72.  
  73. /* In pcgen.asm: */
  74. INTERRUPT btick __ARGS((void));
  75. void chktasker __ARGS((void));
  76. void chtimer __ARGS((INTERRUPT (*)()));
  77. int32 divrem __ARGS((int32 dividend,int16 divisor));
  78. int16 getss __ARGS((void));
  79. void giveup __ARGS((void));
  80. int kbraw __ARGS((void));
  81. int16 longdiv __ARGS((int16 divisor,int n,int16 *dividend));
  82. int16 longmul __ARGS((int16 multiplier,int n,int16 *multiplicand));
  83. INTERRUPT nullvec __ARGS((void));
  84. void uchtimer __ARGS((void));
  85. int16 clockbits __ARGS((void));
  86.  
  87. /* In stopwatch.asm: */
  88. void swstart __ARGS((void));
  89. int16 stopval __ARGS((void));
  90.  
  91. /* In sw.c: */
  92. void swstop __ARGS((int n));
  93.  
  94. #endif    /* _PC_H */
  95.  
  96.