home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / modem7 / m730-mpm.lbr / M730MPM.DQF / m730mpm.dif
Text File  |  1985-02-09  |  12KB  |  553 lines

  1. 1c 0
  2. ;        
  3. .
  4. 3a 63764
  5. ;  This is a public domain progam.  The modifications shown are examples
  6. ;  of what can be done with most any modem program if a bios structure is
  7. ;  included.  Mite and Move-It are samples of two commercial modem program
  8. ;  that can be modified.
  9. ;
  10. ;  The calls in the modification look into the XIOS and MPM.SYS files.
  11. ;  The modified XIOS and RSP modules are available for almost any
  12. ;  configuration CompuPro supports from L D Snyder and Associaties, P O 
  13. ;  Box 4876, Winter Park, Florida  32793. (305) 677-1856
  14. .
  15. 62c 14975
  16. ;     M7NM-6.ASM can be used to change the telephone overlay numbers
  17. .
  18. 69c 28430
  19. ;     M7FNK.COM can be used to quickly and easily change any of the
  20. .
  21. 119,127c 25433
  22. ; SPECIAL EQUATES FOR COMPUPRO 
  23. ;
  24. BASE:        EQU    30H
  25. MODE:        EQU    BASE+2
  26. COMM:        EQU    BASE+3
  27. CUSER:        EQU    BASE+7    ;USER SELECT REGISTER
  28. EXACT:        EQU    6    ;EXACT USART TO USE     
  29. .
  30. 127a 25689
  31. SETB    EQU    1
  32. CSTAT    EQU    2
  33. CINPUT  EQU    3
  34. COUT    EQU    4
  35. CONIN    EQU    1
  36. READQ    EQU    137
  37. WRITEQ  EQU    139
  38. READQCON EQU    138    
  39. OPENQ    EQU    135    
  40. ;
  41. ;
  42. PORT:      EQU    BASE    ;your base port (data or status)
  43. ;
  44. BAUDRP:   EQU   PORT+2  ;baud rate
  45. MODCTL1:  EQU    PORT+1    ;modem control port
  46. MODDATP:  EQU    PORT      ;modem data port
  47. MODRCVB:  EQU    02H    ;modem receive bit (DAV)
  48. MODRCVR:  EQU    02H    ;modem receive ready
  49. MODSNDB:  EQU    01H    ;modem send bit
  50. MODSNDR:  EQU    01H    ;modem send ready bit
  51. ;
  52. ;
  53. .
  54. 217,218c 29136
  55. PMMIMODEM: DB    NO     ;yes=PMMI modem
  56. AUTODIAL:  DB    YES    ;yes=Hayes-type autodial modem
  57. .
  58. 221,223c 60023
  59. CLOCK:       DB    2     ;clock speed in MHz x 10, 25.5 MHz max.
  60.             ;2 MHz=20, 3.68 MH=37, 4 MHz=40, etc.
  61. MSPEED:       DB    5    ;sets display time for sending a file
  62. .
  63. 233,234c 43580
  64. SETUPTST:  DB    YES    ;yes=non-PMMI setup routine
  65. SCRNTEST:  DB    YES    ;yes=if home cursor and clear screen
  66. .
  67. 262c 26180
  68. IGNORCTL:  DB    NO     ;yes=do not send control characters
  69. .
  70. 286,295d 23886
  71. 288,295c 24142
  72. IN$MODCTL1:    
  73. ;        --- get status ---
  74. ;
  75.         push    b
  76.         push    d
  77.         push    h
  78.         mvi     a,cstat
  79.         sta    cios+2        ; set command to extended XIOS func.
  80.         lxi    d,cios
  81.         mvi     c,50        ; direct XIOS call
  82.         call    5        ; status returned in A reg.
  83.         pop    h
  84.         pop    d
  85.         pop    b
  86.  
  87.         RET    ;in modem control port
  88.  
  89.         DB    0,0,0,0,0,0,0    ;spares if needed for non-PMMI
  90. OUT$MODDATP:    
  91. ;
  92. ;     --- To send a character to COMM+ for output ---
  93. ;
  94.         push    b
  95.         push    d
  96.         push    h
  97.         sta    cios+3        ; put character and 
  98.         mvi     a,cout        
  99.         sta     cios+2        ; command into direct XIOS block
  100.         lxi    d,cios
  101.         mvi    c,50
  102.         call    5    
  103.         pop    h
  104.         pop    d
  105.         pop    b
  106.  
  107.         RET    ;out modem data port
  108.  
  109.         DB    0,0,0,0,0,0,0    ;spares if needed for non=PMMI
  110. ;
  111. CIOS    DB    6,0,0,0,0,0,0        ; BLOCK USED FOR DIRECT XIOS CALL
  112. ;
  113. IN$MODDATP:    
  114. ;
  115. ;      --- To get character from COMM+ buffer ---
  116. ;
  117.         push    b
  118.         push    d
  119.         push    h
  120.         mvi     a,cinput    ; set command byte for extended XIOS     
  121.         sta    cios+2        ; call
  122.         lxi    d,cios
  123.         mvi     c,50        
  124.         call    5        ; char. returned in A Reg.
  125.         pop    h
  126.         pop    d
  127.         pop    b
  128. ;
  129.         RET    ;in modem data port
  130. ;
  131.         DB    0,0,0,0,0,0,0    ;spares if needed for non-PMMI
  132. ANI$MODRCVB:    ANI    MODRCVB ! RET    ;bit to test for receive ready
  133. CPI$MODRCVR:    CPI    MODRCVR ! RET    ;value of receive bit when ready
  134. ANI$MODSNDB:    ANI    MODSNDB ! RET    ;bit to test for send ready
  135. CPI$MODSNDR:    CPI    MODSNDR ! RET    ;value of send bit when ready
  136. .
  137. 354,365c 24398
  138. ;
  139. ;====================== SPECIAL PMMI PORTS =============================
  140. ;
  141. IN$BAUDRP:    IN    BAUDRP     ! RET    ;in baudrate port
  142. OUT$BAUDRP:    OUT    BAUDRP     ! RET    ;out baudrate port
  143. OUT$MODCTL1:    OUT    MODCTL1     ! RET    ;out modem control port #1
  144. OUT$MODCTL2:    OUT    MODCTL2  ! RET    ;out modem control port #2
  145. ;
  146. ;================== END OF SPECIAL PMMI PORTS ==========================
  147. .
  148. 365,373c 24654
  149. LOGONPTR:    DW    LOGON
  150. JMP$DIAL:    JMP    DIAL
  151. JMP$DISCONNT:    JMP    DISCONNT
  152. JMP$GOODBYE:    JMP    GOODBYE
  153. JMP$INITMOD:    JMP    INITMOD
  154. JMP$NEWBAUD:    JMP    NEWBAUD
  155. JMP$NOPARITY:    JMP    NOPARITY
  156. JMP$PARITY:    JMP    PARITY
  157. JMP$SETUPR:    JMP    SETUPR
  158. JMP$SPCLMENU:    JMP    SPCLMENU
  159. JMP$SYSVER:    JMP    SYSVER
  160. JMP$BREAK    JMP    SENDBRK
  161. .
  162. 379,389c 24910
  163. ; NEXT SIX LINES SHOULD NOT BE CHANGED BY USER OVERLAY AS THESE GO TO
  164. ; SPECIFIC LOCATIONS IN THE MAIN PROGRAM, NOT IN THE OVERLAY.
  165. ;
  166. JMP$ILPRT:    JMP    ILPRT
  167. JMP$INBUF:    JMP    INBUF
  168. JMP$INLNCOMP:    JMP    INLNCOMP
  169. JMP$INMODEM:    JMP    INMODEM
  170. JMP$NXTSCRN:    JMP    NXTSCRN
  171. JMP$TIMER:    JMP    TIMER
  172. .
  173. 390,391c 25166
  174. ; Clear sequences are for Televideo, Lear Siegler, etc.  Change to match
  175. ; your terminal.  (Heath uses ESC 4AH for clear to end of screen, ESC 45H
  176. ; to clear screen.  Lear Siegler and others use ESC 79H for clear to end
  177. ; of screen and ESC 3AH to clear screen.)  Room allowed for four bytes.
  178. ; (Last zero needed for stopping the string display.  Any extra 0's just
  179. ; act as NOP's.)
  180. ;
  181. CLREOS:    CALL    ILPRT
  182.     DB    ESC,79H,0,0,0
  183. .
  184. 402a 30242
  185. CLRSCRN:CALL    ILPRT
  186.     DB    ESC,3AH,0,0,0
  187.     RET
  188. ;.....
  189. ;
  190. ;
  191. .
  192. 426,427c 39546
  193. SYSVER1:CALL    ILPRT        ;if not usig the PMMI S-100 board
  194.     DB    'Version for CompuPro running MP/M 816 and '
  195.     DB      'Hayes Smartmodem 1200',CR,LF,LF,0
  196. .
  197. 453c 9912
  198. INITMOD:
  199.     push    b
  200.     push    d
  201.     push    h      
  202. ;
  203. ; Make sure there is an available communications port
  204. ;
  205.  
  206.     mvi    b,0
  207.     mvi    c,1
  208. qloop2:    mov    a,c
  209.     adi    30h
  210.     sta    qname+6        ; Make the Queue name
  211.     push    b        ; save the number of this port
  212.     mvi    c,openq
  213.     lxi    d,qpb
  214.     call    bdos        ; open queue
  215.     mvi    c,readqcon
  216.     lxi    d,qpb
  217.     call    bdos        ; see if queue has message
  218.     cpi    0ffh
  219.     jz    setstat        ; it's not available
  220. ;    mvi    c,writeq
  221. ;    lxi    d,qpb
  222. ;    call    bdos        ; it's available, put message back for now
  223.     mvi    a,0
  224. setstat: cma            ; make true=FFh, false=0h
  225.     pop    b
  226.     lxi    h,pstat1
  227.     dcx    h
  228.     dad    b
  229.     mov    m,a        ; store status
  230.     inr    c
  231.     mvi    a,3        ; check if done
  232.     cmp    c
  233.     jnz    qloop2        ; check the other queue
  234.     
  235.     lda    pstat1
  236.     mov    b,a
  237.     lda    pstat2
  238.     add    b        ; get sum of status'
  239.     jnz    check1
  240.     lxi    d,noportmsg    ; no ports available
  241.     call    pstring
  242.     mvi    c,0
  243.     call    bdos        ; exit program
  244.  
  245. check1: cpi    0ffh        ; only one available ?
  246.     jz    tellifok    ; tell user which one
  247.     lxi    d,askwhich    ; else, ask which one
  248.     call    pstring
  249. getchoice: mvi    c,conin
  250.     call    bdos        ; get response
  251.     sta    ptouse        ; save response
  252.     cpi    33h
  253.     jnc    badchoice    
  254.     cpi    31h
  255.     jc    badchoice
  256.     jz    w2back
  257.     mvi    a,31h
  258.     jmp    wqback
  259. w2back:    mvi    a,32h
  260. wqback: sta    qname+6
  261.     mvi    c,writeq
  262.     lxi    d,qpb
  263.     call    bdos        ; write the queue back that were not using    
  264.     jmp    setport        ; choice ok
  265.  
  266. askwhich: db    cr,lf,'Console 1 and Console 2 available as'
  267.     db    ' communication ports.',cr,lf
  268.     db    'Please enter console number to use (1 or 2) ? $'
  269. choices:  db    cr,lf,'The possible consoles choices are 1 or 2 - ? $'
  270. pstat1:    db    0
  271. pstat2:    db    0
  272. noportmsg: db    cr,lf,'NO Communication Ports available.'
  273.        db    cr,lf,'Use COMM to activate communication ports.$'
  274. tellmsg: db    cr,lf,'Console '
  275. tellport: db    0
  276.       db    ' is the only available port.  OK to use ? $'
  277. ptousemsg: db    cr,lf,cr,lf,'Please make sure console '
  278. ptouse:    db    0
  279.     db    ' is properly connected '
  280.     db    cr,lf,'for use as a communications '
  281.     db    'port.....',cr,lf,cr,lf,'$'
  282.  
  283. qpb:    db    0,0        ;must be zero
  284.     dw    0        ;queue ID
  285.     dw    1        ;nmsgs
  286.     dw    char        ;buffer addr.
  287. qname:    db    'MXcomm_ '    ;name to open
  288.     db    0,0,0,0,0
  289. char:    db    0,0,0
  290.  
  291. pstring: mvi    c,print
  292.     call    bdos
  293.     ret    
  294.          
  295. badchoice: lxi    d,choices
  296.     call    pstring
  297.     jmp    getchoice    ; ask again
  298. tellifok: lda    pstat1
  299.     ana    a
  300.     jnz    use1
  301.     mvi    a,32h
  302.     sta    tellport    ; its console 2
  303.     jmp    stickport
  304. use1:    mvi    a,31h        ; its console 1
  305.     sta    tellport
  306. stickport: sta    ptouse
  307.     lxi    d,tellmsg
  308.     call    pstring
  309.     mvi    c,conin
  310.     call    bdos
  311.     ani    11011111b    ; force to upper case
  312.     cpi    'Y'
  313.     jz    setport
  314.     mvi    c,0
  315.     call    bdos        ; else quit program
  316. setport: lxi    d,ptousemsg
  317.     call    pstring
  318.     lda    ptouse
  319.     sta    qname+6
  320.     sui    30h        ; convert to binary
  321.     sta     cios+1        ; put into direct xios call block    
  322.     
  323. ;    mvi    c,readq
  324. ;    lxi    d,qpb
  325. ;    call    bdos        ; read queue for good now
  326.  
  327.     mvi    c,164        ; get printer number and save it
  328.     call    5
  329.     sta    ptrnum
  330.  
  331.     pop    h
  332.     pop    d
  333.     pop    b
  334.     ret    
  335. .
  336. 1175,1179c 8066
  337.      CALL    ILPRT
  338.     DB    CR,LF,LF,'++ Connected ++'
  339.      DB    BELL,0
  340.     MVI    B,5        ;wait half second for Smodem to spit out
  341.      CALL    TIMER        ;'CONNECT' else we'll see NNECT on CRT
  342. .
  343. 1183,1186c 65296
  344. ;    JMP    TERM
  345. ;    CALL    STAT        ;keypress?
  346. ;    JZ    CONMADE3    ;exit if no keys pressed
  347. ;    CALL    KEYIN
  348. ;    XRA    A
  349. .
  350. 1195a 45343
  351. ;
  352. .
  353. 1628c 26272
  354.     DB    '    Additional Subcommands for PMMI Modems'
  355. .
  356. 1636,1650c 23476
  357.     DB    '       Both ends must be capable of these options'
  358.     DB    CR,LF
  359.     DB    '       which are available only in R and S modes.'
  360.     DB    CR,LF
  361.     DB    '       The parity checking will be part of the'
  362.     DB    CR,LF
  363.     DB    '       file transfer protocol.',CR,LF,LF
  364.     DB    '  Speed Options:',CR,LF
  365.     DB    '    After entering your primary and secondary '
  366.     DB    'options,',CR,LF
  367.     DB    '    you can set the modem speed by placing a '
  368.     DB    ' "." after',CR,LF
  369.     DB    '    the options followed by the speed e.g., '
  370.     DB    '300, 600.',CR,LF,LF
  371.     DB    '    EXAMPLE:  SBO.600 will set the modem for '
  372. .
  373. 1852c 26107
  374.     DB    VERSION MOD 10+'0',' 04/18/84 - (type M for Menu)',CR,LF,0
  375. .
  376. 1930c 52906
  377. ;    SHLD    GOLIST+1    ;bios list device status jump vector
  378.                 ;we want to skip this for mpm
  379. .
  380. 3092,3094c 38886
  381. LSTMSG:    LDA    LISTFLG
  382. .
  383. 3094a 3854
  384.     JMP    ATTLST        ;attempt to attach list device
  385. ;
  386. attlst1:CALL    ILPRT
  387.     DB    'Printer buffer is ',0
  388. .
  389. 3102c 38008
  390. ;
  391. LSTMSG1:CALL      ILPRT
  392.     DB    'Printer buffer is ',0
  393.     CALL    ILPRT
  394.     DB    'OFF',CR,LF,0
  395.     call    detlst        ; Detach list device
  396.     ret
  397. ;
  398. detlst:    push    psw
  399.     push    b
  400.     push    d
  401.     push    h
  402.     mvi    c,159
  403.     call    5
  404.     pop    h
  405.     pop    d
  406.     pop    b
  407.     pop    psw
  408.     ret
  409. ;
  410. attlst:      push    psw
  411.       push    b
  412.       push    d
  413.       push    h
  414.       mvi    c,161        ; Conditional list attach
  415.       call    5
  416.       ora    a
  417.       jz    attlst2        ; go ahead and attach
  418.       lda    listflg
  419.       cma            ; Else toggle flag off
  420.       sta    listflg        ; and tell user the printer is busy
  421.       lda    ptrnum
  422.       adi    30h        ; make prnum ascii
  423.       sta    prnuma
  424.       mvi    c,9
  425.       lxi    d,prbusy
  426.       call    5                    
  427.         pop    h
  428.       pop     d    
  429.       pop     b
  430.       pop     psw
  431.       jmp    lstmsg1
  432. attlst2:  mvi    c,158
  433.       call     5    
  434.       pop    h
  435.       pop    d
  436.       pop     b
  437.       pop    psw
  438.       jmp    attlst1    
  439. ;
  440. prbusy:      db    cr,lf,'  Printer # '
  441. prnuma:      db    0
  442.       db    ' is Busy',cr,lf,'$'     
  443. .
  444. 3157,3160c 38264
  445. ;...
  446. .
  447. 3329a 8809
  448. ; List the character on the printer if it is ready, then see if at the
  449. ; top of the buffer.
  450. ;
  451. ;
  452. GOLIST:      push    b
  453.       push    d
  454.       push    h
  455.       mvi     c,50
  456.       lxi     d,pstat
  457.       call     5
  458.       pop    h
  459.       pop     d
  460.       pop    b
  461.  
  462. ;      CALL    $-$        
  463.       ORA    A        
  464.       RZ            
  465.       JMP    LIST$CONT
  466. pstat:      db    15
  467. ptrnum:      db    0        ; PRINTER NUMBER
  468.       db     0,0,0,0,0,0    ; Direct XIOS call memory area
  469. ;
  470. ;
  471. ;....
  472. ;
  473. .
  474. 3452,3459d 59427
  475. 3455c 57117
  476. LIST$CONT CALL    CMP$I$O        ; if the same then nothing to print
  477. .
  478. 5402c 62832
  479. PRTNAME:DB    '    ','.','   ',0   ; 8 spaces, period, 3 spaces
  480. .
  481. 6173c 1235
  482.     DB    '          Single Letter Commands',CR,LF,LF
  483. .
  484. 6181,6183c 7539
  485.     DB    '     For copying text to disk use T (E or L) '
  486.     DB    'FILENAME.TYP',CR,LF
  487.     DB    '     Start or Stop toggles described on subsequent'
  488. .
  489. 6188,6199c 11265
  490.     DB    '     COMMAND: R (or S) FILENAME.TYP',CR,LF
  491.     DB    '     R and S can use the following subcommands:'
  492.     DB    CR,LF
  493.     DB    '        B  - Bulk transfer using wildcards '
  494.     DB    '(e.g., *.*)',CR,LF
  495.     DB    '        D  - Disconnect when done'
  496.     DB    CR,LF
  497.     DB    '        Q  - Quiet mode (no messages to console)'
  498.     DB    CR,LF
  499.     DB    '        V  - View <R> or <S> bytes on console'
  500.     DB    CR,LF
  501.     DB    '        X  - When done, disconnect, go to CP/M'
  502. .
  503. 6209,6210c 32460
  504.     DB    '        Three Letter Commands',CR,LF,LF
  505.     DB    'MPM - Exit from this program to MP/M',CR,LF
  506. .
  507. 6278c 8077
  508.     DB    0        ;Set command went here
  509. .
  510. 6281c 11858
  511.     DB    'BYE - Disconnect, then return to MP/M'
  512. .
  513. 6295c 3847
  514.     DB    '      The following are terminal text '
  515. .
  516. 6303c 30219
  517.     DB    '    Local Commands while in Terminal Mode'
  518. .
  519. 6344,6350c 60606
  520.     DB    '         Start & Stop may be toggled as often as '
  521.     DB    'desired.',CR,LF
  522.     DB    '         A ";" at start of line indicates buffer '
  523.     DB    'is copying.',CR,LF
  524.     DB    '         XOFF automatically used to stop input '
  525.     DB    'when writing',CR,LF
  526.     DB    '        full buffer to disk, XON sent to '
  527. .
  528. 6431c 57216
  529.     DB    'MPM',0
  530. .
  531. 6477,6479c 13434
  532.     CALL    INLNCOMP    ;after this went the set command
  533. .
  534. 6533c 64117
  535.     DB    '     SPECIAL FUNCTION KEY TABLE'
  536. .
  537. 6590c 34013
  538.     DB    CR,LF,'<< Exit to MP/M >>',CR,LF,0
  539. .
  540. 7159c 52697
  541.     DB    '       Library of Phone Numbers of Remote Systems'
  542. .
  543. 7173c 40082
  544.     PUSH    H        ;save source address
  545. .
  546. 7268c 54092
  547.     DB    '        Current Settings',CR,LF,LF,0
  548. .
  549. $a 42947
  550. .
  551. 09,6210c 32460
  552.     DB    '        T