home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / MODEMS / MODEM7 / M7GP-1.ASM < prev    next >
Assembly Source File  |  2000-06-30  |  9KB  |  253 lines

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