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

  1. /*
  2. >>:yamsys.h 10-30-83
  3.  *
  4.  * computer innovations c86 version
  5.  *
  6.  * global equates for specific installation and modem ports
  7.  * Other modem specific stuff is in yam5.c
  8.  *
  9.  * This header file supports a hayes smartmodem using
  10.  * a Godbout Interfacer 3 or 4 i/o board.
  11.  */
  12.  
  13. #define ANSWERBACK "\r\n999-999-9999 J. Doe  N.Y. New York\r\n"
  14. /* files have single letter ext so pip yam?????.? gets all source but no crl */
  15. #define HELPFILE "YAMHELP.T"
  16. #define PHONES "PHONES.T"
  17. #define MYSYSTEM "#CPMPMMI,CC,HC,PA,PL\015"
  18. #define FLAVOR "Smartmodem / IF3 / Heath Z-29 YAM"
  19. #define C86
  20. #define USQ
  21. #define BRKKEY 0x00
  22. #define LOOPBACKNONO "\020\003\021\023\033"
  23. #define BIGYAM
  24. #define CPM
  25. #define CLKMHZ 8
  26. #define LOOPS 1370    /* timing value in sleep; compiler & cpu dependent */
  27.             /* chosen so that sleep(n) will pause n 1/10ths for */
  28.             /* a 2Mhz processor */
  29. #define MOMCAL 400*CLKMHZ
  30. #define SECPBLK 16    /* 2k blocks on CDR DD controller 5/8" disk */
  31. /* ********* following string must be in UPPER case ********* */
  32. #define DISKS "ABCDEM"    /* legal disks for default selection */
  33. #define MAXUSER 15    /* maximum user number */
  34.  
  35. /* defines for Heath/Zenith Z/H19 (or 29) terminal */
  36. #define STATLINE    /* do special status line information */
  37. #define Z19            /* terminal type */
  38.     /* 25th line off, wrap at end of line*/
  39. #define TERMRESET    "\033y1\033x9\033v"
  40. #define TERMINIT    "\033z"
  41.     /* mode for replot -clear screen, no 25th, no wrap. Added Home'n'Clear. */
  42. #define TERMREPLOT    "\033E\033y1\033w"
  43.  
  44. /* Modem I/O ports for Serial i/o */
  45. #define INT3        /* Interfacer 3/4 code tied to this define */
  46. #define DPORT MDATA
  47. #define SPORT MSTAT
  48.  
  49. #define GBI4 0x10    /* Interfacer 4 base port (also data) */
  50. #define GBI4U GBI4 + 7    /* Interfacer 4 user select port */
  51. #define GBI4M GBI4 + 2    /* Interfacer 4 mode port (also parallel data) */
  52. #define GBI4C GBI4 + 3    /* Interfacer 4 command port */
  53.  
  54.  
  55. EXTERN int MDMU;            /* modem user variable */
  56. #define MUSER 1            /* initial value assigned to MDMU */
  57. #define USERINIT        /* so that user externals get initialized */
  58.  
  59. #define MIREADY (i4rs(MDMU)&MIMASK) /* value != 0 if char available */
  60. #define MICHAR (i4rd(MDMU))        /* get char assuming miready */
  61. #define MOREADY (i4rs(MDMU)&MOMASK) /* != 0 if modem ready to load next char */
  62. #define MODOUT(x) i4sd(MDMU,x)
  63. #define MODATA Dport         /* modem data output port */
  64.  
  65. #define OVRRNMASK 0x20        /* overrun error */
  66. #define FRMMASK 0x10        /* framing error */
  67.  
  68. #define MIREADYERROR
  69.  
  70. /* #define CDO i4cd()        value = 0 if carrier there */
  71.  
  72. #define MIREADYMASK MIMASK    /* rx character available */
  73. #define MIERRORMASK (OVRRNMASK & FRMMASK) /* error condition framing and overrun only */
  74.  
  75. #define SMODEM
  76. /* Switches on Smartmodem 1200 should be set for Not Verbose (S2 down),
  77. ** Send Result Codes to Screen (S3 down), No Echo of Commands (S4 down)
  78. ** and Don't Auto-Answer (S5 down). All other switches as from the
  79. ** factory. Sorry, not for XYAM usage as it stands. If your system allows
  80. ** communication even if DSR is low you can also set switch 6 to allow you
  81. ** to detect loss of carrier.
  82. **/
  83. #define SMCMD    "ATX1"    /* specify use of extended result code set */
  84. #define SMATTN    "+++"    /* get to command mode if not already there */
  85. #define SMHUP    "ATH\r"    /* onhook command - loss of DTR or long break works too */
  86. #define SMDIAL    "ATDT "    /* prefix to sending the number - touchtone mode */
  87. /* #define FLIP */
  88. #define SMTOORG "ATD\r" /* offhook and wait for carrier in originate mode */
  89. #define SMTOANS "ATA\r"    /* offhook and turn on carrier in answer mode */
  90. #define NRING    3    /* Number of rings before offhook in auto-ans mode */
  91.  
  92.  
  93. #define POREADY bios(15,0,0)
  94. #define LPOUT(x) bdos(5,x)
  95.  
  96. #define CIREADY bdos(6,0xFE)
  97. #define CICHAR bdos(6,0xFF)
  98.  
  99. /* using SS1 serial port for console */
  100.  
  101. #define COREADY (inportb(CSTAT)&COMASK)
  102. #define TTYOUT(x) bios(4,x,0)
  103.  
  104.  
  105. /* if using IF3/4 for console-
  106.  * #define IF3CON
  107.  * unsigned CONU;
  108.  * #define CUSER 7
  109.  * #define COREADY (i4rs(CONU)&COMASK)
  110.  * #define TTYOUT(x) i4sd(CONU, x)
  111.  */
  112.  
  113. /* STDIO file included here to simplify cross-compiles of cyams */
  114.  
  115. #include "stdio.h"
  116.  
  117. #define TWIDTH    80    /* # of columns    */
  118. #define TLENGTH    24    /* # of lines    */
  119. #define CLEARS    "\033E"    /* String to clear screen on console    */
  120. #define INTOREV    "\033p"    /* String to switch console into reverse video    */
  121. #define OUTAREV "\033q"    /* String to switch console OUT of reverse video  */
  122. #define CURSOROFF "\033x5"    /* String to turn cursor off    */
  123. #define CURSORON "\033y5"    /* String to turn cursor on    */
  124. #define ESC    '\033'    /* Standard ASCII 'escape' character    */
  125.  
  126. /*
  127.  *    Console serial port characteristics:
  128.  */
  129.  
  130. #define CSTAT    0x5d    /* status port    */
  131. #define CDATA    0x5c    /* data port    */
  132. #define CIMASK    0x02    /* input data ready mask   */
  133. #define COMASK    0x01    /* output data ready mask  */
  134.  
  135. /*
  136.  *     Modem characteristics:
  137.  */
  138.  
  139. #define    MSTAT    0x11    /* status port                */
  140. #define MDATA    0x10    /* data port                */
  141. #define MIMASK    0x02    /* input data ready mask        */
  142. #define MOMASK    0x01    /* ready to send a character mask    */
  143.