home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / mex / mxo-sb12.asm < prev    next >
Encoding:
Assembly Source File  |  1994-07-13  |  23.1 KB  |  688 lines

  1. ; MXO-SB12.ASM - Intertec Superbrain overlay file for MEX10.  09/25/84
  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. ;NOTE:
  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 baud rate, word length, parity,
  12. ; or stop bits for the main port. 
  13. ;
  14. ; Added a LISTST routine so the print buffer stuff would work.
  15. ;
  16. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  17. ;
  18. ; 09/25/84 - Implemented NEWBD: vector        - D.D. Ferguson
  19. ; 07/07/84 - Revised Intertec Superbrain        - G.T. Hasul
  20. ; 05/23/84 - Converted to Intertec Superbrain   - F.E. Clayton
  21. ; 05/15/84 - Converted from MDM7xx to MEX10     - Sandy Berger
  22. ; 03/25/84 - Revised for use with MDM730        - Sandy Berger
  23. ; 11/11/83 - Renamed to M7MD-1.ASM, no changes  - Irv Hoff
  24. ; 07/21/83 - Renamed for use with MDM712        - Irv Hoff
  25. ; 07/01/83 - Revised for use with MDM711        - Irv Hoff
  26. ; 06/22/83 - Revised for use with MDM710        - Irv Hoff
  27. ; 06/22/83 - Altered MDM708DP for Morrow
  28. ;            Micro Decision computers using
  29. ;            an external modem                  - Irv Hoff
  30. ;
  31. ; =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =   =
  32. ;
  33. BELL:           EQU     07H             ;bell
  34. TAB:        EQU    09H        ;tab
  35. CR:             EQU     0DH             ;carriage return
  36. ESC:            EQU     1BH             ;escape
  37. LF:             EQU     0AH             ;linefeed
  38. ;
  39. YES:            EQU     0FFH
  40. NO:             EQU     0
  41. ;
  42. PORT:           EQU     058H            ;Superbrain Main port
  43. MODCTL1:        EQU     PORT+1          ;Modem status port
  44. MODDATP:        EQU     PORT            ;Modem data port
  45. MODCTL2:        EQU     PORT+1          ;Modem control port
  46. MODRCVB:        EQU     02H             ;Modem receive bit
  47. MODRCVR:        EQU     02H             ;Modem receive ready
  48. MODSNDB:        EQU     01H             ;Modem send bit
  49. MODSNDR:        EQU     01H             ;Modem send ready bit
  50. ;
  51. ; MEX service processor stuff
  52. ;
  53. INMDM   EQU     255             ;get char from port to A, CY=no more in 100 ms
  54. TIMER   EQU     254             ;delay 100ms * reg B
  55. TMDINP  EQU     253             ;B=# secs to wait for char, cy=no char
  56. CHEKCC  EQU     252             ;check for ^C from KBD, Z=present
  57. èSNDRDY  EQU     251             ;test for modem-send ready
  58. RCVRDY  EQU     250             ;test for modem-receive ready
  59. SNDCHR  EQU     249             ;send a character to the modem (after sndrdy)
  60. RCVCHR  EQU     248             ;recv a char from modem (after rcvrdy)
  61. LOOKUP  EQU     247             ;table search: see CMDTBL comments for info
  62. PARSFN  EQU     246             ;parse filename from input stream
  63. BDPARS  EQU     245             ;parse baud-rate from input stream
  64. SBLANK  EQU     244             ;scan input stream to next non-blank
  65. EVALA   EQU     243             ;evaluate numeric from input stream
  66. LKAHED  EQU     242             ;get nxt char w/o removing from input
  67. GNC     EQU     241             ;get char from input, cy=1 if none
  68. ILP     EQU     240             ;inline print
  69. DECOUT  EQU     239             ;decimal output
  70. PRBAUD  EQU     238             ;print baud rate
  71. ;
  72. ;
  73. CONOUT    EQU    2        ;simulated BDOS function 2: console char out
  74. PRINT    EQU    9        ;simulated BDOS function 9: print string
  75. INBUF    EQU    10        ;input buffer, same structure as BDOS 10
  76. ;
  77.                 ORG     100H
  78. ;
  79.                 DS      3       ;(for  "JMP   START" instruction)
  80. ;
  81. PMMIMODEM:      DB      NO      ;yes=PMMI S-100 Modem                   103H
  82. SMARTMODEM:     DB      NO    ;yes=HAYES Smartmodem, no=non-PMMI      104H
  83. TOUCHPULSE:     DB      'T'     ;T=Touch, P=Pulse (Smartmodem-only)     105H
  84. CLOCK:          DB      40      ;clock speed in MHz x10, 25.5 MHz max.  106H
  85.                                 ;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
  86. MSPEED:         DB      1       ;0=110 1=300 2=450 3=600 4=710 5=1200   107H
  87.                                 ;6=2400 7=4800 8=9600 9=19200 default
  88. BYTDLY:         DB      5       ;0=0 delay  1=10ms  5=50 ms - 9=90 ms   108H
  89.                                 ;default time to send character in ter-
  90.                                 ;minal mode file transfer for slow BBS.
  91. CRDLY:          DB      5       ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
  92.                                 ;default time for extra wait after CRLF
  93.                                 ;in terminal mode file transfer
  94. NOOFCOL:        DB      5       ;number of DIR columns shown            10AH
  95. SETUPTST:       DB      YES     ;yes=user-added Setup routine           10BH
  96. SCRNTEST:       DB      YES    ;Cursor control routine                 10CH
  97. RETRY:          DB      YES     ;yes=ask user to reset error count      10DH
  98.                                 ;after 10 consecutive errors
  99.                                 ;no=abort after 10 consecutive errors
  100. BAKUPBYTE:      DB      NO      ;yes=change any file same name to .BAK  10EH
  101. CRCDFLT:        DB      YES     ;yes=default to CRC checking            10FH
  102. TOGGLECRC:      DB      YES     ;yes=allow toggling of CRC to Checksum  110H
  103. CONVRUB:        DB      NO      ;yes=convert rub to backspace           111H
  104. TOGGLERUB:      DB      YES     ;yes=allow toggling of rub to bksp      112H
  105. ADDLF:          DB      NO      ;no=no LF after CR to send file in      113H
  106.                                 ;terminal mode (added by remote echo)
  107. TOGGLELF:       DB      YES     ;yes=allow toggling of LF after CR      114H
  108. TRANLOGON:      DB      YES     ;yes=allow transmission of logon        115H
  109.                                 ;write logon sequence at location LOGON
  110. SAVCCP:         DB      YES     ;yes=do not overwrite CCP               116H
  111. LOCONEXTCHR:    DB      YES     ;yes=local command if EXTCHR precedes   117H
  112. è                                ;no=external command if EXTCHR precedes
  113. TOGGLELOC:      DB      YES     ;yes=allow toggling of LOCONEXTCHR      118H
  114. LSTTST:         DB      YES     ;no=using modem on printer port         119H
  115. XOFFTST:        DB      YES     ;yes=checks for XOFF from remote while  11AH
  116.                                 ;sending a file in terminal mode
  117. XONWAIT:        DB      NO      ;yes=wait for XON after CR while        11BH
  118.                                 ;sending a file in terminal mode
  119. TOGXOFF:        DB      YES     ;yes=allow toggling of XOFF checking    11CH
  120. IGNORCTL:       DB      NO      ;yes=CTL-chars above ^M not displayed   11DH
  121. EXTRA1:         DB      0       ;for future expansion                   11EH
  122. EXITCHR:        DB      'E'-40H ;^E = Exit to Main Menu                 11FH
  123. BRKCHR:         DB      '@'-40H ;^@ = Send 50 ms. break tone            120H
  124. NOCONNCT:       DB      'N'-40H ;^N = Disconnect from phone line        121H
  125. LOGCHR:         DB      'L'-40H ;^L = Send logon                        122H
  126. LSTCHR:         DB      'P'-40H ;^P = Toggle printer                    123H
  127. UNSAVE:         DB      'R'-40H ;^R = Close input text buffer           124H
  128. TRANCHR:        DB      'T'-40H ;^T = Transmit file to remote           125H
  129. SAVECHR:        DB      'Y'-40H ;^Y = Open input text buffer            126H
  130. EXTCHR:         DB      '^'-40H ;^^ = Send next character               127H
  131. ;
  132. ;
  133.                 DS      2               ;                               128H
  134. ;
  135. IN$MODCTL1:     IN      MODCTL1     ;in modem control port          12AH
  136. ;        BIT    7,A        ;check for DSR
  137.         DB    0CBH,7FH
  138. ;
  139.         RNZ            ;return if found
  140.         ORI    MODSNDR        ;force send ready if DSR missing
  141.         RET            ;(prevents keyboard lock-up)
  142.                 DS      2
  143. OUT$MODDATP:    OUT     MODDATP ! RET   ;out modem data port            134H
  144.                 DS      7
  145. IN$MODDATP:     IN      MODDATP ! RET   ;in modem data port             13EH
  146.                 DS      7
  147. ANI$MODRCVB:    ANI     MODRCVB ! RET   ;bit to test for receive ready
  148. CPI$MODRCVR:    CPI     MODRCVR ! RET   ;value of receive bit when ready
  149. ANI$MODSNDB:    ANI     MODSNDB ! RET   ;bit to test for send ready
  150. CPI$MODSNDR:    CPI     MODSNDR ! RET   ;value of send bit when ready
  151.                 DS      12
  152. ;
  153. LOGONPTR:       DW      LOGON           ;for user message. *obsolete*   160H
  154.                 DS      3               ;jump to dialing routine        162H
  155. JMP$DISCONNT:   JMP     GOODBYE         ;disconnect the modem           165H
  156. JMP$GOODBYE:    RET ! NOP ! NOP         ;called b-4 exit to cpm         168H
  157. JMP$INITMOD:    JMP     INITMOD         ;initialization at cold start   16BH
  158. JMP$NEWBAUD:    JMP    NEWBD        ;sets baud associated w/phone # 16EH
  159.                 RET  !  NOP  !  NOP     ;(by-passes PMMI routine)       171H
  160.                 RET  !  NOP  !  NOP     ;(by-passes PMMI routine)       174H
  161. JMP$SETUPR:     JMP     SETUPR          ;SET command (user routine)     177H
  162. JMP$SPCLMENU:   DS      3        ;*obsolete with mex*            17AH
  163. JMP$SYSVER:     JMP     SYSVER          ;Overlay's voice in sign-on     17DH
  164. JMP$BREAK:      JMP     SENDBRK         ;send a break                   180H
  165. ;
  166. ;
  167. è; Do not change the following six lines.
  168. ;
  169. JMP$ILPRT:      DS      3               ;                               183H
  170. JMP$INBUF       DS      3               ;                               186H
  171. JMP$INLNCOMP:   DS      3               ;                               189H
  172. JMP$INMODEM     DS      3               ;                               18CH
  173. JMP$NXTSCRN:    DS      3               ;                               18FH
  174. JMP$TIMER:      DS      3               ;                               192H
  175. ;
  176. ; Clear sequences -- CLREOS is clear to end of screen, CLRSCRN is clear
  177. ; entire screen.  Last entry must be 0.  Any other 0's act as NOP's.
  178. ; The SCRNTST option must be set "YES" for these to work.  
  179. ; Each routine must be exactly nine bytes long.
  180. CLREOS:         CALL    ILPRT        ;                194H
  181.             DB    ESC,'~k',0,0
  182.                 RET
  183. ;
  184. CLRSCRN:        MVI     C,ILP        ;                19DH
  185.                 CALL    MEX
  186.                 DB      0CH,0,0
  187.                 RET            ;                1A5H
  188. ;
  189. ;-----------------------------------------------------------------
  190. ;
  191. ;           *** END OF FIXED FORMAT AREA ***
  192. ;
  193. ;-----------------------------------------------------------------
  194. ;
  195. SYSVER:        CALL    ILPRT
  196.                 DB      'Version for Intertec Superbrain'
  197.                 DB      CR,LF,0
  198.                 RET
  199. ;
  200. ; CONOUT FRONT-END ROUTINE TO ELIMINATE RUBS
  201. ;
  202. CONRTN:        MOV    A,C
  203.         CPI    7FH        ;SCREEN OUT RUBS
  204.         RZ
  205. CONEXIT:    JMP    OUTVEC        ;OVERLAID WITH OUTVEC DATA
  206. ;.....
  207. ;
  208. ;
  209. ;-----------------------------------------------------------------------
  210. ;
  211. ; NOTE:  You can change the SYSVER message to be longer or shorter.  The
  212. ;        end of your last routine should terminate by 0B00H if using the
  213. ;       Hayes Smartmodem or by address 0D00H otherwise.
  214. ;
  215. ;-----------------------------------------------------------------------
  216. ;
  217. ;
  218. LOGON:    DB    0        ;*obsolete*
  219. ;.....
  220. ;
  221. ;
  222. è;=======================================================================
  223. ;
  224. ; This routine allows a 300 ms. break tone to be sent to reset some
  225. ; time-share computer.
  226. ;
  227. SENDBRK:  MVI   A,1FH           ;SEND BREAK TONE
  228.           JMP   GOODBYE1
  229. ;...
  230. ;
  231. ;
  232. ; This routine sends a 300 ms. break tone or sets DTR low for the same
  233. ; length of time to disconnect some modems such as the Bell 212A, etc.
  234. ;
  235. GOODBYE:  MVI   A,15H           ;SEND BREAK, TURN OFF DTR
  236. ;
  237. GOODBYE1: OUT   MODCTL1         ;SEND TO STATUS PORT
  238.           MVI   B,3             ;WAIT 300 MS.
  239.           MVI   C,TIMER
  240.           CALL  MEX
  241.           MVI   A,37H           ;NORMAL SEND/RECEIVE WITH DTR
  242.           OUT   MODCTL1         ;SEND TO STATUS PORT
  243.           RET
  244. ;.....
  245. ;
  246. ;Intertec initialization ....courtesy Ben Wert and m7sbc.asm
  247. ;
  248. ;BIOS CONTROL LOCATIONS
  249. ; /-----------------------VERIFY THESE LOCATIONS IN YOUR BIOS
  250. ; |                      |   |
  251. ; |                      |   |
  252. ; V                      V   V
  253. BAUD        EQU    0EF00H        ;BIOS MAIN + AUX BAUD RATE
  254. MNMODE        EQU    0EF01H        ;BIOS MAIN PORT MODE
  255. ;
  256. ;
  257. ;
  258. ;8251A CONTROL COMMANDS
  259. RESET        EQU    37H
  260. MODESET        EQU    40H
  261. DTRSET        EQU    02H
  262. ;
  263. BAUDTBL:    DB    0        ;   50 BAUD    00H
  264.         DB    0        ;   75 BAUD    01H
  265.         DB    0        ;  110 BAUD    02H
  266.         DB    0        ;  134 BAUD    03H
  267.         DB    0        ;  150 BAUD    04H
  268.         DB    1        ;  300 BAUD    05H
  269.         DB    3        ;  600 BAUD    06H
  270.         DB    5        ; 1200 BAUD    07H
  271.         DB    5        ; 1800 BAUD    08H
  272.         DB    5        ; 2000 BAUD    09H
  273.         DB    6        ; 2400 BAUD    0AH
  274.         DB    6        ; 3600 BAUD    0BH
  275.         DB    7        ; 4800 BAUD    0CH
  276.         DB    7        ; 7200 BAUD    0DH
  277. è        DB    8        ; 9600 BAUD    0EH
  278. ;
  279. INITMOD:    LDA    BAUD        ;ESTABLISH EXISTING BAUD RATE
  280.         ANI    0F0H        ;AND OUT AUX BAUD RATE
  281.         RRC            ;
  282.         RRC            ;GET TABLE INDEX
  283.         RRC            ;
  284.         RRC            ;
  285.         LXI    H,BAUDTBL
  286.         MOV    E,A
  287.         MVI    D,0
  288.         DAD    D
  289.         MOV    A,M
  290.         STA    MSPEED        ;SET MEX BAUD CODE
  291. ;
  292. ; SET BAUD RATE AND PORT MODE
  293. ;
  294. INITMOD1:    MVI    A,MODESET+DTRSET ;PREPARE FOR MODE CHANGE
  295.         OUT    MODCTL1
  296.         NOP ! NOP
  297.         LDA    MNMODE        ;USE MODE FROM BIOS
  298.         OUT    MODCTL1
  299.         NOP ! NOP
  300.         MVI    A,RESET        ;ENABLE USART
  301.         OUT    MODCTL1    
  302.         LDA    BAUD        ;SET BAUD FROM BIOS
  303.         OUT    60H        ;BAUD RATE GENERATOR PORT
  304.         NOP ! NOP
  305.         IN    MODDATP        ;CLEAN OUT I/P BUFFER
  306.         RET
  307. ;
  308. ;.....
  309. ;
  310. ;
  311. SETUPR:   MVI   C,SBLANK        ;ANY ARGUMENTS?
  312.           CALL  MEX
  313.           JC    SETSHO          ;IF NOT, GO DISPLAY BAUD
  314.           LXI   D,CMDTBL
  315.           MVI   C,LOOKUP
  316.           CALL  MEX             ;PARSE ARGUMENT
  317.           PUSH  H               ;SAVE ANY PARSED ARGUMENT ADRS ON STACK
  318.           RNC                   ;IF WE HAVE ONE, RETURN TO IT
  319.           POP   H               ;OOPS, INPUT NOT FOUND IN TABLE
  320. SETERR:      CALL  ILPRT           ;TELL USER INPUT NOT VALID
  321.           DB    CR,LF,'++ Invalid Set Command - Use SET ? for help ++'
  322.       DB    CR,LF,0
  323.           RET
  324. ;
  325. CMDTBL:      DB    'BAU','D'+80H
  326.       DW    SETBAUD
  327.       DB    'PRT','Y'+80H
  328.       DW    SETPRTY
  329.       DB    'WOR','D'+80H
  330.       DW    SETWORD
  331.       DB    'STO','P'+80H
  332. è      DW    SETSTOP
  333.       DB    '?'+80H
  334.       DW    SETHELP
  335.       DB    0
  336. ;
  337. SETSHO:      CALL    PRTBAUD
  338.       CALL    PRTWORD
  339.       CALL    PRTPRTY
  340.       CALL    PRTSTOP
  341.       RET
  342. ;
  343. SETBAUD:  MVI   C,BDPARS        ;ANY ARGUMENTS?
  344.           CALL  MEX
  345.           JC    SETERR          ;IF NOT, GO DISPLAY BAUD
  346.           MOV    E,A        ;CODE TO DE
  347.       MVI    D,0
  348.       LXI    H,BAUDTBL1    ;OFFSET INTO TABLE
  349.       DAD    D
  350.       MOV    A,M        ;FETCH CODE
  351.       ORA    A        ;DO WE SUPPORT THIS RATE
  352.       JZ    SETERR        ;NO - EXIT
  353.       MOV    B,A
  354.       LDA    BAUD        ;GET EXISTING BAUD
  355.       ANI   0FH
  356.       ORA    B        ;OR IN NEW RATE
  357.       STA    BAUD
  358.       MOV    A,E        ;SET MEX BAUD RATE
  359.       STA    MSPEED
  360.       CALL  INITMOD1    ;SET BAUD AND MODE
  361. PRTBAUD:  CALL    ILPRT
  362.       DB    'Baud Rate:',tab,0
  363.       LDA   MSPEED
  364.       MVI    C,PRBAUD
  365.       CALL  MEX
  366.       CALL    CRLF
  367.       RET    
  368. BAUDTBL1: DB    20H,50H,0,60H,0        ;110,300,450,600,710
  369.       DB    70H,0A0H,0C0H,0E0H,0    ;1200,2400,4800,9600,19200
  370. ;
  371. ;
  372. ; NOTE: The NEWBD: vector as implemented here is just a repetition of
  373. ;       code found four lines under SETBAUD. It is repeated here to
  374. ;    allow removal of an extra CRLF when reporting the change in
  375. ;    baud rate.  The code can be removed and the label placed above
  376. ;    without loss of function.   DDF 09/25/84
  377. ;
  378. NEWBD:      MOV    E,A        ;CODE TO DE
  379.       MVI    D,0
  380.       LXI    H,BAUDTBL1    ;OFFSET INTO TABLE
  381.       DAD    D
  382.       MOV    A,M        ;FETCH CODE
  383.       ORA    A        ;DO WE SUPPORT THIS RATE
  384.       JZ    SETERR        ;NO - EXIT
  385.       MOV    B,A
  386.       LDA    BAUD        ;GET EXISTING BAUD
  387.       ANI   0FH
  388.       ORA    B        ;OR IN NEW RATE
  389.       STA    BAUD
  390.       MOV    A,E        ;SET MEX BAUD RATE
  391.       STA    MSPEED
  392.       CALL  INITMOD1    ;SET BAUD AND MODE
  393. è          LDA   MSPEED
  394.       MVI    C,PRBAUD
  395.       CALL  MEX
  396.           CALL  ILPRT
  397.           DB    tab,0
  398.           RET    
  399. ;
  400. ;
  401. SETPRTY:  LXI    D,PRTYTBL
  402.       CALL  TSRCH
  403.       JC    SETERR
  404.       LDA    MNMODE
  405.       ANI   0CFH
  406.       ORA   L
  407.       STA    MNMODE
  408.       CALL  INITMOD1
  409. PRTPRTY:  CALL  ILPRT
  410.       DB    'Parity:',TAB,TAB,0
  411.       LDA    MNMODE
  412.       ANI   30H
  413.       RRC
  414.       RRC
  415.       RRC
  416.       RRC
  417.       ADD    A
  418.       MOV    E,A
  419.       MVI    D,0
  420.       LXI    H,PRTYTBL1
  421.       DAD    D
  422.       MOV    E,M
  423.       INX    H
  424.       MOV    D,M
  425.       MVI    C,PRINT
  426.       CALL    MEX
  427.       CALL    CRLF
  428.        RET
  429. PRTYTBL:  DB    'EVE','N'+80H
  430.       DW    30H
  431.       DB    'E'+80H
  432.       DW    30H
  433.       DB    'OD','D'+80H
  434.       DW    10H
  435.       DB    'O'+80H
  436.       DW    10H
  437.       DB    'NON','E'+80H
  438.       DW    0
  439.       DB    'N'+80H
  440.       DW    0
  441.       DB    0
  442. PRTYTBL1: DW    PRTYN
  443.       DW    PRTYO
  444.       DW    PRTYN
  445.       DW    PRTYE
  446. PRTYN:      DB    'None','$'
  447. PRTYO:      DB    'Odd','$'
  448. èPRTYE:      DB    'Even','$'
  449. ;
  450. ;
  451. SETWORD:  LXI    D,WORDTBL
  452.       CALL  TSRCH
  453.       JC    SETERR
  454.       LDA    MNMODE
  455.       ANI   0F3H            ;clear old word length
  456.       ORA   L            ;set new word length
  457.       STA    MNMODE            ;save new value in bios
  458.       CALL  INITMOD1        ;initialize port
  459. PRTWORD:  CALL  ILPRT            ;print existing word length
  460.       DB    'Word Length:',TAB,0
  461.       LDA    MNMODE            ;left justify word length bits
  462.       ANI   00CH
  463.       RRC
  464.       RRC
  465.       ADI    35H            ;CONVERT TO ASCII + 5
  466.       MOV    E,A
  467.       MVI    C,CONOUT
  468.       CALL    MEX
  469.       CALL    ILPRT
  470.       DB    ' bits',CR,LF,0
  471.        RET
  472. WORDTBL:  DB    '5'+80H
  473.       DW    0
  474.       DB    '6'+80H
  475.       DW    04H
  476.       DB    '7'+80H
  477.       DW    08H
  478.       DB    '8'+80H
  479.       DW    0CH
  480.       DB    0
  481. ;
  482. ;
  483. SETSTOP:  LXI    D,STOPTBL
  484.       CALL  TSRCH
  485.       JC    SETERR
  486.       LDA    MNMODE
  487.       ANI   03FH            ;CLEAR OUT OLD STOP BITS
  488.       ORA   L            ;SET NEW STOP BITS
  489.       STA    MNMODE            ;SAVE NEW STOP BITS
  490.       CALL  INITMOD1        ;INITIALIZE BAUD AND PORT
  491. PRTSTOP:  CALL  ILPRT
  492.       DB    'Stop Bits:',TAB,0
  493.       LDA    MNMODE
  494.       ANI   0C0H            ;LEFT JUSTIFY STOP BITS
  495.       RLC
  496.       RLC
  497.       ADD    A            ;COMPUTE TABLE OFSET
  498.       MOV    E,A
  499.       MVI    D,0
  500.       LXI    H,STOPTBL1
  501.       DAD    D            ;COMPUTE ENTRY ADDRESS
  502.       MOV    E,M
  503. è      INX    H
  504.       MOV    D,M            ;DE = TABLE DATA
  505.       MVI    C,PRINT
  506.       CALL    MEX
  507.       MVI    C,ILP
  508.       CALL    CRLF
  509.        RET
  510. STOPTBL:  DB    '1'+80H
  511.       DW    40H
  512.       DB    '1.','5'+80H
  513.       DW    80H
  514.       DB    '2'+80H
  515.       DW    0C8H
  516.       DB    0
  517. STOPTBL1: DW    STOP1
  518.       DW    STOP1 
  519.       DW    STOP15
  520.       DW    STOP2
  521. STOP1      DB    '1$'
  522. STOP15      DB    '1.5$'
  523. STOP2      DB    '2$'
  524. ;
  525. SETHELP:  LXI    D,HLPMSG
  526.       MVI    C,PRINT
  527.       CALL    MEX
  528.       RET
  529. ;
  530. HLPMSG:      DB    CR,LF,'SET command, SUPERBRAIN version:',cr,lf
  531.       DB    CR,LF,'SET    (Shows current settings)'
  532.       DB    CR,LF,'SET ?'
  533.       DB    CR,LF,'SET BAUD 110 <or> 300 <or> 600 <or> 1200 ... 9600'
  534.       DB    CR,LF,'SET WORD 5 <or> 6 <or> 7 <or> 8'
  535.       DB    CR,LF,'SET PRTY Even <or> Odd <or> None'
  536.       DB    CR,LF,'SET STOP 1 <or> 1.5 <or> 2'
  537.       DB    CR,LF,'$'
  538. ;
  539. CRLF:        CALL    ILPRT
  540.       DB    CR,LF,0
  541.       RET
  542. ;
  543. ; Compare next input-stream item to table @DE;
  544. ; CY=1 if not found else HL=matched data word
  545. ;
  546. TSRCH:      MVI    C,LOOKUP
  547.       JMP    MEX
  548. ;
  549. ILPRT:      MVI    C,ILP
  550.       JMP    MEX
  551. ;
  552. ; Test the status of the list device since Intertec never implemented this
  553. ; function into the BIOS.
  554. ;
  555. LISTST:      IN    41H        ;GET AUX PORT STATUS
  556.       ANI    81H        ;DSR + TxRDY
  557.       XRI    81H        ;INSURE ALL ARE PRESENT TOGETHER
  558. è      JNZ    LISTST1        ;JUMP IF NOT READY
  559.       MVI    A,0FFH        ;SET READY
  560.       RET
  561. LISTST1:  XRA    A        ;SET NOT READY
  562.       RET
  563. ;.....
  564. ;
  565. ;
  566. ;              (END OF INITMOD AND SETUP ROUTINES)
  567. ;=======================================================================
  568. ;               
  569. ;
  570. ;
  571. SPCLMENU: RET
  572. ;
  573. ;=======================================================================
  574. ;
  575. ;
  576. ; NOTE:  MUST TERMINATE PRIOR TO 0B00H (with Smartmodem)
  577. ;                                0D00H (without Smartmodem).
  578. ;
  579. ;
  580. ;
  581. ; This is the patch file for MEX 1.0 -- you may edit this file to change
  582. ; various initial variables. Assemble with ASM or MAC, then use MLOAD
  583. ; to patch the changes into MEX:
  584. ;
  585. ;    ASM MEXPAT10.AAZ            ;assemble the edited file
  586. ;    MLOAD NEWMEX.COM=MEX.OBJ,MEXPAT10    ;patch MEX
  587. ;
  588. ; You may also pull this file into your modem overlay (be sure you in-
  589. ; clude the ORG statement below).
  590. ;
  591. ; The order of the patch variables supported here will not change from
  592. ; version to version (i.e., new items will be added on to the end).
  593. ;
  594. ;
  595.     ORG    0D00H        ;location of patch variables
  596. ;
  597. LF    EQU    10        ;define ASCII linefeed code
  598. ;
  599. ;
  600. ; The following line defines the MEX service call entry point, and
  601. ; is not meant to be changed by the user
  602. ;
  603. MEX:    DS    3        ;MEX service call processor
  604.     DS    3        ;reserved
  605.     DS    1        ;reserved
  606. ;
  607. ; The following line contains the initial free-memory pointer for
  608. ; MEX.  Sophisticated modem overlays requiring additional space may change
  609. ; this pointer (ie, move it higher), and thus "protect" an area of RAM.
  610. ;
  611. MEMRY:    DS    2        ;first free memory pointer
  612. ;
  613. è; Following are the lowest-level vectors for console and list I/O used
  614. ; by MEX.  These normally point to routines that save the registers and
  615. ; vector to the appropriate BIOS routines.  Complex applications may
  616. ; need to intercept (or even replace) these routines.  If you do this,
  617. ; be sure to preserve DE, HL and BC.
  618. ;
  619. STSVEC:    DS    2        ;console status vector
  620. INVEC:    DS    2        ;console input vector
  621. OUTVEC:    DS    2        ;console output vector
  622. LVEC:    DS    2        ;list output vector
  623. LSTVEC:    DW    LISTST        ;list status vector
  624. ;
  625. ; The following line defines the location of the default MEX prompt.
  626. ; If you'd like to provide your own initial prompt, add a DW statement
  627. ; pointing to a prompt buffer structured as follows:
  628. ;
  629. ;        DB <max size of buffer>
  630. ;        DB <length of actual prompt>
  631. ;        DB <prompt string>
  632. ;
  633. ; <maxsize> and <length> may be equal (especially if you disable the
  634. ; ID command by setting CHGPMT, below to 0); the ID command will, if
  635. ; left enabled, be limited to the <max size> value.
  636. ;
  637. PROMPT:    DS    2        ;prompt location
  638.     DS    1        ;reserved
  639. TYPLIN:    DB    22        ;for TYPE command: # lines/screen
  640. PAUSFL:    DB    1        ;for TYPE cmd: 1=pause 0=no pause
  641. SEPCHR:    DB    ';'        ;multiple command-line separator
  642. ;
  643. ; following five for SENDOUT command
  644. ;
  645. SOWAIT:    DB    4        ;# seconds waiting for a sendout echo
  646. SOREPL:    DB    8        ;# seconds waiting for initial reply
  647. SOTRIG:    DB    '>'        ;sendout trigger char from remote
  648. CANCHR:    DB    'U'-64        ;sendout char to cancel line to remote
  649. SORTRY:    DB    6        ;sendout # retries
  650. ;
  651. ;
  652. HEXFLG:    DB    0        ;hex/decimal mode
  653. ESCCHR:    DB    05H        ;terminal mode escape char (05H = HERE IS)
  654. NOBELL:    DB    0        ;set to 1 to disable bell
  655. ;
  656. ; Buffer variables.  See BUFFERS.DOC for setup information
  657. ;
  658. PSIZE:    DB    2        ;default=2k
  659. ASIZE:    DB    255        ;"big" capture buffer
  660. XSIZE:    DB    16        ;16K transfer buffer
  661. NSIZE:    DB    1        ;1k for 85 batch files
  662. PRELEN:    DB    40        ;maximum length of PREFIX string
  663. SUFLEN:    DB    40        ;maximum length of SUFFIX string
  664. ;
  665. ; Misc. stuff
  666. ;
  667. CDOSFL:    DB    0        ;non-zero for CDOS
  668. èWTECHO:    DB    0        ;non-zero sets "wait-for-echo"
  669. KYSIZE:    DW    400        ;size of keystring area, in bytes
  670. CISFLG:    DB    1        ;non-zero allows CIS file transfers
  671. CISOK:    DB    1        ;non zero allows STAT CIS ON or OFF
  672. CHGPMT:    DB    1        ;non-zero allows ID (prompt chg) command
  673. ERRID:    DB    1        ;non-zero prints ID msg in err msgs
  674. ;
  675. ; by setting the following DB to 0, you can disable the HELP
  676. ; command, freeing up space used by the help file index.
  677. ;
  678. HELPOK:    DB    1        ;non-zero allows HELP command
  679. MEXDU:    DB    0        ;user \/  alternate area for READ,LOAD,INI.MEX
  680.     DB    0        ;drive/\  & HELP.MEX (if SEARCH <>0)
  681. DEBUG:    DB    0        ;debugging in term-mode if non-zero
  682. EXCLSY:    DB    1        ;non-0 excludes $SYS from batchsend, dir
  683. INIMEX:    DB    0        ;non-zero runs INI.MEX (if present) at startup
  684. RTIMER:    DB    1        ;receiver wait: # seconds [Plouff patch]
  685. PQSIZE:    DW    150        ;size of the modem-port queue
  686. PHSIZE:    DB    30        ;phone library size (# entries)
  687. SILENT:    DB    0FFH        ;0=silence multi-line & READ cmd echo
  688. ALERT:    DB    255        ;alert-bell count on CALL complete
  689. EXTEND:    DB    0        ;non-zero: unknown commands goto READ processor
  690. SPLIT:    DB    0        ;non-zero: splits phonelib printout, shows baud
  691. SEARCH:    DB    0        ;search mode 0,1,2,3
  692. ;
  693. ; Following is the GLOBAL secondary options table.  To
  694. ; set an option to global, change its ASCII character to a 0.
  695. ;
  696. RESTT:    DB    'BDLQRSTVX'
  697. ;
  698. ;
  699.     END
  700.