home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / mex / mex-set2.doc < prev    next >
Encoding:
Text File  |  1994-07-13  |  13.0 KB  |  357 lines

  1. MEX-SET2.DOC    12-8-84            by HANK TATE 
  2.  
  3. 12/8/84 This is an update of MEX-SET.DOC.  I've learned some new 
  4. things since first writing MEX-SET and have changed the listings
  5. and explanations of the .MEX files included in this document to 
  6. reflect my current usage. 
  7.  
  8. ------------------------------------------------------------------
  9.  
  10. SOME NOTES ON USING INI.MEX AND OTHER "READ" FILES TO SIMPLIFY THE
  11. OPERATION OF MEX.COM
  12.  
  13.     After a long evening of working on setting up an INI.MEX 
  14. file and a number of READ files as suggested by Irv Block I think
  15. I have come up with some files that work nicely and I even under-
  16. stand what's happening. Sooo-o-o herewith are copies of the files
  17. I worked out with an explanation. Hope they help.
  18.  
  19.  
  20. ======  general set-up  ===========================================
  21.  
  22.    When setting up your version of MEX you have the option of
  23.  
  24.     a).  just using the regular MEX file with your "Computer Overlay"
  25.     b).  also changing some of the variables with MEXPAT11.ASM
  26.  
  27.   Since I had difficulty with my printer losing characters on long
  28. printings I chose to make two changes.
  29.  
  30.     PSIZE:     DB    24     ;instead of 2K which gives me
  31.                  a larger buffer size for the PRINTER. 
  32.     PQSIZE: DW    300    ;instead of 150 characters which gives
  33.                  me a larger character buffer for the
  34.                  modem since I run mostly at 1200 baud.
  35.  
  36.   After changing those two buffers I have not experienced any difficulty
  37. with the printing.
  38.  
  39. also be sure
  40.  
  41.     INIMEX: DB    1    ;runs INI.MEX automatically on startup
  42.                  by setting INITFILE ON
  43.  
  44.  
  45.  
  46. ======  INI.MEX  ==================================================
  47.  
  48.   INI.MEX is the .MEX file that MEX automatically looks for on starting
  49. up, whether you tell it to or not (assuming the INITFILE ON). You can
  50. disable this feature with "STAT INITFILE OFF" but there are some 
  51. advantages to using it. Write the INI.MEX file (and all the other 
  52. READ files) with any text editor.
  53.   Since I have chosen not to hardwire most of my changes I use the
  54. INI.MEX to allow quick and simple setup of the paramaters I want to
  55. start with. Using the INI.MEX system allows me to make quick changes
  56. to the way MEX works by simply changing INI.MEX without having to
  57. assemble and overlay the changes or CLONE a new MEX. The INI.MEX I 
  58. use is as follows:
  59.  
  60.  
  61. STAT WTECHO ON
  62. STAT SEARCH 3
  63. STAT SPLIT ON
  64. STAT BAKFILE ON
  65. STAT EXCLUDE OFF
  66. STAT FILTER ON
  67. STAT EXTEND ON
  68. ALT A0:
  69. ID "[MEXCD]"
  70. LOAD PHONE.PHN
  71. LOAD KEYS.KEY
  72. B:
  73. TERM SESSION.LOG
  74. DIR
  75. GLOBAL T
  76.  
  77.  
  78.  
  79. 1. STAT WTECHO ON - according to APPENDIX 3: of the MEX User's Guide
  80.    this will help you not overrun an RCP/M or RBBS when sending out
  81.    strings of information. Unless you send out a great deal of infor-
  82.    mation this protection should not slow you down very much.
  83. 2. STAT SEARCH 3 - I have two drives and always load the MEX program
  84.    disk on A and the DATA disk on B. This command tells MEX to look
  85.    for READ files, phone libraries, keystring files, and other command
  86.    files first on the ALTERNATE drive (rather than the logged drive)
  87.    then on the LOGGED drive second. The ALTERNATE and LOGGED drive or
  88.    set below.
  89. 3. STAT SPLIT ON - displays the phone directory in one column with any 
  90.    baud rate set figures displayed.
  91. 4. STAT BAKFILE ON - will prevent any pre-existing files from being over-
  92.    written by any new files that are created of the same name.
  93. 5. STAT EXCLUDE OFF - allows any system files to be shown on DIR command
  94. 6. STAT FILTER ON - useful when working on a noisy connection. Filters out
  95.    control characters, nulls, and characters with the high bit set.
  96. 7. STAT EXTEND ON - allows you to call a READ file without typing READ.
  97.    You only need to type the file name. I.E. "GET" will execute the 
  98.    "GET.MEX" file.
  99.         *** NOTE: One play off with this variable set "ON"
  100.          is that giving a built in command (such as T or STAT)
  101.          will cause MEX to first look for a "file" of that name 
  102.          and cause a momentary delay. You can keep MEX from 
  103.          looking for a file when you are giving a built in 
  104.          command by preceding it with a "*". (I.E.  *T  to go 
  105.          to the terminal mode)
  106. 8. ALT A0: - sets the ALTERNATE drive to A user 0.
  107. 9. ID "[MEX-MINE]" - changes the string which diplays on the command line
  108.    while MEX is running. If talking to another computer running MEX
  109.    instead of BYE this allows you to know which command line you are on,
  110.    yours or the remote's. You can make it anything you want up to 28
  111.    characters (in the standard distributed MEX).
  112. 10.LOAD PHONE.PHN - reads in the phone list which is created either
  113.    inside MEX and then SAVED or with a text editor. Using a separate
  114.    PHONE.PHN file allows simple changing and means you don't have to
  115.    CLONE new versions of MEX to retain changes to your phone directory.
  116. 11.LOAD KEYS.KEY - reads in the keylists. Same reasoning as for PHONE.PHN
  117. 12.B: - changes the logged drive to B: so that all files captured or
  118.    received are automatically placed on B.
  119.  
  120.          *** NOTE: some of the information and .DOC files that
  121.                    I have seen show a ^M (carriage return) here and 
  122.                    in other places in the READ files. I kept getting 
  123.                    SYNTAX ERRORS. If the SUFFIX indicator is set to ^M
  124.               and your READ files are arranged in separate lines 
  125.            as I have shown here you should not have any problems.
  126.  
  127. 13.TERM SESSION.LOG - creates a CAPTURE file named SESSION.LOG into
  128.    which everything which appears on the screen is captured. This is
  129.    a good protection. You won't find yourself wishing you'd captured
  130.    or printed something after it had already scrolled by. Particularly
  131.    valuable when operating on new boards, the SESSION.LOG file can be 
  132.    renamed to save it and then be edited and printed to give you a per-
  133.    manent record of how that system operates. That should allow you to 
  134.    save a great deal of time the next time you use the system. If after 
  135.    the session you decide you don't need the file or if you just fail 
  136.    to rename it, the next time you run MEX the previous SESSION.LOG 
  137.    file will be written over (poof...).
  138. 14.DIR - will automatically display the directory of B (the LOGGED drive).
  139. 15.GLOBAL T - will automatically take you to the terminal mode after
  140.    any file transfer.
  141.  
  142. ==>    Using the INI.MEX file as shown only takes about 1-2 seconds
  143.     on start up but can save you a lot of time in the long run.
  144.     And it sure is easier than trying to remember everything.
  145.  
  146.  
  147. ======== GET.MEX ==========================================================
  148.  
  149. WRT
  150. GLOBAL
  151. STAT REPLY 16
  152. SENDOUT "XMODEM S {1} {2:}"
  153. R{2:} {1}
  154. STAT REPLY 8
  155. GLOBAL T
  156. TA SESSION.LOG           
  157.  
  158.  
  159.     I really like this file! 
  160.  
  161.   This is a READ file which greatly speeds up the process of downloading
  162. a file with XMODEM. All you need to do is type "GET XXXXXXX.XXX" on the
  163. command prompt (not in the terminal mode.)
  164.  
  165.  
  166.     *** NOTE: in the sample here the {1} would be automatically
  167.         be replaced by the filename (XXXXXXXX.XXX) that you
  168.         are requesting before being sent out to the remote
  169.         computer. If you are wanting to issue any extensions
  170.         to the "S" and "R" commands (such as "B" for BATCH 
  171.         or "V" for VIEW) then type that extension after the
  172.         filename and it will automatically be executed.
  173.         * WARNING if you add a "T" extension the final line of
  174.         this GET.MEX will not execute since READ files cannot
  175.         work from the Terminal mode.
  176.         SAMPLE:
  177.             GET NEWFILE.DOC        will transfer NEWFILE.DOC
  178.                         to your system
  179.             GET *.NEW B        will transfer all .NEW
  180.                         files in batch mode
  181.             GET USQ.DOC VX        will transfer USQ.DOC,
  182.                         viewed then disconnect
  183.  
  184.  
  185. 1.  WRT - writes the capture file to disk and closes it. If this is not
  186.     done prior to receiving a file all of the captured information 
  187.     still in memory will be destroyed.
  188. 2.  GLOBAL - turns off the T so that this file has a chance to re-create
  189.     the session log before returning to the terminal mode.
  190. 3.  STAT REPLY 16 - gives the computer extra time to respond to a reply
  191.     from the remote computer. Minimizes the chance of overrunning the
  192.     remote computer.
  193. 4.  SENDOUT "XMODEM S{1} {2:}" - sends the string in quotations to the
  194.     remote computer after filling in the parameters as specified on
  195.     the command line.
  196.  
  197.         *** NOTE: It is important when creating any READ 
  198.             file that strings to be sent are enclosed
  199.             in quotation marks.
  200.  
  201. 5.  R{2:} {1} - commands your MEX to receive the file specified automatically.
  202. 6.  STAT REPLY 8 - sets the reply time back to normal
  203. 7.  GLOBAL T - turns the GLOBAL T back on 
  204. 8.  TA SESSION.LOG - will return to the terminal mode automatically after
  205.     finishing the transfer. The important thing is that it automatically
  206.     restarts the CAPTURE and APPENDS the new stuff to the SESSION.LOG
  207.     file that was closed at the start of GET.MEX.
  208.  
  209.  
  210.  
  211. ======= GETC.MEX   (stands for GET & CHANGE NAME) ==========================
  212.  
  213. WRT                      
  214. STAT REPLY 16
  215. SENDOUT "XMODEM S {1} {2} {3:}"
  216. R{3:} {2}                 
  217. STAT REPLY 8
  218. TA SESSION.LOG               
  219.  
  220.  
  221.  
  222.     This file works exactly the same as GET.MEX except that it allows
  223. you to specify a name change in the process of transferring the file.
  224.  
  225.     SAMPLE:
  226.         GET FOO.OBJ FOO.COM        will transfer FOO.OBJ to 
  227.                         your system and rename it 
  228.                         to FOO.COM on your logged disk.
  229.         GET NEXT.DOC NEXT2.DOC V    will transfer NEXT.DOC and
  230.                         rename it to NEXT2.DOC while
  231.                         viewing the file during the
  232.                         transfer.
  233.  
  234.  
  235. ====== GETLIB.MEX ===========================================================
  236.  
  237. WRT
  238. STAT REPLY 16
  239. SENDOUT "XMODEM L {1} {2} {3:}"
  240. R{3:} {2}
  241. STAT REPLY 8
  242. TA SESSION.LOG
  243.  
  244.  
  245.     This file will enable you to automatically copy a file out of a
  246. .LBR file if the remote computer's XMODEM program will allow it. Works
  247. exactly the same as files above except that the command string would be:
  248.  
  249.         SAMPLE:
  250.             GETLIB ANYFILE THISFILE.DOC
  251.  
  252.                 Will download the member file THISFILE.DOC 
  253.                 from ANYFILE.LBR. Extensions may be added
  254.                 as the third parameter the same as above.
  255.                 
  256.  
  257. ====== GETBYE.MEX ============================================================
  258.  
  259. WRT
  260. STAT REPLY 16
  261. SENDOUT "XMODEM S {1} {2:}"
  262. R{2:} {1}
  263. SENDOUT "BYE"
  264. STAT REPLY 8
  265. DSC
  266.  
  267.  
  268.  
  269.     Works exactly like GET.MEX except that it automatically signs off
  270. the remote computer and disconnects the modem from the phone line when the 
  271. file transfer is completed. Does not exit from MEX.
  272.  
  273.  
  274. ====== SEND.MEX ===========================================================
  275.  
  276. WRT            
  277. STAT REPLY 16
  278. SENDOUT "XMODEM R {1} {2:}"
  279. S{2:} {1}
  280. STAT REPLY 8  
  281. TA SESSION.LOG           
  282.  
  283.  
  284.     Works exactly like GET.MEX except that the R and S are transposed
  285. so that the file is sent instead of received. Turns off the checking for
  286. echos of each character sent to the remote since the XMODEM checking takes
  287. care of that during transfer (I think). TRIGGER set to nothing during the
  288. transfer while WTECHO OFF according to information in MEX User's Guide
  289. page 20.
  290.  
  291.  
  292.  
  293. ====== Q.MEX  (means QUIET MODEM) ==========================================
  294.  
  295. STAT WTECHO OFF
  296. STAT TRIGGER ""
  297. STAT REPLY 0
  298. SENDOUT "ATM0"
  299. STAT REPLY 8
  300. STAT TRIGGER ">"
  301. STAT WTECHO ON
  302.  
  303.  
  304.     For the HAYES SMARTMODEM. This file turns off the speaker for those
  305. times where you're doing continuous dialing and don't want to keep listening 
  306. to the modem dialing tones. Just type  Q  on the command line and magic takes 
  307. place.
  308.  
  309. 1. STAT WTECHO OFF - turns off the checking of each character sent for an
  310.     echo from a remote computer. Necessary because the modem can't 
  311.     echo the characters it receives.
  312. 2. STAT TRIGGER "" - turns off the TRIGGER so that MEX doesn't wait for 
  313.     anything before sending the SENDOUT string out.
  314. 3. STAT REPLY 0 - turns off the wait time for a reply. Makes this command
  315.     to the modem almost instantaneous.
  316. 4. SENDOUT "ATM0" - *** the critical line *** This sends the command to the
  317.     modem which actually instructs it to turn off the speaker. The 
  318.     command is in quotations and the one shown (ATM0) is for the HAYES
  319.     SMARTMODEM.
  320. 5. STAT REPLY 8 - turns back on the normal wait for reply time.
  321. 6. STAT TRIGGER ">" - turns back on the normal TRIGGER.
  322. 7. STAT WTECHO ON - turns back on the character echo checking.
  323.  
  324.  
  325. ====== Z.MEX  (noiZy MODEM) ================================================
  326.  
  327. STAT WTECHO OFF
  328. STAT TRIGGER ""
  329. STAT REPLY 0
  330. SENDOUT "ATZ"
  331. STAT REPLY 8
  332. STAT TRIGGER ">"
  333. STAT WTECHO ON
  334.  
  335.  
  336.     Exactly like Q.MEX except it sends the string to turn the HAYES
  337. SMARTMODEM speaker back on (ATZ).
  338.  
  339.  
  340. =============================================================================
  341.  
  342.     Thanks are due to Irv Block whose MEXFILES.INF prompted me to 
  343. undertake this task.
  344.  
  345.     *** NOTE ***   This file has been written to allow you to easily
  346.         create all of the .MEX files shown here by using a text
  347.         editor program and defining each file listing individually 
  348.         as a block and then saving it to your disk under the name
  349.         shown or one of your own choosing. Good luck!
  350.  
  351.  
  352.                 -  HANK TATE
  353.                    14503 JASON
  354.                    PINEHURST, TEXAS 77362
  355.                    (713) 356-3005  [voice only]
  356.  
  357.