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 / M7SSM-2.AQM / M7SSM-2.ASM
Assembly Source File  |  2000-06-30  |  9KB  |  245 lines

  1. ; M7SSM-2.ASM -- SSM-I/O Board 
  2. ;
  3. ; You will want to look this file over carefully. There are a number of
  4. ; options that you can use to configure the program to suit your taste.
  5. ;
  6. ; Much of the information contained here is not in the MDM712.ASM file.
  7. ;
  8. ; Edit this file for your preferences then follow the "TO USE:" example
  9. ; shown below.
  10. ;
  11. ; Use the "SET" command to change the baudrate when desired.  It starts
  12. ; out at 1200 baud when the program is first called up.
  13. ;
  14. ;    TO USE: First edit this file filling in answers for your own
  15. ;        equipment.  Then assemble with ASM.COM or equivalent
  16. ;        assembler.  Then use DDT to overlay the results
  17. ;        of this program to the original .COM file:
  18. ;
  19. ;        A>DDT MDM7xx.COM
  20. ;        DDT VERS 2.2
  21. ;        NEXT  PC
  22. ;        4x00 0100
  23. ;        -IM7SSM-2.HEX        (note the "I" command)
  24. ;        -R            ("R" loads in the .HEX file)
  25. ;        NEXT  PC
  26. ;        4x00 0000
  27. ;        -G0            (return to CP/M)
  28. ;        A>SAVE 73 MDM7xx.COM    (now have a modified .COM file)
  29. ;            ^
  30. ;                       May vary depending upon version of MDM7xx.COM
  31. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  32. ; 04/30/84 - Renamed and revised for MDM7xx.COM -Dennis Recla
  33. ;
  34. ; 11/02/83 - Modified M712CS.ASM for CCS-SYSTEM and any S-100 type
  35. ;         computer with the SSM I/O Board and an external 212A
  36. ;            (Bell 212A or Hayes Smartmodem 1200) modem.
  37. ;                        - Harry Kaemmerer
  38. ;
  39. ; 10/29/83 - Modified MDM705XE for CCS-SYSTEM 320/420 and any S-100 type
  40. ;         computers with the CCS-2830 I/O Board and an external 212A
  41. ;            (Bell 212A or Hayes Smartmodem 1200) modem.
  42. ;                        - Harry Kaemmerer
  43. ;          
  44. ; 07/27/83 - Renamed to work with MDM712    - Irv Hoff
  45. ;
  46. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  47. ;
  48. BELL:        EQU    07H        ;bell
  49. CR:        EQU    0DH        ;carriage return
  50. ESC:        EQU    1BH        ;escape
  51. LF:        EQU    0AH        ;linefeed
  52. ;
  53. YES:        EQU    0FFH
  54. NO:        EQU    0
  55. ;
  56. PORT:        EQU    0AH        ;Modem DART/SIO base port
  57. MODCTL1:    EQU    PORT        ;Modem control port
  58. MODDATP:    EQU    PORT+1        ;Modem data port
  59. MODCTL2:    EQU    PORT        ;Modem status port
  60. MODRCVB:    EQU    01H        ;Your bit to test for receive
  61. MODRCVR:    EQU    01H        ;Your value when receive ready
  62. MODSNDB:    EQU    02H        ;Your bit to test for send
  63. MODSNDR:    EQU    02H        ;Your value when send ready        
  64. ;
  65.         ORG    100H
  66.         DS    3    ;(for  "JMP   START" instruction)
  67. ;
  68. ; Change the clock speed to suit your system
  69. ;
  70. PMMIMODEM:    DB    NO    ;yes=PMMI S-100 Modem            103H
  71. SMARTMODEM:    DB    NO    ;yes=HAYES Smartmodem 1200        104H
  72. TOUCHPULSE:    DB    'T'    ;T=touch, P=pulse (Smartmodem-only)    105H
  73. CLOCK:        DB    40    ;clock speed in MHz x10, 25.5 MHz max.    106H
  74.                 ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  75. MSPEED:        DB    5    ;1=300 5=1200 8=9600             107H
  76. BYTDLY:        DB    5    ;0=0 delay  1=10ms  5=50 ms - 9=90 ms   108H
  77.                 ;default time to send character in ter-
  78.                 ;minal mode file transfer for slow BBS.
  79. CRDLY:        DB    5    ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  80.                 ;default time for extra wait after CRLF
  81.                 ;in terminal mode file transfer
  82. NOOFCOL:    DB    5    ;number of DIR columns shown        10AH
  83. SETUPTST:    DB    yes    ;yes=user-added Setup routine        10BH
  84. SCRNTEST:    DB    YES    ;Clear Sreen routine             10CH
  85. ACKNAK:        DB    YES    ;yes=resend a record after any non-ACK    10DH
  86.                 ;no=resend a record after a valid NAK
  87. BAKUPBYTE:    DB    NO    ;yes=change any file same name to .BAK    10EH
  88. CRCDFLT:    DB    YES    ;yes=default to CRC checking        10FH
  89. TOGGLECRC:    DB    YES    ;yes=allow toggling of CRC to Checksum    110H
  90. CONVBKSP:    DB    NO    ;yes=convert backspace to rub        111H
  91. TOGGLEBK:    DB    YES    ;yes=allow toggling of bksp to rub    112H
  92. ADDLF:        DB    NO    ;no=no LF after CR to send file in    113H
  93.                 ;terminal mode (added by remote echo)
  94. TOGGLELF:    DB    YES    ;yes=allow toggling of LF after CR    114H
  95. TRANLOGON:    DB    no    ;yes=allow transmission of logon    115H
  96.                 ;write logon sequence at location LOGON
  97. SAVCCP:        DB    YES    ;yes=do not overwrite CCP        116H
  98. LOCONEXTCHR:    DB    NO    ;yes=local command if EXTCHR precedes    117H
  99.                 ;no=external command if EXTCHR precedes
  100. TOGGLELOC:    DB    YES    ;yes=allow toggling of LOCONEXTCHR    118H
  101. LSTTST:        DB    YES    ;yes=printer available on printer port    119H
  102. XOFFTST:    DB    NO    ;yes=check for XOFF from remote    while    11AH
  103.                 ;sending a file in terminal mode
  104. XONWAIT:    DB    NO    ;yes=wait for XON after CR while    11BH
  105.                 ;sending a file in terminal mode
  106. TOGXOFF:    DB    YES    ;yes=allow toggling of XOFF checking    11CH
  107. IGNORCTL:    DB    no    ;yes=CTL-chars above ^M not displayed    11DH
  108. EXTRA1:        DB    0    ;for future expansion            11EH
  109. EXTRA2:        DB    0    ;for future expansion            11FH
  110. BRKCHR:        DB    '@'-40H    ;^@ = Send a 300 ms. break tone        120H
  111. NOCONNCT:    DB    'N'-40H    ;^N = Disconnect from the phone line    121H
  112. LOGCHR:        DB    'L'-40H    ;^L = Send logon            122H
  113. LSTCHR:        DB    'P'-40H    ;^P = Toggle printer            123H
  114. UNSAVE:        DB    'R'-40H    ;^R = Close input text buffer        124H
  115. TRANCHR:    DB    'T'-40H ;^T = Transmit file to remote        125H
  116. SAVECHR:    DB    'Y'-40H    ;^Y = Open input text buffer        126H
  117. EXTCHR:        DB    '^'-40H    ;^^ = Send next character        127H
  118. ;
  119.         DS    2        ;                128H
  120. IN$MODCTL1:    IN    MODCTL1        ;get status
  121.         RET ! NOP ! NOP
  122.         NOP ! NOP
  123.         DS    3
  124. ;
  125. OUT$MODDATP:    OUT    MODDATP ! RET    ;out modem data port        134H
  126.         DS    7
  127. IN$MODDATP:    IN    MODDATP ! RET    ;in modem data port        13EH
  128.         DS    7
  129. ANI$MODRCVB:    ANI    MODRCVB    ! RET    ;bit to test for receive ready    148H
  130. CPI$MODRCVR:    CPI    MODRCVR ! RET    ;value of receive bit when rdy    14BH
  131. ANI$MODSNDB:    ANI    MODSNDB    ! RET    ;bit to test for send ready    14EH
  132. CPI$MODSNDR:    CPI    MODSNDR    ! RET    ;value of send bit when ready    151H
  133.         DS    6        ;                154H
  134. OUT$MODCTL1:    ret ! nop ! nop        ; Cant be used with a UART     15AH
  135. OUT$MODCTL2:    ret ! nop ! nop        ; Cant be used with a UART     15DH
  136. ;
  137. LOGONPTR:    DW    LOGON        ;for user message.        160H
  138.         DS    6        ;                162H
  139. JMP$GOODBYE:    JMP    GOODBYE        ;                168H
  140. JMP$INITMOD:    JMP    INITMOD        ;go to user written routine    16BH
  141.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    16EH
  142.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    171H
  143.         RET  !  NOP  !  NOP    ;(by-passes PMMI routine)    174H
  144. JMP$SETUPR:    JMP    SETUPR        ;                177H
  145. JMP$SPCLMENU:    JMP    SPCLMENU    ;                17AH
  146. JMP$SYSVER:    JMP    SYSVER        ;                17DH
  147. JMP$BREAK:    JMP    SENDBRK        ;                180H
  148. ;
  149. ; Do not change the following six lines.
  150. ;
  151. JMP$ILPRT:    DS    3        ;                183H
  152. JMP$INBUF    DS    3        ;                186H
  153. JMP$INLNCOMP:    DS    3        ;                189H
  154. JMP$INMODEM    DS    3        ;                18CH
  155. JMP$NXTSCRN:    DS    3        ;                18FH
  156. JMP$TIMER:    DS    3        ;                192H
  157. ;
  158. ; Clear sequences -- CLREOS is clear to end of screen, CLRSCRN is clear
  159. ; entire screen.  Last entry must be 0.  Any other 0's act as NOP's.
  160. ;
  161. CLREOS:        CALL    JMP$ILPRT    ;Clears at all time all!    195H
  162.         DB    0,0,0,0,0    ;not in use for phk        198H
  163.         RET            ;                19DH
  164. ;
  165. CLRSCRN:    CALL    JMP$ILPRT    ;for TeleVideo 920 Terminal    19EH
  166.         DB    1AH,0,0,0,0    ;                1A1H
  167.         RET            ;                1A6H
  168.                     ;
  169. ;-----------------------------------------------------------------------
  170. ;
  171. ;        You can change the SYSVER message to be longer or shorter.  The
  172. ;     end of your last routine should terminate by 0400H (601 bytes
  173. ;     available after start of SYSVER) if using the Hayes Smartmodem
  174. ;     or by address 0C00H (2659 bytes) otherwise.
  175. ;
  176. ;
  177. SYSVER:        CALL    JMP$ILPRT    ;                1A7H
  178.         DB    'SSM I/O Board'
  179.         DB    CR,LF,0
  180.         RET
  181.                     ;
  182. ;-----------------------------------------------------------------------
  183. ;
  184. ; You can put in a message at this location which can be called up with
  185. ; CTL-L if TRANLOGON has been set TRUE.  You can put in several lines if
  186. ; desired.  End with a 0.
  187. ;
  188. ;
  189. LOGON:        DB    'XMODEM S',0    ;,CR,LF,0
  190.                     ;
  191. ;-----------------------------------------------------------------------
  192. ;
  193. SENDBRK:  RET            ; Cant be used with a UART
  194. GOODBYE:  RET            ; Cant be used with a UART
  195. GOODBYE1: RET            ; Cant be used with a UART
  196. INITMOD:            ; Cant be used with a UART
  197. INITMOD1: MVI    A,5        ; DEFAULT TRANSFER TIME TO 1200 BAUD
  198.       STA    MSPEED        ;
  199. INITMOD2: RET            ; Cant be used with a UART
  200.                 ;
  201. ;-----------------------------------------------------------------------
  202. ;
  203. ; Setup routine to allow changing modem speed with the SET command.
  204. ;
  205. SETUPR:      LXI    D,BAUDBUF    ;POINT TO NEW INPUT BUFFER
  206.       CALL    JMP$ILPRT
  207.       DB    'Input Baud Rate (300 and 1200 set your Modem also): ',0
  208.       CALL    JMP$INBUF
  209.       LXI    D,BAUDBUF+2
  210.       CALL    JMP$INLNCOMP    ;COMPARE BAUDBUF+2 WITH CHARACTERS BELOW
  211.       DB    '300',0
  212.       JNC    OK300        ;GO IF GOT MATCH
  213.       CALL    JMP$INLNCOMP
  214.       DB    '1200',0
  215.       JNC    OK1200
  216.       CALL    JMP$ILPRT    ;ALL MATCHES FAILED, TELL OPERATOR
  217.       DB    'Incorrect entry!',CR,LF,BELL,0
  218.       JMP    SETUPR        ;TRY AGAIN
  219. ;
  220. OK300:      MVI    A,1
  221.       JMP    LOADBD
  222. ;
  223. OK1200:      MVI    A,5
  224. ;
  225. LOADBD:      STA    INITMOD1+1    ;CHANGE TIME-TO-SEND TO MATCH BAUDRATE
  226.       JMP    INITMOD1    ;REINITIALIZE TO NEW BAUDRATE, THEN DONE
  227. ;
  228. baudbuf:  DB    10,0
  229.       DS    10
  230. ;
  231. ;-----------------------------------------------------------------------
  232. ;
  233. ; The following routine can be used as an auxiliary menu for notes of
  234. ; interest to a particular computer, etc.  If using the Hayes Smartmodem
  235. ; this is unavailable without a special address change.
  236. ;
  237. SPCLMENU: RET
  238. ;
  239. ;-----------------------------------------------------------------------
  240. ;
  241. ; NOTE:  MUST TERMINATE PRIOR TO 0400H (with Smartmodem)
  242. ;                 0C00H (without Smartmodem)
  243. ;
  244.       END
  245.