home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / cpm86 / modem840.lbr / M8GP-1.AQ6 / m8gp-1.a86
Text File  |  1985-02-09  |  9KB  |  266 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. AUTODIAL    DB    YES    ;yes=HAYES-like modem, 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. RETRY        DB    NO    ;yes=reset the error limit to tryagain    10DH
  90.                 ;no=abort after 10 consecutive errors
  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. CONVRUB        DB    NO    ;yes=convert rub to backspace        111H
  95. TOGGLERUB    DB    YES    ;yes=allow toggling of rub to backspace    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    YES    ;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. LOGONPTR DW    (Offset LOGON)        ;for user message.        161H
  158.     RS    6            ;                163H
  159. JMP@GOODBYE:JMP GOODBYE            ;                169H
  160. JMP@INITMOD:JMP INITMOD            ;go to user written routine    16CH
  161.     RET    
  162.     NOP                ;(by-passes PMMI routine)    170H
  163.     NOP
  164.     RET    
  165.     NOP                ;(by-passes PMMI routine)    173H
  166.     NOP
  167.     RET    
  168.     NOP                ;(by-passes PMMI routine)    176H
  169.     NOP
  170. JMP@SETUPR:    JMP  SETUPR        ;                178H
  171. JMP@SPCLMENU:  JMP  SPCLMENU        ;                17BH
  172. JMP@SYSVER:    JMPS SYSVER        ;make sure this is SHORT Jump    17EH
  173. JMP@BREAK:     JMP  SENDBRK        ;                180H
  174.  
  175. ;
  176. ; Do not change the following eight lines.
  177. ;
  178. JMP@ILPRT:
  179.         RS    3        ;                183H
  180. JMP@INBUF:
  181.         RS    3        ;                186H
  182. JMP@INLNCOMP:
  183.         RS    3        ;                189H
  184. JMP@INMODEM:
  185.         RS    3        ;                18CH
  186. JMP@NXTSCRN:
  187.         RS    3        ;                18FH
  188. JMP@TIMER:
  189.         RS    3        ;                192H
  190. JMP@CTYPE:
  191.         RS    3        ;                195H
  192. JMP@KEYIN:
  193.         RS    3        ;                198H
  194. ;
  195. ;
  196. ; Routine to clear to end of screen.  If using CLREOS and CLRSCRN, set
  197. ; SCRNTEST to YES at 010AH (above).
  198. ;
  199. CLREOS: CALL    JMP@ILPRT        ;                19BH
  200.     DB    ESC,'Y',0,0,0        ;                19EH
  201.     RET                ;                1A3H
  202. ;
  203. CLRSCRN:CALL    JMP@ILPRT        ;                1A4H
  204.     DB    ESC,'*',0,0,0        ;                1A7H
  205.     RET                ;                1ACH
  206. ;
  207. SYSVER: CALL    JMP@ILPRT        ;                1ADH
  208.     DB    'Version for External Modem'
  209.     DB    CR,LF,0
  210.     RET
  211. ;.....
  212. ;
  213. ;
  214. ;-----------------------------------------------------------------------
  215. ;
  216. ; NOTE:     You can change the SYSVER message to be longer or shorter.  The
  217. ;     end of your last routine should terminate by 0600H if using the
  218. ;     Hayes Smartmodem or by address 0C00H otherwise.
  219. ;
  220. ;-----------------------------------------------------------------------
  221. ;
  222. ; You can put in a message at this location which can be called up with
  223. ; CTL-O if TRANLOGON has been set TRUE.     You can use several lines if
  224. ; desired.  End with a 0.
  225. ;
  226. LOGON        DB    'How are you today?',CR,LF,0
  227. ;.....
  228. ;
  229. ;
  230. ; Add your own routine here to send a break tone to reset some time-share
  231. ; computers, if desired.
  232. ;
  233. SENDBRK:    RET
  234. ;.....
  235. ;
  236. ;
  237. ; Add your own routine here to put DTR low and/or send a break tone.
  238. ; Check other routines such as M8IN-1.A86 which is using this feature.
  239. ;
  240. GOODBYE:    RET
  241. ;.....
  242. ;
  243. ;
  244. ; You can use this area for any special initialization or setup you may
  245. ; wish to include.  Each must stop with a RET.    You can check the other
  246. ; available overlays for ideas how to write your own routines if that
  247. ; may be of some help.
  248. ;
  249. INITMOD:  RET
  250. ;
  251. SETUPR:      RET
  252. ;
  253. ;
  254. ; If using the Hayes Smartmodem this is unavailable without a special
  255. ; change.
  256. ;
  257. SPCLMENU:  RET
  258. ;
  259. ;
  260. ; NOTE:     MUST TERMINATE PRIOR TO 0600H (with Smartmodem)
  261. ;                 0C00H (without Smartmodem)
  262. ;.....
  263. ;
  264.       END
  265. ut in a message at this location which can be called up with
  266. ; CTL-O if TRANLOGON has been set TRUE.     You can use s