home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol158 / yampmmi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1984-04-29  |  3.5 KB  |  117 lines

  1. /*
  2. >>:yampmmi.h 11-01-83
  3.  *
  4.  * global equates for specific installation and modem ports
  5.  * Other modem specific stuff is in yam5.c
  6.  *
  7.  * This yamsys header for pmmi with error checking,
  8.  * for use with CI C86 compiler- 11-09-83 paul homchick
  9.  */
  10.  
  11. #define ANSWERBACK "\215\012C. SMITH NYC\215\012\021"
  12.  
  13. /* files have single letter ext so pip yam?????.? gets all source but no crl */
  14.  
  15. #define HELPFILE "YAMHELP.T"
  16. #define PHONES "PHONES.T"
  17. #define MYSYSTEM "#CPMPMMI,CC,HC,PA,PL\015"
  18. #define C86        /* compiler */
  19. #define USQ
  20. #define BRKKEY 0x00
  21. #define LOOPBACKNONO "\020\003\021\023\033"
  22. #define BIGYAM
  23. #define CPM
  24. #define LOOPS 1370    /* timing value in sleep; compiler & cpu dependent, */
  25.             /* chosen so that sleep(n) will pause n 1/10ths for */
  26.             /* a 2Mhz processor */
  27. #define MOMCAL 400*CLKMHZ
  28. #define FLAVOR "Pmmi MM-103 / Heath Z-29 YAM"
  29. #define CLKMHZ 8
  30.  
  31. /* ********* following string must be in UPPER case ********* */
  32.  
  33. #define DISKS "ABCDEFGHIJKLMN"    /* legal disks for default selection */
  34. #define MAXUSER 15    /* maximum user number */
  35.  
  36. /* defines for Heath/Zenith Z/H19 terminal */
  37.  
  38. #define STATLINE    /* do special status line information */
  39. #define Z19            /* terminal type */
  40.  
  41.     /* 25th line off, wrap at end of line*/
  42.  
  43. #define TERMRESET    "\033y1\033x9\033v"
  44. #define TERMINIT    "\033z"
  45.  
  46.     /* mode for replot -clear screen, no 25th, no wrap. Added Home'n'Clear. */
  47.  
  48. #define TERMREPLOT    "\033E\033y1\033w"
  49.  
  50. #define DPORT MDATA
  51. #define SPORT MSTAT
  52. #define DEFBAUD 300
  53.  
  54.  
  55. /* modem defines */
  56.  
  57. #define PMMI TRUE
  58. #define FLIP TRUE
  59. #define MIREADY (inportb(MSTAT)& MIMASK)    /* value != 0 if char available */
  60. #define MICHAR inportb(Dport)            /* get char assuming miready */
  61. #define MOREADY (inportb(MSTAT) & MOMASK)    /* modem ready to load next char */
  62. #define MODOUT(x) outportb(Dport, x)
  63. #define MODATA Dport         /* modem data output port */
  64. #define PPS 125            /* use 125 for 20pps or 250 for 10pps */
  65. #define AUTODIAL TRUE
  66.  
  67. /* modem error handling */
  68.  
  69. #define OVRRNMASK 0x10        /* overrun error */
  70. #define FRMMASK 0x20        /* framing error */
  71. #define MIREADYERROR        /* rx data ready and error bits in same reg */
  72. #define CDO FALSE        /* don't bother with carrier detect */
  73. #define MIREADYMASK MIMASK    /* rx character available */
  74. #define MIERRORMASK (OVRRNMASK & FRMMASK) /* error condition framing and overrun only */
  75.  
  76. /* console and printer */
  77.  
  78. #define POREADY bios(15,0,0)
  79. #define LPOUT(x) bdos(5,x)
  80.  
  81. #define CIREADY bdos(6,0xFE)
  82. #define CICHAR bdos(6,0xFF)
  83. #define COREADY (inportb(CSTAT)&COMASK)
  84. #define TTYOUT(x) bios(4,x,0)
  85.  
  86. #include "stdio.h"
  87.  
  88. #define TWIDTH    80    /* # of columns    */
  89. #define TLENGTH    24    /* # of lines    */
  90. #define CLEARS    "\033E"    /* String to clear screen on console    */
  91. #define INTOREV    "\033p"    /* String to switch console into reverse video    */
  92. #define OUTAREV "\033q"    /* String to switch console OUT of reverse video  */
  93. #define CURSOROFF "\033x5"    /* String to turn cursor off    */
  94. #define CURSORON "\033y5"    /* String to turn cursor on    */
  95. #define ESC    '\033'    /* Standard ASCII 'escape' character    */
  96.  
  97. /*
  98.  *    Console serial port characteristics:
  99.  */
  100.  
  101. #define CSTAT    0x5d    /* status port    */
  102. #define CDATA    0x5c    /* data port    */
  103. #define CIMASK    0x02    /* input data ready mask   */
  104. #define COMASK    0x01    /* output data ready mask  */
  105.  
  106. /*
  107.  *     Modem characteristics:
  108.  */
  109.  
  110. #define    MSTAT    0xe0    /* status port    */
  111. #define MDATA    0xe1    /* data port    */
  112. #define MIMASK    0x02    /* input data ready mask    */
  113. #define MOMASK    0x01    /* ready to send a character mask    */
  114. #define MAHI    1    /* True if status logic active high  */
  115. #define MRESET    0    /* True if status port needs to be reset */
  116. #define MRESETVAL 0    /* If MRESET true, this is the byte to send */
  117.