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 / M7XSMB-1.AQM / M7XSMB-1.ASM
Assembly Source File  |  2000-06-30  |  9KB  |  263 lines

  1. ; M7XSMB-1.ASM -- XITAN SMB INTERFACE overlay file for MDM7xx.  11/29/83
  2. ;
  3. ; This overlay adapts the MDM711 program to the Xitan SMB interface board
  4. ; for the S-100 buss. This board uses the Motorola 6850 UART.
  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 .COM 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.  Some examples:
  18. ;
  19. ;     "DP"  Datapoint 1560 overlay using 8251 I/O and CTC timers for
  20. ;              setting baud rates
  21. ;     "H8"  Heath H89 overlay for 8250 I/O and programmable baud rates
  22. ;     "HZ"  Zenith 120 overlay for 2661B initialization and baud rates
  23. ;     "XE"  Xerox 820II overlay for Z80-SIO intialization, etc.
  24. ;
  25. ; Edit this file for your preferences then follow the "TO USE:" example
  26. ; shown below.
  27. ;
  28. ;    TO USE: First edit this file filling in answers for your own
  29. ;        equipment.  Then assemble with ASM.COM or equivalent
  30. ;        assembler.  Then use DDT to overlay the the results
  31. ;        of this program to the original .COM file:
  32. ;
  33. ;        A>DDT MDM7xx.COM
  34. ;        DDT VERS 2.2
  35. ;        NEXT  PC
  36. ;        4x00 0100
  37. ;        -IM7XSMB-1.HEX        (note the "I" command)
  38. ;        -R            ("R" loads in the .HEX file)
  39. ;        NEXT  PC
  40. ;        4x00 0000
  41. ;        -G0            (return to CP/M)
  42. ;        A>SAVE 66 MDM7xx.COM    (now have a modified .COM file)
  43. ;                       ^
  44. ;                      This may vary with the version of MDM7xx
  45. ;
  46. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  47. ;
  48. ; 04/11/84 - Renamed to M7XSMB-1.ASM            - Dennis Recla
  49. ; 08/04/83 - Xitan version Created              - Dave Crane 
  50. ; 07/01/83 - Revised to work with MDM711    - Irv Hoff
  51. ; 07/01/83 - Revised to work with MDM710    - Irv Hoff
  52. ; 05/27/83 - Updated to work with MDM709    - Irv Hoff
  53. ; 05/15/83 - Revised to work with MDM708    - Irv Hoff
  54. ; 04/11/83 - Updated to work with MDM707    - Irv Hoff
  55. ; 04/04/83 - First version of this file        - Irv Hoff
  56. ;
  57. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  58. ;
  59. BELL:        EQU    07H        ;bell
  60. CR:        EQU    0DH        ;carriage return
  61. ESC:        EQU    1BH        ;escape
  62. LF:        EQU    0AH        ;linefeed
  63. ;
  64. YES:        EQU    0FFH
  65. NO:        EQU    0
  66. ;
  67. ;
  68. ; Change the following information to match your equipment
  69. ;
  70. PORT:        EQU    072H
  71. MODCTL1:    EQU    PORT        ;MODEM CONTROL PORT
  72. MODDATP:    EQU    PORT+1        ;MODEM DATA IN PORT
  73. MODDATO:    EQU    PORT+1        ;MODEM DATA OUT PORT
  74. MODDCDB:    EQU    4        ;CARRIER DETECT BIT
  75. MODDCDA:    EQU    0        ;VALUE WHEN ACTIVE
  76. BAUDRP:        EQU    0        ;BAUD RATE PORT
  77. MODCTL2:    EQU    0        ;2ND MODEM CONTROL PORT
  78. MODRCVB:    EQU    1        ;BIT TO TEST FOR RECEIVE
  79. MODRCVR:    EQU    1        ;VALUE WHEN READY
  80. MODSNDB:    EQU    2        ;BIT TO TEST FOR SEND
  81. MODSNDR:    EQU    2        ;VALUE WHEN READY
  82. ;
  83.         ORG    100H
  84. ;
  85. ;
  86. ; Change the clock speed to suit your system
  87. ;
  88.         DS    3    ;(for  "JMP   START" instruction)
  89. ;
  90. PMMIMODEM:    DB    NO    ;yes=PMMI S-100 Modem            103H
  91. SMARTMODEM:    DB    NO    ;yes=HAYES Smartmodem, no=non-PMMI    104H
  92. TOUCHPULSE:    DB    'T'    ;T=touch, P=pulse (Smartmodem-only)    105H
  93. CLOCK:        DB    30    ;clock speed in MHz x10, 25.5 MHz max.    106H
  94.                 ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  95. MSPEED:        DB    1    ;0=110 1=300 2=450 3=600 4=710 5=1200   107H
  96.                 ;6=2400 7=4800 8=9600 9=19200 default
  97. BYTDLY:        DB    5    ;0=0 delay  1=10ms  5=50 ms - 9=90 ms   108H
  98.                 ;default time to send character in ter-
  99.                 ;minal mode file transfer for slow BBS.
  100. CRDLY:        DB    5    ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  101.                 ;default time for extra wait after CRLF
  102.                 ;in terminal mode file transfer
  103. NOOFCOL:    DB    5    ;number of DIR columns shown        10AH
  104. SETUPTST:    DB    NO    ;yes=user-added Setup routine        10BH
  105. SCRNTEST:    DB    YES    ;Cursor control routine         10CH
  106. ACKNAK:        DB    YES    ;yes=resend a record after any non-ACK    10DH
  107.                 ;no=resend a record after a valid-NAK
  108. BAKUPBYTE:    DB    NO    ;yes=change any file same name to .BAK    10EH
  109. CRCDFLT:    DB    YES    ;yes=default to CRC checking        10FH
  110. TOGGLECRC:    DB    YES    ;yes=allow toggling of CRC to Checksum    110H
  111. CONVBKSP:    DB    NO    ;yes=convert backspace to rub        111H
  112. TOGGLEBK:    DB    YES    ;yes=allow toggling of bksp to rub    112H
  113. ADDLF:        DB    NO    ;no=no LF after CR to send file in    113H
  114.                 ;terminal mode (added by remote echo)
  115. TOGGLELF:    DB    YES    ;yes=allow toggling of LF after CR    114H
  116. TRANLOGON:    DB    YES    ;yes=allow transmission of logon    115H
  117.                 ;write logon sequence at location LOGON
  118. SAVCCP:        DB    YES    ;yes=do not overwrite CCP        116H
  119. LOCONEXTCHR:    DB    NO    ;yes=local command if EXTCHR precedes    117H
  120.                 ;no=external command if EXTCHR precedes
  121. TOGGLELOC:    DB    YES    ;yes=allow toggling of LOCONEXTCHR    118H
  122. LSTTST:        DB    YES    ;yes=printer available on printer port    119H
  123. XOFFTST:    DB    NO    ;yes=checks for XOFF from remote while    11AH
  124.                 ;sending a file in terminal mode
  125. XONWAIT:    DB    NO    ;yes=wait for XON after CR while    11BH
  126.                 ;sending a file in terminal mode
  127. TOGXOFF:    DB    YES    ;yes=allow toggling of XOFF checking    11CH
  128. IGNORCTL:    DB    YES    ;yes=CTL-chars above ^M not displayed    11DH
  129. EXTRA1:        DB    0    ;for future expansion            11EH
  130. EXTRA2:        DB    0    ;for future expansion            11FH
  131. BRKCHR:        DB    '@'-40H    ;^@ = Send 300 ms. break tone        120H
  132. NOCONNCT:    DB    'N'-40H    ;^N = Disconnect from the phone line    121H
  133. LOGCHR:        DB    'O'-40H    ;^O = Send logon            122H
  134. LSTCHR:        DB    'P'-40H    ;^P = Toggle printer            123H
  135. UNSAVE:        DB    'R'-40H    ;^R = Close input text buffer        124H
  136. TRANCHR:    DB    'T'-40H ;^T = Transmit file to remote        125H
  137. SAVECHR:    DB    'Y'-40H    ;^Y = Open input text buffer        126H
  138. EXTCHR:        DB    '^'-40H    ;^^ = Send next character        127H
  139. ;
  140. ;
  141.         DS    2        ;                128H
  142. ;
  143. IN$MODCTL1:    IN    MODCTL1 ! RET    ;in modem control port             12AH
  144.         DS    7
  145. OUT$MODDATP:    OUT    MODDATP ! RET    ;out modem data port        134H
  146.         DS    7
  147. IN$MODDATP:    IN    MODDATP ! RET    ;in modem data port        13EH
  148.         DS    7
  149. ANI$MODRCVB:    ANI    MODRCVB    ! RET    ;bit to test for receive ready    148H
  150.  
  151. CPI$MODRCVR:    CPI    MODRCVR    ! RET    ;value of rcv. bit when ready    14BH
  152. ANI$MODSNDB:    ANI    MODSNDB    ! RET    ;bit to test for send ready    14EH
  153. CPI$MODSNDR:    CPI    MODSNDR    ! RET    ;value of send bit when ready    151H
  154.         DS    6        ;                156H
  155. ;
  156. OUT$MODCTL1:    OUT    MODCTL1    ! RET    ;out modem control port #2    15AH
  157. OUT$MODCTL2:    OUT    MODCTL2    ! RET    ;out modem control port #1    15DH
  158. ;
  159. LOGONPTR:    DW    LOGON        ;for user message.        160H
  160.         DS    6        ;                162H
  161. JMP$GOODBYE:    JMP    GOODBYE        ;                168H
  162. JMP$INITMOD:    JMP    INITMOD        ;go to user written routine    16BH
  163.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    16EH
  164.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    171H
  165.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    174H
  166. JMP$SETUPR:    JMP    SETUPR        ;                177H
  167. JMP$SPCLMENU:    JMP    SPCLMENU    ;                17AH
  168. JMP$SYSVER:    JMP    SYSVER        ;                17DH
  169. JMP$BREAK:    JMP    SENDBRK        ;                180H
  170. ;
  171. ;
  172. ; Do not change the following six lines.
  173. ;
  174. JMP$ILPRT:    DS    3        ;                183H
  175. JMP$INBUF    DS    3        ;                186H
  176. JMP$INLNCOMP:    DS    3        ;                189H
  177. JMP$INMODEM    DS    3        ;                18CH
  178. JMP$NXTSCRN:    DS    3        ;                18FH
  179. JMP$TIMER    DS    3        ;                192H
  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    ESC,'y',0,0,0    ;                198H
  186.         RET            ;                19DH
  187. ;
  188. CLRSCRN:    CALL    JMP$ILPRT    ;                19EH
  189.         DB    ESC,'*',0,0,0    ;                1A1H
  190.         RET            ;                1A6H
  191.     
  192. ;
  193. SYSVER:        CALL    JMP$ILPRT    ;                1A7H
  194.         DB    'Version for external modem using Zitan SMB'
  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:    MVI A,75H    ;SEND BREAK TONE
  221.         JMP GOODBYE1
  222. ;.....
  223. ;
  224. ;
  225. ; Add your own routine here to put DTR low and/or send a break tone.
  226. ; Check other routines such as MDM709DP.ASM which is using this feature.
  227. ;
  228. GOODBYE:    MVI A,55H    ;TURN OFF RTS
  229. GOODBYE1:    OUT MODCTL1    ;OUTPUT TO MODEM UART
  230.         MVI B,3        ;DELAY FOR 300MS
  231.         CALL JMP$TIMER    ;AFTER DELEAY INITILIZE UART
  232. ;.....
  233. ;
  234. ;
  235. ; You can use this area for any special initialization or setup you may
  236. ; wish to include.  Each must stop with a RET.  You can check the other
  237. ; available overlays for ideas how to write your own routines if that
  238. ; may be of some help.
  239. ;
  240. INITMOD:    MVI A,15H    ;8 BIT, NO PARITY, 1 STOP BIT, RTS LOW
  241.         OUT MODCTL1
  242.         CALL JMP$ILPRT
  243.         DB CR,LF,'UART SET FOR 8BIT, NO PARITY, 1 STOP BIT'
  244.         DB CR,LF,0,0
  245.         RET
  246. ;
  247. SETUPR:      RET
  248. ;
  249. ;
  250. ; If using the Hayes Smartmodem this is unavailable without a special
  251. ; change.
  252. ;
  253. SPCLMENU:  RET
  254. ;
  255. ;
  256. ; NOTE:  MUST TERMINATE PRIOR TO 0400H (with Smartmodem)
  257. ;                 0C00H (without Smartmodem)
  258. ;.....
  259. ;
  260.       END
  261. ;
  262.