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 / M7S1-1.AQM / M7S1-1.ASM
Assembly Source File  |  2000-06-30  |  10KB  |  292 lines

  1.  
  2. ; M7S1-1.ASM - Sanyo MBC-1100 Overlay file for MDM7xx  -  06/01/84
  3. ;
  4. ; You will want to look this file over carefully. There are a number of
  5. ; options that you can use to configure the program to suit your taste.
  6. ; This file adapts the Sanyo MBC-1100 computer to the modem program.
  7. ;
  8. ; NOTE:     To use this overlay, you must set the internal jumper for 1200
  9. ;     baud on the RS232 card.
  10. ;
  11. ; Edit this file for your preferences then follow the "TO USE:" example
  12. ; shown    below.
  13. ;
  14. ; Use the "SET" command to change the baudrate when desired.  It starts
  15. ; out at 300 baud when the program is first called up.
  16. ;
  17. ;    TO USE:    First edit this file filling in answers for your own
  18. ;        equipment.  Then assemble with ASM.COM or equivalent
  19. ;        assembler.  Then use DDT to overlay the the results
  20. ;        of this    program to the original .COM file:
  21. ;
  22. ;=============================================================================
  23. ;
  24. ;NOTE:     The use of the MDMLNK.COM utility makes the following process much
  25. ;     simpler.  You may want to use MDMLNK if it is available to you.
  26. ;
  27. ;=============================================================================
  28. ;
  29. ;        A>DDT MDM7xx.COM
  30. ;        DDT VERS 2.2
  31. ;        NEXT  PC
  32. ;        4A00 0100
  33. ;        -IM7xx-x.HEX        (note the "I" command)
  34. ;        -R            ("R" loads in the .HEX file)
  35. ;        NEXT  PC
  36. ;        4A00 0000
  37. ;        -G0            (return    to CP/M)
  38. ;        A>SAVE 73 MDM7xx.COM    (now have a modified .COM file)
  39. ;
  40. ; =   =      =   =      =   =   =   =   =   =   =   =   =   =   =   =   =   =
  41. ;
  42. ; 06/01/84 - Changed to work with MDM740    - Robert Flagg
  43. ; 02/18/84 - Revised for Sanyo MBC-1100     - Jim Shea
  44. ; 11/11/83 - Renamed to M7SY-1.ASM, no changes    - Irv Hoff
  45. ; 09/12/83 - Revised for 300 and 1200 BAUD    - Tim Chiaretto
  46. ; 07/21/83 - Renamed for use with MDM712    - Irv Hoff
  47. ; 07/01/83 - Revised for use with MDM711    - Irv Hoff
  48. ; 06/22/83 - Revised for use with MDM710    - Irv Hoff
  49. ; 06/22/83 - Altered MDM708DP for Morrow
  50. ;         Micro Decision computers using
  51. ;         an    external modem            - Irv Hoff
  52. ;
  53. ; =   =      =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  54. ;
  55. BELL:        EQU    07H        ;bell
  56. CR:        EQU    0DH        ;carriage return
  57. ESC:        EQU    1BH        ;escape
  58. LF:        EQU    0AH        ;linefeed
  59. ;
  60. YES:        EQU    0FFH
  61. NO:        EQU    0
  62. ;
  63. ;
  64. PORT:        EQU    0DDH        
  65. MODCTL1:    EQU    PORT        ;Modem status port
  66. MODDATP:    EQU    PORT-1        ;Modem data port
  67. MODCTL2:    EQU    PORT        ;Modem control port
  68. ;
  69. ;
  70.         ORG    100H
  71. ;
  72.         DS    3    ;(for  "JMP   START" instruction)
  73. ;
  74. PMMIMODEM:    DB    NO    ;yes=PMMI S-100 Modem            103H
  75. AUTODIAL:    DB    NO    ;yes=HAYES Smartmodem, no=non-Hayes    104H
  76. TOUCHPULSE:    DB    'T'    ;T=touch, P=pulse (Smartmodem-only)    105H
  77. CLOCK:        DB    40    ;clock speed in MHz x10, 25.5 MHz max.    106H
  78.                 ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  79. MSPEED:        DB    1    ;0=110 1=300 2=450 3=600 4=710 5=1200    107H
  80.                 ;6=2400    7=4800 8=9600 9=19200 default
  81. BYTDLY:        DB    5    ;0=0 delay  1=10ms  5=50 ms - 9=90 ms    108H
  82.                 ;default time to send character in ter-
  83.                 ;minal mode file transfer for slow BBS.
  84. CRDLY:        DB    5    ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  85.                 ;default time for extra wait after CRLF
  86.                 ;in terminal mode file transfer
  87. NOOFCOL:    DB    5    ;number of DIR columns shown        10AH
  88. SETUPTST:    DB    YES    ;yes=user-added Setup routine        10BH
  89. SCRNTEST:    DB    YES    ;Cursor control routine         10CH
  90. RETRY:        DB    YES    ;yes=reset the error limit to try again 10DH
  91.                 ;no=abort after 10 consecutive errors
  92. BAKUPBYTE:    DB    NO    ;yes=change any file same name to .BAK    10EH
  93. CRCDFLT:    DB    YES    ;yes=default to CRC checking        10FH
  94. TOGGLECRC:    DB    YES    ;yes=allow toggling of CRC to Checksum    110H
  95. CONVRUB:    DB    YES    ;yes=convert rub to backspace        111H
  96. TOGGLEBK:    DB    YES    ;yes=allow toggling of rub to backspace 112H
  97. ADDLF:        DB    NO    ;no=no LF after CR to send file in    113H
  98.                 ;terminal mode (added by remote echo)
  99. TOGGLELF:    DB    YES    ;yes=allow toggling of LF after CR    114H
  100. TRANLOGON:    DB    YES    ;yes=allow transmission of logon    115H
  101.                 ;write logon sequence at location LOGON
  102. SAVCCP:        DB    NO    ;yes=do    not overwrite CCP        116H
  103. LOCONEXTCHR:    DB    NO    ;yes=local command if EXTCHR precedes    117H
  104.                 ;no=external command if EXTCHR precedes
  105. TOGGLELOC:    DB    YES    ;yes=allow toggling of LOCONEXTCHR    118H
  106. LSTTST:        DB    YES    ;yes=printer on printer port        119H
  107. XOFFTST:    DB    YES    ;yes=checks for XOFF from remote while    11AH
  108.                 ;sending a file in terminal mode
  109. XONWAIT:    DB    NO    ;yes=wait for XON after CR while    11BH
  110.                 ;sending a file in terminal mode
  111. TOGXOFF:    DB    YES    ;yes=allow toggling of XOFF checking    11CH
  112. IGNORCTL:    DB    YES    ;yes=CTL-chars above ^M not displayed    11DH
  113. EXTRA1:        DB    0    ;for future expansion            11EH
  114. EXTRA2:        DB    0    ;for future expansion            11FH
  115. BRKCHR:        DB    '@'-40H    ;^@ = Send 300 ms. break tone        120H
  116. NOCONNCT:    DB    'N'-40H    ;^N = Disconnect from phone line    121H
  117. LOGCHR:        DB    'L'-40H    ;^L = Send logon            122H
  118. LSTCHR:        DB    'P'-40H    ;^P = Toggle printer            123H
  119. UNSAVE:        DB    'R'-40H    ;^R = Close input text buffer        124H
  120. TRANCHR:    DB    'T'-40H ;^T = Transmit file to remote        125H
  121. SAVECHR:    DB    'Y'-40H    ;^Y = Open input text buffer        126H
  122. EXTCHR:        DB    '^'-40H    ;^^ = Send next character        127H
  123. ;
  124. ;
  125.         DS    2        ;                128H
  126. ;
  127. IN$MODCTL1:    IN    MODCTL1 ! RET    ;in modem control port        12AH
  128.         DS    7
  129. OUT$MODDATP:    OUT    MODDATP ! RET    ;out modem data port        134H
  130.         DS    7
  131. IN$MODDATP:    IN    MODDATP ! RET    ;in modem data port        13EH
  132.         DS    31
  133. ;
  134. LOGONPTR:    DW    LOGON        ;for user message.        160H
  135.         DS    6        ;                162H
  136. JMP$GOODBYE:    JMP    GOODBYE        ;                168H
  137. JMP$INITMOD:    JMP    INITMOD        ;go to user written routine    16BH
  138.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    16EH
  139.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    171H
  140.         RET  !    NOP  !    NOP    ;(by-passes PMMI routine)    174H
  141. JMP$SETUPR:    JMP    SETUPR        ;                177H
  142. JMP$SPCLMENU:    JMP    SPCLMENU    ;                17AH
  143. JMP$SYSVER:    JMP    SYSVER        ;                17DH
  144. JMP$BREAK:    JMP    SENDBRK        ;                180H
  145. ;
  146. ;
  147. ; Do not change the following six lines.
  148. ;
  149. JMP$ILPRT:    DS    3        ;                183H
  150. JMP$INBUF    DS    3        ;                186H
  151. JMP$INLNCOMP:    DS    3        ;                189H
  152. JMP$INMODEM    DS    3        ;                18CH
  153. JMP$NXTSCRN:    DS    3        ;                18FH
  154. JMP$TIMER:    DS    3        ;                192H
  155. ;
  156. ; Clear    sequences -- CLREOS is clear to end of screen, CLRSCRN is clear
  157. ; entire screen.  Last entry must be 0.  Any other 0's act as NOP's.
  158. ; The SCRNTST option must be set "YES" for these to work.
  159. ;
  160. CLREOS:        CALL    JMP$ILPRT    ;                195H
  161.         DB    0,0,0,0,0    ;                198H
  162.         RET            ;                19DH
  163. ;
  164. CLRSCRN:    CALL    JMP$ILPRT    ;                19EH
  165.         DB    1AH,0,0,0,0    ;                1A1H
  166.         RET            ;                1A6H
  167. ;
  168. ;
  169. SYSVER:        CALL    CLRSCRN
  170.         CALL    JMP$ILPRT    ;                1A7H
  171.         DB    'Version for Sanyo MBC-1100 computer'
  172.         DB    'and a Hayes Smartmodem 300'
  173.         DB    CR,LF,0
  174.         RET
  175. ;.....
  176. ;
  177. ;
  178. ;-----------------------------------------------------------------------
  179. ;
  180. ; NOTE:     You can change the SYSVER message to be longer or shorter.  The
  181. ;     end of    your last routine should terminate by 0400H (601 bytes
  182. ;     available after start of SYSVER) if using the Hayes Smartmodem
  183. ;     or by address 0C00H (2659 bytes) otherwise.
  184. ;
  185. ;-----------------------------------------------------------------------
  186. ;
  187. ; You can put in a message at this location which can be called up with
  188. ; CTL-L    if TRANLOGON has been set YES.    You can put in several lines if
  189. ; desired.  End with a 0.
  190. ;
  191. ;
  192. LOGON:      DB    'HI - from a Sanyo MBC-1100 computer',CR,LF,0
  193. ;.....
  194. ;
  195. ;
  196. ;=======================================================================
  197. ;
  198. ; This routine allows a 300 ms. break tone to be sent to reset some
  199. ; time-share computer.
  200. ;
  201. SENDBRK:  MVI    A,1FH        ;SEND BREAK TONE
  202.       JMP    GOODBYE1
  203. ;...
  204. ;
  205. ;
  206. ; This routine sends a 300 ms. break tone and sets DTR low for the same
  207. ; length of time to disconnect some modems such as the Bell 212A, etc.
  208. ;
  209. GOODBYE:  MVI    A,15H        ;SEND BREAK, TURN OFF DTR
  210. ;
  211. GOODBYE1: OUT    MODCTL1        ;SEND TO STATUS PORT
  212.       MVI    B,3        ;WAIT 300 MS.
  213.       CALL    JMP$TIMER
  214.       MVI    A,07H        ;NORMAL    SEND/RECEIVE WITH DTR
  215.       OUT    MODCTL1        ;SEND TO STATUS PORT
  216.       RET
  217. ;.....
  218. ;
  219. ;
  220. ; Sanyo    initialization -- sets the 8251A for 8 bits, 1 stop pulse,
  221. ; DTR high, requires jumper to be set internally to 1200 baud then
  222. ; divides by 64 for 300, or by 16 for 1200 baud via "SET" command.  Set
  223. ; at present to default to 300 baud.
  224. ;
  225. INITMOD:  MVI    A,1        ;TRANSFER TIME FOR 300 BAUD
  226.       STA    MSPEED    
  227.       MVI    A,087H        ;INSURE    OUT OF MODE
  228.       OUT    MODCTL1        ;MODEM STATUS PORT
  229.       OUT    MODCTL1        ;SLIGHT    EXTRA DELAY
  230.       MVI    A,40H        ;INITIALIZE USART
  231.       OUT    MODCTL1        ;MODEM STATUS PORT
  232. ;
  233. INITMOD1: MVI    A,4FH        ;DEFAULT TO DIVIDE BY 64 FOR 300 BAUD
  234.       OUT    MODCTL1        ;MODEM STATUS PORT
  235.       MVI    A,17H        ;DTR, RCV, XMT, ERROR RESET
  236.       OUT    MODCTL1        ;MODEM STATUS PORT
  237.       IN    PORT        ;CLEAR DATA PORT
  238.       RET
  239. ;.....
  240. ;
  241. ;
  242. SETUPR:      LXI    D,BAUDBUF    ;POINT TO NEW INPUT BUFFER
  243.       CALL    JMP$ILPRT
  244.       DB    'Input Baud Rate (300, 1200): ',0
  245.       CALL    JMP$INBUF
  246.       LXI    D,BAUDBUF+2
  247.       CALL    JMP$INLNCOMP    ;COMPARE BAUDBUF+2 WITH CHARACTERS BELOW
  248.       DB    '300',0
  249.       JNC    OK300        ;GO IF GOT MATCH
  250.       CALL    JMP$INLNCOMP
  251.       DB    '1200',0
  252.       JNC    OK1200
  253.       CALL    JMP$ILPRT    ;ALL MATCHES FAILED, TELL OPERATOR
  254.       DB    '++ Incorrect entry ++',CR,LF,BELL,0
  255.       JMP    SETUPR        ;TRY AGAIN
  256. ;
  257. OK300:      MVI    A,1        ;MSPEED    300 BAUD VALUE
  258.       MVI    B,4FH        ;DIVIDE    BY 64 FOR 300 BAUD
  259.       JMP    LOADBD        ;GO LOAD THEM
  260. ;
  261. OK1200:      MVI    A,5
  262.       MVI    B,4EH        ;DIVIDE    BY 16 FOR 1200 BAUD
  263. ;
  264. ;
  265. LOADBD:      STA    INITMOD+1    ;CHANGE TIME-TO-SEND TO MATCH BAUDRATE
  266.       MOV    A,B        ;GET BAUDRATE BYTE
  267.       STA    INITMOD1+1    ;STORE IN INITMOD
  268.       JMP    INITMOD        ;REINITIALIZE TO NEW BAUDRATE, THEN DONE
  269. ;
  270. ;
  271. BAUDBUF:  DB    10,0
  272.       DS    10
  273. ;.....
  274. ;
  275. ;
  276. ;           (END OF INITMOD AND SETUP ROUTINES)
  277. ;=======================================================================
  278. ;        
  279. ;
  280. ; These    routines can be used for your equipment, be sure to end with RET
  281. ;
  282. SPCLMENU: RET
  283. ;        
  284. ;=======================================================================
  285. ;
  286. ;
  287. ; NOTE:     MUST TERMINATE PRIOR TO 0400H (with Smartmodem)
  288. ;                 0C00H (without Smartmodem).
  289. ;
  290.       END
  291. ;
  292.