home *** CD-ROM | disk | FTP | other *** search
/ The CIA World Factbook 1992 / k3bimage.iso / sel / 02 / 0004 / jzdocs.arc / JMODEM.DOC < prev    next >
Encoding:
Text File  |  1988-10-04  |  27.6 KB  |  757 lines

  1.  
  2.  
  3.                                   J M O D E M
  4.                               File Transfer System
  5.                                  Compliments of
  6.                                Richard B. Johnson
  7.                                 PROGRAM EXCHANGE
  8.                                  (719) 548-0208
  9.                                 October 4, 1988
  10.  
  11.           General:
  12.           First Let me get this over with.
  13.           MS-DOS is a registered trademark of Microsoft Corporation
  14.           IBM, IBM-PC, IBM-XT, AT, are registered trademarks of Inter-
  15.           national Business Machines, Inc. WILDCAT! is a trademark of
  16.           Mustang Software. XMODEM is a public-domain file-transfer
  17.           protocol developed by Ward Christensen.
  18.  
  19.           JMODEM is released into the public domain. As with most
  20.           public-domain protocols, you are advised that there is no
  21.           implied warranty of any kind. The source-code is provided so
  22.           that you may determine for yourself if this program may
  23.           serve a useful purpose. It is written in Microsoft MASM
  24.           Assembly-language using good standards of engineering prac-
  25.           tice. It does not use any strange or "undocumented" func-
  26.           tions of the MS-DOS operating system.
  27.  
  28.                 PLEASE UPLOAD THIS FILE (The ARC file) to as many
  29.                 BBS systems as you can so that it gets installed
  30.                 all around the country.
  31.  
  32.           Introduction:
  33.           JMODEM is a new file-transfer protocol developed to be used
  34.           as an "external protocol" on BBS systems and personal com-
  35.           puters using the IBM-PC/AT/XT structure and the MS-DOS oper-
  36.           ating system.
  37.  
  38.           This file-transfer system features:
  39.  
  40.                 o       16-bit CRC for verification
  41.                 o       File size is exactly maintained
  42.                 o       Data compression.
  43.                 o       Rapid host/remote synchronization.
  44.                 o       Variable-length transmission blocks which,
  45.                         if there are few errors, increase to 8192
  46.                         data-bytes in length.
  47.                 o       Flow control (automatic)
  48.                 o       Hangup protection
  49.                 o       Aborted files are saved
  50.                 o       Files being overwritten are renamed to
  51.                         ".OLD", rather than deleted.
  52.                 o       COM1 - COM4 support.
  53.                 o       Interrupt on received characters allows data
  54.                         to be received while the previous block is
  55.                         being written to disk. This provides almost
  56.                         continuous data transmission without long
  57.                         waits between blocks.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                      - 1 -
  64.           
  65.                                                JMODEM Protocol  Page 2
  66.  
  67.  
  68.           JMODEM is not for everyone! It does not have any pretty
  69.           screens to dazzle the user. It is designed to maximize the
  70.           amount of data that can be transferred in a given time (and
  71.           reduce telephone cost). It does this by sending very long
  72.           blocks of data and encoding (compressing) the data wherever
  73.           possible. Since long blocks of data are subject to many
  74.           transmission errors, a 16 bit CRC is used to determine the
  75.           data integrity. As many as ten retries are made if the data
  76.           is not correctly received. If you have a noisy telephone
  77.           circuit, you will find that JMODEM will abort more often
  78.           than the XMODEM protocol which sends very short blocks. A
  79.           future version that will be downward-compatible with the ex-
  80.           isting version is being developed that will do "heroic"
  81.           retries and will even go down to a 16-byte block-lengths if
  82.           that's what is necessary to get the data transferred.
  83.  
  84.           Once synchronization between the remote computer and the
  85.           host are established, JMODEM paints a status block on the
  86.           screen that shows how the file transfer is going. The status
  87.           screen shows the block being transmitted (or the last re-
  88.           ceived), the length of the block, and the total bytes having
  89.           been transmitted (or received). A special synchronization
  90.           routine is used so that the first block is not thrown away
  91.           as happens so often in XMODEM type routines. During the syn-
  92.           chronization routine, where the host is waiting for the user
  93.           to enter the proper file parameters (a 30 second wait).  You
  94.           can abort immediately by sending a control X (^X). After ac-
  95.           tual file transfer begins, ie. when you see the status win-
  96.           dow on the screen, no input from the keyboard is possible.
  97.           You send a control BREAK to abort the transmission (or ^C).
  98.           In this case, the program will abort after the block being
  99.           sent/received is complete. This could take 15 or more sec-
  100.           onds with long blocks so be patient.
  101.  
  102.           In the event that carrier is lost (the user disconnected),
  103.           the file-transfer program will also abort. This, too, could
  104.           take as long as 15 seconds.
  105.  
  106.           How it works:
  107.           The block size starts out at 512 bytes (or the actual bytes
  108.           in the file -- whichever is less). To this is added a 6-byte
  109.           overhead. If the block transfer occurred without any
  110.           retries, the block length is increased by 512 bytes to 1024
  111.           bytes. As long as the transmission was successful without
  112.           incurring any re-tries, the block-length increases to a max-
  113.           imum of 8192 bytes. There is still the same 6-byte overhead
  114.           so the maximum block length will actually be 8198 bytes. Any
  115.           time there are retries, the block length (on the next new
  116.           string) is decreased by 512 bytes. The string-length is
  117.           never reduced to less than 512 bytes due to errors. When the
  118.           last bytes are read from the file, the block length may be
  119.           as little as 7 bytes (one data byte, plus the 6 byte over-
  120.           head). The file size as received will be exactly the file
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                      - 2 -
  127.           
  128.                                                JMODEM Protocol  Page 3
  129.  
  130.           size as transmitted. XMODEM will "round-up" the file size to
  131.           the next higher block. This means that MS-DOS's COMP (com-
  132.           pare) will always fail when you attempt to check files that
  133.           have been sent by XMODEM and many other protocols.
  134.  
  135.           When the file is read, an attempt is made to compress the
  136.           data using the well-known RLL process where multiple bytes
  137.           are compressed into a 4-byte statement.
  138.  
  139.           For instance a string that looks like this (hex):
  140.                 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0 A0
  141.           Gets compressed into this:
  142.                 BB 0F 00 A0
  143.                  |  |  |  |__________ Byte to repeat
  144.                  |  |  |_____________ High byte of repeat length
  145.                  |  |________________ Low byte of repeat length
  146.                  |___________________ Sentinel Byte
  147.  
  148.           The sentinel-byte (BBH), when encountered in a data stream
  149.           will get expanded to four bytes. Therefore, it is possible
  150.           for the "compressed" data string to actually be longer than
  151.           the original. If this occurs, the original string is sent
  152.           rather than the longer encoded one. Since the kind of data
  153.           sent can be different from block-to-block, it is necessary
  154.           to send a control-byte along with the data so the receiver
  155.           had determine how to operate on the data.
  156.  
  157.           This is the control structure:
  158.  
  159.           00 02 00 0B 01 02 03 04 05 06 07 08 09 0A .... 0A EA
  160.            |  |  |  |  |                                 |  |_ CRC
  161.            |  |  |  |  |                                 |____ CRC
  162.            |  |  |  |  |______________________________________ data
  163.            |  |  |  |_________________________________________ rec.
  164.            |  |  |____________________________________________ control
  165.            |  |_______________________________________________ length
  166.            |__________________________________________________ Length
  167.  
  168.           Two bytes are used for the string length and two bytes are
  169.           used for the CRC. As is standard in memory, the high-byte
  170.           looks "to people using DEBUG" swapped with the low byte. The
  171.           data is transmitted exactly as the memory image.
  172.  
  173.           The length (a word) begins the string so the receiver may
  174.           know exactly how may bytes to receive.
  175.  
  176.           The control byte is bit-mapped to 8 possibilities. The ones
  177.           most important are:
  178.  
  179.                         NORMAL DATA
  180.                         COMPRESSED DATA
  181.                         END OF FILE
  182.                         ABORT
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.                                      - 3 -
  190.           
  191.                                                JMODEM Protocol  Page 4
  192.  
  193.           This is now the receiver "knows" what to do with the data.
  194.  
  195.           The CRC is generated using this polynomial:
  196.  
  197.           X =  X + X^(2(n-mod 7).......  Where n = t(n-1)
  198.                                          And t = string length
  199.  
  200.           It has the advantage of simplicity in assembly-language pro-
  201.           gramming and will detect errors with a probability of about
  202.           one undetected error in 2^132 (which is a very large num-
  203.           ber). It does not correct errors so its not important to use
  204.           some "standard" function to generate the CRC.
  205.  
  206.           Support for COM3 and COM4 have been added on revision level
  207.           V1.05 . Note that the standards for port locations are de-
  208.           facto standards only and may not be the ports actually used
  209.           in your computer. Please modify the communications port
  210.           structures at the beginning of the assembly-language program
  211.           to match your system parameters if they are different. The
  212.           modifications should be done to the STRUCTURES, not to the
  213.           EQUATES!
  214.  
  215.           Revision level V1.09 brings musical exit status. If the file
  216.           transfer was successful, the computer plays "victory". If
  217.           the file transfer was aborted, the computer plays "retreat".
  218.           Since the BBS SysOp is unlikely to want his computer to play
  219.           bugle-calls well into the evening, the user has the option
  220.           of turning the music off. This is done by setting an en-
  221.           vironment variable string:
  222.  
  223.           SET JMODEM=SHUTUP
  224.  
  225.                 ... Will accomplish the desired result.
  226.           Usage:
  227.           This program uses parameters on the command line.
  228.  
  229.           JMODEM S <filename.typ>       ( Sends a file to COM1:)
  230.           JMODEM R <filename.typ>       ( Receives a file from COM1:)
  231.           JMODEM S1 <filename.typ>      ( Sends a file to COM1:)
  232.           JMODEM R1 <filename.typ>      ( Receives a file from COM1:)
  233.           JMODEM S2 <filename.typ>      ( Sends a file to COM2:)
  234.           JMODEM R2 <filename.typ>      ( Receives a file from COM2:)
  235.  
  236.           After version 1.05, JMODEM supported communications adapter
  237.           ports 1 through 4.
  238.  
  239.           In a batch file, <filename.typ> may be a substitution
  240.           character.
  241.           JMODEM S2 %1                  ( Sends a file to COM2:)
  242.           JMODEM R2 %1                  ( Receives a file from COM2:)
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.                                      - 4 -
  253.           
  254.                                                JMODEM Protocol  Page 5
  255.  
  256.                       Setting up a Communications Program
  257.                         External File-Transfer Protocol.
  258.  
  259.           On my system, TELIX resides in the C:\TELIX directory. A
  260.           copy of JMODEM.COM is also in that directory. TELIX passes
  261.           the filename as the %3 parameter. Therefore the contents of
  262.           JUP.BAT is:
  263.  
  264.                         C:\TELIX\JMODEM S1 %3
  265.  
  266.           The contents of JDOWN.BAT are:
  267.  
  268.                         C:\TELIX\JMODEM R1 %3
  269.  
  270.           If I wished to receive in the "batch" mode, I could make a
  271.           file like this. Notice that some communications programs do
  272.           not allow multiple file names. Note that the comments "!"
  273.           are NOT ALLOWED in a DOS batch file.
  274.  
  275.                         :DO_LOOP                   ! Return here
  276.                         IF "%3" == "" GOTO DONE    ! More parameters?
  277.                         C:\TELIX\JMODEM R1 %3      ! Execute JMODEM
  278.                         IF ERRORLEVEL 1 GOTO DONE  ! Abort on error
  279.                         SHIFT                      ! %4 becomes %3
  280.                         GOTO DO_LOOP               ! Continue
  281.                         :DONE                      ! Exit batch file
  282.  
  283.           If you do not know what "%" parameters are used to pass the
  284.           file name, all you have to do is make a "dummy" batch file
  285.           that contains the following:
  286.  
  287.                         @ECHO OFF
  288.                         ECHO %1
  289.                         ECHO %2
  290.                         ECHO %3
  291.                         ECHO %4
  292.                         ECHO %5
  293.                         PAUSE
  294.  
  295.           When this is executed, you will see something like this:
  296.  
  297.                 1200
  298.                 1
  299.                 FILENAME.TYP
  300.                 ECHO is off
  301.                 ECHO is off
  302.                 Strike a key when ready . . .
  303.  
  304.           The first line contains "1200" which is the baud rate. This
  305.           means that the %1 parameter contains the baud rate.
  306.  
  307.           The second line contains "1" which is the communications
  308.           adapter port being used. This means that the port is being
  309.           passed as the %2 parameter.
  310.  
  311.  
  312.  
  313.  
  314.  
  315.                                      - 5 -
  316.           
  317.                                                JMODEM Protocol  Page 6
  318.  
  319.  
  320.           The third line contains "FILENAME.TYP" which is the file
  321.           name. This means that the file name is being passed as the
  322.           %3 parameter.
  323.  
  324.           The fourth and fifth lines contain nothing to echo so DOS
  325.           replies the current state of the echo function which is
  326.           "off".
  327.  
  328.           PCPLUS handles the file name passing a little bit different.
  329.           If I execute the same "dummy" batch file from the PCPLUS
  330.           directory, the response is:
  331.  
  332.                 FILENAME.TYP
  333.                 ECHO is off
  334.                 ECHO is off
  335.                 ECHO is off
  336.                 ECHO is off
  337.                 Strike a key when ready . . .
  338.  
  339.           This shows us that PCPLUS passes the file name as the first
  340.           parameter and there are no other parameters. However, If I
  341.           put more parameters on the command line within PCPLUS, they
  342.           will get sent to the batch file. The response is:
  343.  
  344.                 FILENAME.001
  345.                 FILENAME.002
  346.                 FILENAME.003
  347.                 FILENAME.
  348.                 ECHO is off
  349.                 Strike a key when ready . . .
  350.  
  351.           Therefore PCPLUS allows up to four file names to be passed
  352.           providing there's room on the command line.
  353.  
  354.           Notice that these two communications programs check the de-
  355.           fault directory for the external protocol batch file FIRST!
  356.           Therefore you must make certain that there are no other
  357.           similarly-named batch files in the current directory or
  358.           within the current path. Failure to do so will cause the im-
  359.           proper execution of the wrong batch file. Lets say that the
  360.           path was "C:\DOS;C:\TOOLS;C:\PCPLUS;C:\TELIX;C:\QMODEM". If
  361.           you named all your JMODEM external protocol batch files with
  362.           the same name, and you were attempting to use an external
  363.           file transfer protocol from QMODEM, the batch file designed
  364.           to operate with PCPLUS would be the first one "found" and
  365.           executed since the search-path will search the \PCPLUS
  366.           directory before the \QMODEM directory. You prevent the ex-
  367.           ecution of the incorrect batch file by calling them slightly
  368.           different names.
  369.  
  370.           When setting up external protocols, remember to configure
  371.           the communications program so that it prompts you for the
  372.           file names. Unlike some protocols, JMODEM does not transfer
  373.  
  374.  
  375.  
  376.  
  377.  
  378.                                      - 6 -
  379.           
  380.                                                JMODEM Protocol  Page 7
  381.  
  382.           the file name. You can use any file name that you wish. You
  383.           must pass the file name to JMODEM since it must know the
  384.           name of the file being transmitted or received. There are no
  385.           defaults.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.                                      - 7 -
  442.           
  443.                                                JMODEM Protocol  Page 8
  444.  
  445.                             Setting up a BBS System
  446.                         External File-Transfer Protocol.
  447.  
  448.  
  449.           If you are running a WILDCAT! bulletin board, the external
  450.           protocol files can be set up like this:
  451.  
  452.                         (JUP.BAT)
  453.                         CD D:\WILDCAT\PROTOCOL
  454.                         IF EXIST TRANSFER.BAD DEL TRANSFER.BAD
  455.                         JMODEM R1 %3
  456.                         IF ERRORLEVEL 1 GOTO END
  457.                         COPY %3 %4
  458.                         :END
  459.                         DEL %3
  460.  
  461.                         (JDOWN.BAT)
  462.                         CD D:\WILDCAT\PROTOCOL
  463.                         IF EXIST TRANSFER.BAD DEL TRANSFER.BAD
  464.                         JMODEM S1 %3
  465.                         IF ERRORLEVEL 1 GOTO BAD
  466.                         GOTO END
  467.                         :BAD
  468.                         COPY ALL.OK TRANSFER.BAD
  469.                         :END
  470.  
  471.           There are many variations available. Since WILDCAT! supports
  472.           batch-mode downloading, you could set up the batch file like
  473.           this:
  474.  
  475.                         (JDOWN.BAT)
  476.                         CD D:\WILDCAT\PROTOCOL
  477.                         IF EXIST TRANSFER.BAD DEL TRANSFER.BAD
  478.                         :DO_LOOP
  479.                         IF "%3" == "" GOTO END
  480.                         JMODEM S1 %3
  481.                         IF ERRORLEVEL 1 GOTO BAD
  482.                         SHIFT
  483.                         GOTO DO_LOOP
  484.                         :BAD
  485.                         COPY ALL.OK TRANSFER.BAD
  486.                         :END
  487.  
  488.           WILDCAT! checks the \PROTOCOL directory to see if the file
  489.           TRANSFER.BAD has been created. If it exists, it announces
  490.           that the file transfer has failed. It also announces "Error
  491.           with external protocol .. ". It does this when, in fact,
  492.           WILDCAT!  has made an error itself. In many cases WILDCAT!
  493.           will "find" the file TRANSFER.BAD when it DOES NOT EXIST! In
  494.           spite of this bug, WILDCAT! is one of the most reliable BBS
  495.           systems supporting external protocols.
  496.  
  497.           When setting up batch files remember that there is also a
  498.           bug in all DOS versions. The "IF ERRORLEVEL " statement does
  499.  
  500.  
  501.  
  502.  
  503.  
  504.                                      - 8 -
  505.           
  506.                                                JMODEM Protocol  Page 9
  507.  
  508.           NOT test the actual value of ERRORLEVEL! Instead it checks
  509.           to see if the returned value is EQUAL or GREATER than the
  510.           tested value. If you were to put the statement:
  511.  
  512.                         IF ERRORLEVEL 0 GOTO GOOD
  513.  
  514.           .... in a batch file, the execution would ALWAYS branch to
  515.           label "GOOD" regardless of the actual ERRORLEVEL returned!
  516.           More about bugs when we get to the "BAD BBS" section towards
  517.           the end.
  518.  
  519.           JMODEM does not require any information about handshaking.
  520.           It will look at the modem port and figure out for itself
  521.           what to do.
  522.  
  523.           In the event that the modem carrier is lost, JMODEM will
  524.           abort. Since JMODEM only checks the modem port occasionally,
  525.           it may take several seconds to abort when the carrier is
  526.           lost. It is impossible for a user to get at the DOS level
  527.           through JMODEM. Do NOT use the CTTY command in the external
  528.           protocol batch files. JMODEM returns ERRORLEVEL 1 if there
  529.           was any error in transmission or reception. It returns ER-
  530.           RORLEVEL 0 (no error) otherwise. It does not delete files
  531.           that have been partially received although it properly
  532.           closes them. The system operator can arrange the batch files
  533.           to delete them if required.
  534.  
  535.           When JMODEM attempts to create a file that already exists it
  536.           can't ask the user if the old one should be deleted since
  537.           the user is probably not in a terminal program at the time.
  538.           Therefore, JMODEM renames the other file to <filename.OLD>
  539.           and creates the new file. In the event that <filaname.OLD>
  540.           exists, it is deleted before the rename operation occurs.
  541.  
  542.           If you don't know what parameters are being sent to external
  543.           protocols, you can make a dummy batch file to check them
  544.           using the DOS's echo command just as explained in the user
  545.           interface previous to this "BBS" section. You can't see the
  546.           parameters being echoed from a remote terminal. You must be
  547.           present at the BBS board terminal to test those parameters
  548.           unless you modify the dummy command file like this:
  549.  
  550.                         @ECHO OFF
  551.                         ECHO %1>COM1
  552.                         ECHO %2>COM1
  553.                         ECHO %3>COM1
  554.                         ECHO %4>COM1
  555.                         ECHO %5>COM1
  556.  
  557.           If you find that your system passes the file name as %3,
  558.           your "upload" (receive) batch file would contain this:
  559.  
  560.                         JMODEM R1 %3
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.                                      - 9 -
  568.           
  569.                                               JMODEM Protocol  Page 10
  570.  
  571.           Your "download" (send) batch file would contain this:
  572.  
  573.                         JMODEM S1 %3
  574.  
  575.           In these examples, it is assumed that you are using communi-
  576.           cations adapter port "1".
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.                                      - 10 -
  631.           
  632.                                               JMODEM Protocol  Page 11
  633.  
  634.                                   The BAD BBS
  635.                                     Problem.
  636.  
  637.           Believe it or not, there are several very fine running BBS
  638.           systems in use that do not properly handle external proto-
  639.           cols. MS-DOS provides the proper mechanism for loading and
  640.           executing "child" programs from within the "parent" pro-
  641.           grams. This is function 4BH of the "DOS" INT 21H DOS inter-
  642.           face. Instead of using this function, these poorly-behaved
  643.           programs perform the external file-transfer protocol in the
  644.           following (or similar) manner:
  645.  
  646.                 (1) Make a DOS call to find the file-size of the ex-
  647.           ternal file-transfer protocol.
  648.  
  649.                 (2) Free up an array of memory from "string-space"
  650.           within the program that is large enough to copy the external
  651.           file transfer contents into it. As assumption about the
  652.           data-space required by the external file transfer program is
  653.           made based upon the "block-size" information that has been
  654.           entered during configuration.
  655.  
  656.                 (3) Loads the file into string-space memory.
  657.  
  658.                 (4) If its an ".EXE" file, ignore the header.
  659.  
  660.                 (5) CALL the first byte of code!
  661.  
  662.                 If JMODEM is run in this environment, it WILL crash
  663.           the system. JMODEM assumes that it has been placed in memory
  664.           by MS-DOS and that an entire segment (64k) is available to
  665.           run. JMODEM uses two buffers that are almost 32k in length!
  666.           One of the buffers is used to support data compression and
  667.           expansion. The other is used for the interrupt buffer.
  668.  
  669.           If you have such a BBS system and you wish to run JMODEM,
  670.           you can make a simple modification to the source-code, and
  671.           re-compile to produce a version which is a bit slower to in-
  672.           itialize and exit, but is guaranteed to leave all memory and
  673.           registers EXACTLY as they were when JMODEM got control. This
  674.           is done by saving and restoring all registers. Additionally,
  675.           any data space that will be modified is copied to a file
  676.           called VIRTUAL.MEM, then restored from that file just before
  677.           JMODEM exits.
  678.  
  679.           You modify the source-code by finding the "BAD_BBS" equate
  680.           near the beginning of the file. This is normally set to
  681.           "FALSE". You set this to "TRUE". Then you recompile in the
  682.           following manner:
  683.  
  684.                 MASM JMODEM;
  685.                 LINK JMODEM;
  686.                 EXE2BIN JMODEM.EXE JMODEM.COM
  687.                 DEL JMODEM.EXE
  688.  
  689.  
  690.  
  691.  
  692.  
  693.                                      - 11 -
  694.           
  695.                                               JMODEM Protocol  Page 12
  696.  
  697.  
  698.           Do NOT attempt to execute the ".EXE" version. You must
  699.           change JMODEM to a ".COM" file. If you do not have
  700.           EXE2BIN.COM to make the change, you can use DOS's DEBUG to
  701.           do the same thing. You do it this way:
  702.  
  703.           F:\DEV> debug jmodem.exe      ; DOS command line
  704.  
  705.           -rcx                          ; Examine CX register
  706.  
  707.           CX 1239                       ; Debug says the size was 1239
  708.           :
  709.  
  710.           -h 1239,100                   ; Calculate 1239H - 100H
  711.  
  712.           1339  1139                    ; Sum = 1339H, dif = 1139H
  713.           -rcx                          ; Examine register again
  714.  
  715.           CX 1239                       ; Is 1239H
  716.           :1139                         ; Change to 1139H
  717.                                         ; .. subtract 100H
  718.           -njmodem.com                  ; Name new SAVE file name
  719.  
  720.           -w                            ; Write to file
  721.  
  722.           Writing 1139 bytes            ; Debug prompts
  723.           -q                            ; Exit
  724.  
  725.           F:\DEV>                       ; Back to DOS
  726.  
  727.           When you use this version of JMODEM, it will take a little
  728.           while longer to load and exit because it must write a 64k
  729.           block of memory to a file and read / delete in upon exit.
  730.  
  731.           If you have problems using JMODEM with your system, you can
  732.           call the PROGRAM EXCHANGE and leave a message You can also
  733.           test your communications program's external file-transfer
  734.           protocols by transferring files (hopefully uploading) to the
  735.           PROGRAM EXCHANGE. Currently there are hundreds of boards
  736.           that are using this protocol and the number is growing every
  737.           day. Most problems encountered are found to be caused by in-
  738.           correct file names being sent to JMODEM (the wrong "%" pa-
  739.           rameters). A simple batch file to test these parameters will
  740.           go a long way towards solving the problems.
  741.  
  742.                                 Richard B. Johnson
  743.                                 PROGRAM EXCHANGE
  744.                                 (719) 548-0208
  745.                                 4750 Rusina Road # 106
  746.                                 Colorado Springs, CO
  747.                                 80907
  748.  
  749.           - Finis -
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.                                      - 12 -
  757.           
  758.  
  759.