home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols200 / vol217 / m8gp-1.aq6 / M8GP-1.A86
Text File  |  1986-02-09  |  9KB  |  270 lines

  1. ; M8GP-1.A86 -- General purpose overlay file for MDM8xx.  09/21/84
  2. ;
  3. ; This overlay adapts the MDM8xx program to various serial I/O types
  4. ; very easily - such as the UART, 8251 USART, 8250 ACE, 2661 EPCI, etc.
  5. ;
  6. ; You will want to look this file over carefully. There are a number of
  7. ; options that you can use to configure the program to suit your taste.
  8. ; This file places particular emphasis on using an external modem that
  9. ; does not match one of the other special overlays.  You would use the
  10. ; normal CP/M "Configure" program to set the modem to whatever baud rate
  11. ; you would normally use (such as 300 or 1200, etc.)  Then perhaps just
  12. ; make a second .CMD file if you need both 300 and 1200 and do not wish
  13. ; to write your own initialization or "set baud" routine.
  14. ;
  15. ; You could look at other overlay files to see how the GOODBYE and/or
  16. ; SETUPR areas are handled.  You could then adapt one of those, if ap-
  17. ; propriate for your equipment in this overlay.     For Example:
  18. ;
  19. ;     "IN"  CompuPro Interfacer 3/4 overlay using the 2651
  20. ;
  21. ; Edit this file for your preferences then follow the "TO USE:" example
  22. ; shown below.
  23. ;
  24. ;    TO USE: First edit this file filling in answers for your own
  25. ;        equipment.  Then assemble with ASM86.CMD or equivalent
  26. ;        assembler.  Then use M8CNFG to overlay the the results
  27. ;        of this program to the original MDM8xx.H86 file:
  28. ;
  29. ;            ASM86 M8IN-1
  30. ;            REN M8OVL.H86=M8IN-1.H86
  31. ;            M8CNFG
  32. ;            GENCMD MDM 8080 CODE[MFF0]
  33. ;
  34. ;         Now run MDM.  Have Fun
  35. ;
  36. ; =   =      =   =      =   =      =   =      =   =      =   =      =   =      =   =      =   =
  37. ;
  38. ; 09/22/84 - MDM8xx version of this file    - Alex Soya
  39. ; 04/04/84 - First version of this file        - Irv Hoff
  40. ;
  41. ; =   =      =   =      =   =      =   =      =   =      =   =      =   =      =   =      =
  42. ;
  43. BELL        EQU    07H        ;bell
  44. CR        EQU    0DH        ;carriage return
  45. ESC        EQU    1BH        ;escape
  46. LF        EQU    0AH        ;linefeed
  47. ;
  48. YES        EQU    0FFH
  49. NO        EQU    0
  50. ;
  51. ;
  52. ; Change the following information to match your equipment
  53. ;
  54. PORT        EQU    0C0H
  55. MODCTL1        EQU    PORT        ;MODEM CONTROL PORT
  56. MODDATP        EQU    PORT+1        ;MODEM DATA IN PORT
  57. MODDATO        EQU    PORT+1        ;MODEM DATA OUT PORT
  58. MODDCDB        EQU    4        ;CARRIER DETECT BIT
  59. MODDCDA        EQU    0        ;VALUE WHEN ACTIVE
  60. BAUDRP        EQU    PORT+2        ;BAUD RATE PORT
  61. MODCTL2        EQU    PORT+3        ;2ND MODEM CONTROL PORT
  62. MODRCVB        EQU    2        ;BIT TO TEST FOR RECEIVE
  63. MODRCVR        EQU    2        ;VALUE WHEN READY
  64. MODSNDB        EQU    1        ;BIT TO TEST FOR SEND
  65. MODSNDR        EQU    1        ;VALUE WHEN READY
  66. ;
  67.     ORG    100H
  68. ;
  69. ; Change the clock speed to suit your system
  70. ;
  71.     RS    3            ;(for  "JMP   START" instruction)
  72. ;
  73. PMMIMODEM    DB    NO        ;yes=PMMI S-100 Modem            103H
  74. SMARTMODEM    DB    YES        ;yes=HAYES Smartmodem, no=non-PMMI    104H
  75. TOUCHPULSE    DB    'T'        ;T=touch, P=pulse (Smartmodem-only)    105H
  76. CLOCK        DB    80        ;clock speed in MHz x10, 25.5 MHz max.    106H
  77.                     ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  78. MSPEED        DB    1        ;0=110 1=300 2=450 3=600 4=710 5=1200    107H
  79.                     ;6=2400 7=4800 8=9600 9=19200 default
  80. BYTDLY        DB    5        ;0=0 delay  1=10ms  5=50 ms - 9=90 ms    108H
  81.                     ;default time to send character in ter-
  82.                     ;minal mode file transfer for slow BBS.
  83. CRDLY        DB    5        ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  84.                     ;default time for extra wait after CRLF
  85.                     ;in terminal mode file transfer
  86. NOOFCOL        DB    5        ;number of DIR columns shown        10AH
  87. SETUPTST    DB    YES        ;yes=user-added Setup routine        10BH
  88. SCRNTEST    DB    YES        ;Cursor control routine            10CH
  89. ACKNAK        DB    YES        ;yes=resend a record after any non-ACK    10DH
  90.                     ;no=resend a record after a valid-NAK
  91. BAKUPBYTE    DB    NO        ;yes=change any file same name to .BAK    10EH
  92. CRCDFLT        DB    YES        ;yes=default to CRC checking        10FH
  93. TOGGLECRC    DB    YES        ;yes=allow toggling of CRC to Checksum    110H
  94. CONVBKSP    DB    NO        ;yes=convert backspace to rub        111H
  95. TOGGLEBK    DB    YES        ;yes=allow toggling of bksp to rub    112H
  96. ADDLF        DB    NO        ;no=no LF after CR to send file in    113H
  97.                     ;terminal mode (added by remote echo)
  98. TOGGLELF    DB    YES        ;yes=allow toggling of LF after CR    114H
  99. TRANLOGON    DB    YES        ;yes=allow transmission of logon    115H
  100.                     ;write logon sequence at location LOGON
  101. RESERVED    DB    NO        ; Resevered for future release        116H
  102. LOCONEXTCHR    DB    NO        ;yes=local command if EXTCHR precedes    117H
  103.                     ;no=external command if EXTCHR precedes
  104. TOGGLELOC    DB    YES        ;yes=allow toggling of LOCONEXTCHR    118H
  105. LSTTST        DB    YES        ;yes=printer available on printer port    119H
  106. XOFFTST        DB    NO        ;yes=checks for XOFF from remote while    11AH
  107.                     ;sending a file in terminal mode
  108. XONWAIT        DB    NO        ;yes=wait for XON after CR while    11BH
  109.                     ;sending a file in terminal mode
  110. TOGXOFF        DB    YES        ;yes=allow toggling of XOFF checking    11CH
  111. IGNORCTL    DB    NO        ;yes=CTL-chars above ^M not displayed    11DH
  112. EXTRA1        DB    0        ;for future expansion            11EH
  113. EXITCHR        DB    'E'-40H        ;^E = Exit to main menu            11FH
  114. BRKCHR        DB    '@'-40H        ;^@ = Send 300 ms. break tone        120H
  115. NOCONNCT    DB    'N'-40H        ;^N = Disconnect from the phone line    121H
  116. LOGCHR        DB    'L'-40H        ;^L = Send logon            122H
  117. LSTCHR        DB    'P'-40H        ;^P = Toggle printer            123H
  118. UNSAVE        DB    'R'-40H        ;^R = Close input text buffer        124H
  119. TRANCHR        DB    'T'-40H        ;^T = Transmit file to remote        125H
  120. SAVECHR        DB    'Y'-40H        ;^Y = Open input text buffer        126H
  121. EXTCHR        DB    '^'-40H        ;^^ = Send next character        127H
  122. ;
  123. ;
  124. ;
  125.     RS    3            ;                128H
  126. ;
  127. IN@MODCTL1:
  128.     IN    AL,MODCTL1 ! RET    ;in modem control port        12BH
  129.     DB    0,0,0,0,0,0,0        ; spares
  130. ;
  131. OUT@MODDATP:
  132.     OUT    MODDATP,AL ! RET    ;out modem data port        135H
  133.     DB    0,0,0,0,0,0,0        ; spares
  134. ;
  135. IN@MODDATP:
  136.     IN    AL,MODDATP ! RET    ;in modem data port        13FH
  137.     DB    0,0,0,0,0,0,0        ; spares
  138. ;
  139. ANI@MODRCVB:
  140.     AND    AL,MODRCVB ! RET    ;bit to test for receive ready    149H
  141. ;
  142. CPI@MODRCVR:    
  143.     CMP    AL,MODRCVR ! RET    ;value of rcv. bit when ready    14CH
  144. ;
  145. ANI@MODSNDB:    
  146.     AND    AL,MODSNDB ! RET    ;bit to test for send ready    14FH
  147. ;
  148. CPI@MODSNDR:    
  149.     CMP    AL,MODSNDR ! RET    ;value of send bit when ready    152H
  150. ;
  151.     RS    6            ;                156H
  152. ;
  153. OUT@MODCTL1:    OUT MODCTL1,AL ! RET    ;out modem control port #2    15BH
  154. ;
  155. OUT@MODCTL2:    OUT MODCTL2,AL ! RET    ;out modem control port #1    15EH
  156.  
  157.  
  158.  
  159.  
  160. ;
  161. ;
  162. LOGONPTR DW    (Offset LOGON)        ;for user message.        161H
  163.     RS    6            ;                163H
  164. JMP@GOODBYE:JMP GOODBYE            ;                169H
  165. JMP@INITMOD:JMP INITMOD            ;go to user written routine    16CH
  166.     RET    
  167.     NOP                ;(by-passes PMMI routine)    170H
  168.     NOP
  169.     RET    
  170.     NOP                ;(by-passes PMMI routine)    173H
  171.     NOP
  172.     RET    
  173.     NOP                ;(by-passes PMMI routine)    176H
  174.     NOP
  175. JMP@SETUPR:    JMP  SETUPR        ;                178H
  176. JMP@SPCLMENU:  JMP  SPCLMENU        ;                17BH
  177. JMP@SYSVER:    JMPS SYSVER        ;make sure this is SHORT Jump    17EH
  178. JMP@BREAK:     JMP  SENDBRK        ;                180H
  179.  
  180. ;
  181. ; Do not change the following eight lines.
  182. ;
  183. JMP@ILPRT:
  184.         RS    3        ;                183H
  185. JMP@INBUF:
  186.         RS    3        ;                186H
  187. JMP@INLNCOMP:
  188.         RS    3        ;                189H
  189. JMP@INMODEM:
  190.         RS    3        ;                18CH
  191. JMP@NXTSCRN:
  192.         RS    3        ;                18FH
  193. JMP@TIMER:
  194.         RS    3        ;                192H
  195. JMP@CTYPE:
  196.         RS    3        ;                195H
  197. JMP@KEYIN:
  198.         RS    3        ;                198H
  199. ;
  200. ;
  201. ; Routine to clear to end of screen.  If using CLREOS and CLRSCRN, set
  202. ; SCRNTEST to YES at 010AH (above).
  203. ;
  204. CLREOS: CALL    JMP@ILPRT        ;                19BH
  205.     DB    ESC,'Y',0,0,0        ;                19EH
  206.     RET                ;                1A3H
  207. ;
  208. CLRSCRN:CALL    JMP@ILPRT        ;                1A4H
  209.     DB    ESC,'*',0,0,0        ;                1A7H
  210.     RET                ;                1ACH
  211. ;
  212. SYSVER: CALL    JMP@ILPRT        ;                1ADH
  213.     DB    'Version for External Modem'
  214.     DB    CR,LF,0
  215.     RET
  216. ;.....
  217. ;
  218. ;
  219. ;-----------------------------------------------------------------------
  220. ;
  221. ; NOTE:     You can change the SYSVER message to be longer or shorter.  The
  222. ;     end of your last routine should terminate by 0600H if using the
  223. ;     Hayes Smartmodem or by address 0C00H otherwise.
  224. ;
  225. ;-----------------------------------------------------------------------
  226. ;
  227. ; You can put in a message at this location which can be called up with
  228. ; CTL-O if TRANLOGON has been set TRUE.     You can use several lines if
  229. ; desired.  End with a 0.
  230. ;
  231. LOGON        DB    'How are you today?',CR,LF,0
  232. ;.....
  233. ;
  234. ;
  235. ; Add your own routine here to send a break tone to reset some time-share
  236. ; computers, if desired.
  237. ;
  238. SENDBRK:    RET
  239. ;.....
  240. ;
  241. ;
  242. ; Add your own routine here to put DTR low and/or send a break tone.
  243. ; Check other routines such as M8IN-1.A86 which is using this feature.
  244. ;
  245. GOODBYE:    RET
  246. ;.....
  247. ;
  248. ;
  249. ; You can use this area for any special initialization or setup you may
  250. ; wish to include.  Each must stop with a RET.    You can check the other
  251. ; available overlays for ideas how to write your own routines if that
  252. ; may be of some help.
  253. ;
  254. INITMOD:  RET
  255. ;
  256. SETUPR:      RET
  257. ;
  258. ;
  259. ; If using the Hayes Smartmodem this is unavailable without a special
  260. ; change.
  261. ;
  262. SPCLMENU:  RET
  263. ;
  264. ;
  265. ; NOTE:     MUST TERMINATE PRIOR TO 0600H (with Smartmodem)
  266. ;                 0C00H (without Smartmodem)
  267. ;.....
  268. ;
  269.       END
  270.