home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c / ucapp2.doc < prev    next >
Text File  |  2020-01-01  |  35KB  |  775 lines

  1. (*=== KERM.DOC1.TEXT ===*)
  2. >>>>>>>>>>>>>>>>>>>>>>> KERM.DOC1.TEXT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  3.  
  4.  
  5. ------------------------------------------------------------------------
  6. |                                                                      |
  7. |         DOCUMENTATION FOR APPLE UCSD KERMIT ( Run-time Files )       |
  8. |                       VERSION   RUG/PT  V1.0                         |
  9. |                                                                      |
  10. |                       P. Terpstra                                    |
  11. |                       Dept. Biochemistry                             |
  12. |                       University Groningen                           |
  13. |                       Nijenborgh 16                                  |
  14. |                       9747 AG  Groningen                             |
  15. |                       The Netherlands                                |
  16. |                                                                      |
  17. |                       (20-dec-1985)                                  |
  18. |                                                                      |
  19. | Kermit-UCSD implements the Kermit file transfer protocol for the     |
  20. | Apple II(e) under the UCSD-p-System V1.1 or V1.2. It works with a    |
  21. | number of different serial cards in slot 2. It has been adapted from |
  22. | the IBM UCSD Kermit program. It is written mainly in UCSD Pascal     |
  23. | with some  6502 assembly routines linked in.                         | 
  24. ------------------------------------------------------------------------
  25.  
  26. ( If you have only the Kermit source files then read first part III in 
  27.   KERM.DOC3.TEXT. )
  28.  
  29.   
  30.                         -----------------
  31.                              PART I
  32.                         -----------------
  33.  
  34. ------------------------------------------------------------------------
  35. HOW TO MAKE A SELF STARTING KERMIT DISK
  36. ------------------------------------------------------------------------
  37.  
  38. First transfer the following system files to an empty diskette:
  39.  
  40. SYSTEM.PASCAL
  41. SYSTEM.APPLE
  42. SYSTEM.MISCINFO
  43.  
  44. This disk KERMIT: contains the  following files :
  45.  
  46. 1)  SYSTEM.ATTACH 
  47. 2)  ATTACH.DATA 
  48. 3)  ATTACH.DRIVERS 
  49. 4)  KERMIT.CODE 
  50. 5)  MAKEDATA.CODE 
  51. 6)  KERMIT.LIBRARY 
  52. 7)  UNKNOWN.TEXT 
  53. 8)  AP2.TEXT 
  54. 9)  APCOM.TEXT
  55. 10) SSC.TEXT 
  56. 11) UNKNOWN.DATA 
  57. 12) AP2.DATA 
  58. 13) APCOM.DATA 
  59. 14) SSC.DATA
  60. 15) KERM.DOC1.TEXT
  61. 16) KERM.DOC2.TEXT
  62. 17) KERM.DOC3.TEXT
  63.  
  64. Transfer files 1,2,3 to your disk
  65. Transfer file 4 and rename it SYSTEM.STARTUP
  66. Transfer file 6 and rename it SYSTEM.LIBRARY
  67. Transfer one of the .DATA files (11..14) and rename it KERMIT.DATA. These 
  68. files tell the Kermit program the type of acia on your serial card and other 
  69. default parameters.
  70.  
  71. Take :
  72.  
  73. SSC.DATA      for an Apple Super Serial Card
  74. AP2.DATA      for an IBS AP2 serial card with a 6551 acia
  75. APCOM.DATA    for an Apple Communications Card or
  76.                    a California SCC 7410 ASI 1 serial card or
  77.                    a Hayes Micromodem card  or
  78.                    possibly any serial card with a 6850 acia.
  79. UNKNOWN.DATA  if you do not know what type of card you have try this one.
  80.               This may work but you will not be able to change from within the 
  81.               Kermit program the serial port settings. Also the values of 
  82.               these settings shown by the Kermit program may not be correct.
  83.  
  84. Now you are ready to boot the disk. After the prompt "Kermit-UCSD>" type
  85. HELP to get an explanation of all the Kermit commands. If you type SHOW ALL,
  86. you will see a list of all the parameter settings.
  87.  
  88.  
  89. NOTE 1 - The .DATA file has the following defaults for the serial port:
  90.          Baudrate 300, Wordlength 8 bits, 1 stopbit, no parity.
  91.          An 80 column card is also assumed as the default.
  92.          If you want to change these parameters or any other parameters in
  93.          the .DATA file, then you can edit the corresponding .TEXT file
  94.          (7..10). After the change execute the program MAKEDATA to transform
  95.          the new .TEXT file to the file KERMIT.DATA.
  96. NOTE 2 - The Kermit program initializes the SSC or AP2 card completely 
  97.          according to the settings in the KERMIT.DATA file irrespective of
  98.          the dipswitch settings on the card. For the Apple Communication Card
  99.          ( and lookalikes ) the baud rate is only determined by the dipswitch
  100.          setting on the card irrespective of the setting in the file
  101.          APCOM.DATA ( for your own convenience make these settings equal ).
  102.  
  103. ------------------------------------------------------------------------
  104. SHORT INTRODUCTION TO KERMIT
  105. ------------------------------------------------------------------------
  106.  
  107. Kermit-UCSD belongs to a family of programs that do reliable file transfer
  108. between a microcomputer and a mainframe or between different microcomputers.
  109. Kermit-UCSD can also let the Apple II(e) behave as a terminal for a mainframe
  110. computer.
  111. In order to transfer files Kermit follows a certain protocol that the other
  112. side must understand. The host therefore must also have a Kermit program
  113. running in order to receive the Apple files.
  114. Files are sent as packages of printable Asci characters preceded by a <^A>
  115. and closed by a checksum. Non printable characters are converted to printable
  116. ones and preceded by a prefix character : e.g. CHR(13) ==> <#> <M>
  117. In this way Kermit avoids problems with control characters that are inter-
  118. preted differently by different hosts.
  119. If packets are not received correctly Kermit retries sending the packet a
  120. specified number of times before giving up the file transfer completely.
  121. File transfer with the Kermit protocol may be slower than other file transfer
  122. programs, but is very reliable!
  123.  
  124. --------------------------------
  125. KERMIT-UCSD AS TERMINAL PROGRAM
  126. --------------------------------
  127.  
  128. The terminal part of the Kermit-UCSD program can be used to communicate with
  129. a host computer.
  130. First make sure that the Apple serial port settings meet the requirements of
  131. the host. Then switch your modem on and make a connection with the host.
  132. After the prompt Kermit-UCSD> type CONNECT and press <return>.
  133. At the top of the screen you will see the following message:
  134.  
  135. >Kermterm connecting to host  (type <ESC> <C> to exit)
  136.  
  137. You have now started the Kermit-UCSD terminal program Kermterm : everything
  138. you type at the keyboard will be sent to the host. Therefore type now <return>
  139. in order to get a reaction from the host. This is a general principle : type
  140. <return> when you think that the host is not responding.
  141. The host will now send its messages to enable you to login. After that you 
  142. can start working on the host.
  143. If you type <ESC> while connected to the host you will get the following
  144. prompt from the Apple Kermit-UCSD:
  145.  
  146. >Kermterm (<?> <B> <C> <P> <Q> <S> <Z>) =>
  147.  
  148. You are now talking to the Kermterm program. Type <?> to see the list of
  149. options the Kermterm program offers:
  150.  
  151.  <B>  will send a break signal to the host.
  152.  <S>  will show a list of all current Kermit-UCSD parameter settings.
  153. <ESC> will send the <ESC> character itself to the host.
  154.  <P>  will turn on your printer to record the dialog with the host.
  155.  <Q>  will turn off your printer.
  156.  <Z>  will send <^A> <Z> to your Super Serial Card if you have one.
  157.            This prevents the SSC to interpret <^A> as a command to the SSC
  158.            card itself. You must do this, otherwise the <^A> preceding
  159.            the Kermit packets during file transfer will never get through
  160.            to the host and file transfer will not be possible. 
  161.  <C>  will return you back to the Apple Kermit-UCSD command level.
  162.            You will see "Back to the Apple Kermit UCSD" followed by the
  163.            prompt "Kermit-UCSD>" .
  164.            Remember that this does not logout the host!! You must logout
  165.            yourself while connected to the host. If you have not logged out
  166.            then you can return back to the host by typing CONNECT again.
  167.  
  168. After you typed one of the above options ( except <ESC> <C> ) you will see
  169. the message : "Back to host." and you are again connected to the host.
  170.  
  171. NOTE 1 - The <B> option will not be shown if the Apple Kermit program
  172.          does not know the acia type on your serial card.
  173. NOTE 2 - The <P> & <Q> options are not shown if you don't have a printer
  174.          interface card in slot 1.
  175. NOTE 3 - The printer option will only work with a Xon/Xoff protocol because
  176.          a printer is a very slow device. Either define the Xon/Xoff
  177.          characters at the Apple side ( SET XON-CHAR .... etc.) in accordance
  178.          with the host requirements or define at the host's side the Xon/Xoff
  179.          characters according to the Apple Kermit's settings.
  180. NOTE 4 - If host characters seem to be lost especially when the Apple screen
  181.          starts scrolling you can try to define at the host's side a 
  182.          "linefeed-fill count" of greater than 0. If that does not help then
  183.          you should login again at a lower baud rate.
  184.          ( An Apple with a IBS AP16 80 column card ( or Videx card?) connected
  185.            to a VAX will work at 1200 baud without a linefeedfill and at 4800
  186.            baud with a linefeedfill count of 5. )
  187. NOTE 5 - The Kermit-UCSD program has a 256 byte circular REMIN buffer :
  188.          If this buffer overflows you will hear a high pitched bell and the
  189.          contents of the buffer will be lost.
  190.          This situation could arise if the host is sending data while you are
  191.          not in CONNECT mode.
  192.  
  193. -------------------------------------
  194. KERMIT-UCSD AS FILE TRANSFER PROGRAM 
  195. -------------------------------------
  196.  
  197. The following is an example of a file-transfer dialog between the Apple and a
  198. VAX.
  199.  
  200. 1)  Start up the Apple Kermit. You will see the prompt "Kermit-UCSD>".
  201. 2)  Check the serial port settings and the file-transfer parameters by typing
  202.     "SHOW ALL". If these are not correct, change them with the "SET .." command.
  203. 3)  Establish a connection with the VAX by typing "CONNECT". (see above).
  204. 4)  After the Login procedure you will see the VAX/VMS prompt "$".
  205. 5)  Start Kermit at the VAX by typing "@KERMIT" or "KERMIT".
  206. 6)  You will now see the VAX Kermit prompt "KERMIT-VMS>".
  207. 7)  If you want to send a file to the VAX give now the command "RECEIVE" to the
  208.     VAX Kermit, followed by a <return>.
  209. 8)  Go back now quickly to the Apple Kermit-UCSD level by typing <ESC> <C>
  210. 9)  You will see again the prompt "Kermit-UCSD>".
  211. 10) Type now "SEND #5:APPLE.TEXT", followed by a <return>.
  212. 11) The screen display will change to give information about the ongoing
  213.     file transfer.
  214. 12) If the transfer is done you will hear a bell, followed by the message
  215.     "succesfull send" or "Unsuccesfull send" if something went wrong.
  216. 13) Go back now to the VAX by typing "CONNECT".
  217. 14) Type <return> and you will see again the prompt "KERMIT-VMS>".
  218. 15) If you want to send more files repeat step 7..14.
  219.     If you want to stop the session give the command "QUIT" to the VAX 
  220.     Kermit. You will see the VAX/VMS prompt "$" again.
  221.     You can now logout by typing "LOGOUT" and then go back to the Apple by
  222.     typing <ESC> <C>. If you type now "QUIT" after the prompt "Kermit-UCSD>"
  223.     you will return to the Apple UCSD-p-system command level.
  224.  
  225. If you want to receive files from the VAX use the following dialog :
  226.  
  227. 1..6)   Same as above.
  228. 7R)     Give the command "SEND [DIRECTORY]VAX.TXT", followed by a <return>.
  229. 8..9)   Same as above.
  230. 10R)    Type now "RECEIVE", followed by a <return>.
  231. 11..15) Same as above.
  232.  
  233. NOTES :
  234.  
  235. ad  8) - If you wait too long before giving a "SEND .." or "RECEIVE" command
  236.          to the Apple UCSD Kermit, the Kermit at the host's side may have
  237.          decided that the line is dead and may have aborted the transfer
  238.          protocol. In that case you should tell the host Kermit to wait longer
  239.          before starting the transfer protocol by giving a command like
  240.          "SET DELAY 20" or "SET MAXTRY 20" ( consult the host Kermit's HELP 
  241.          explanations ).
  242. ad 10) - This Apple UCSD Kermit does not (yet) allow for wild-card characters
  243.          in the name of the file to be sent : you can send only one file at
  244.          the time. The suffix .TEXT can be omitted for textfiles.
  245.          The name of the file to be sent should contain only alpha-numeric
  246.          characters : all other characters are automatically changed to "X"
  247.          by the Apple UCSD Kermit.
  248.          If the volumename is omitted then the file should be present on
  249.          the root or prefix disk.
  250. ad 7R) - The VAX Kermit does allow wild-card filenames after SEND :
  251.          "SEND [DIRECTORY]*.TXT" will send all .TXT files from the specified
  252.          directory to the Apple. The Apple UCSD Kermit will receive more than
  253.          one file correctly.
  254. ad 10R)- The received files will be stored on the disk indicated by the
  255.          "SHOW PREFIX" command. The prefix ":" means the root disk.
  256.          Filenames for received files are truncated to the leftmost 10 
  257.          characters and characters that are not allowed by the UCSD Filer are
  258.          substituted by "X". The suffix .TEXT is added for textfiles.
  259. ad 11) - The display shows the current packetnumber (modulo 64) , the
  260.          number of tries for each packet and the current filename.
  261.          If DEBUG is set to ON then more information is displayed :
  262.          The program state and the contents of the packets sent and received.
  263.          File transfer will be slower however.
  264.          If you want to break off manually the transfer protocol type <^E>.
  265.          The Apple Kermit will then send an error packet to the host and
  266.          both Kermits will abort the file-transfer.
  267. ad 12) - The Apple UCSD Kermit writes the received file(s) in 1024 byte
  268.          (textfiles) or 512 byte (data/code files) pages to the disk.
  269.          If an error occurs during file transfer ( e.g. disk full ), the
  270.          current file is saved including the last full page received.
  271. (*=== KERM.DOC2.TEXT ===*)
  272. >>>>>>>>>>>>>>> KERM.DOC2.TEXT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  273.  
  274.  
  275. ------------------------------------------------------------------------
  276. |                                                                      |
  277. |         DOCUMENTATION FOR APPLE UCSD KERMIT ( Run-time Files )       |
  278. |                       VERSION   RUG/PT  V1.0                         |
  279. |                                                                      |
  280. |                                                                      |
  281. |                       (20-dec-1985)                                  |
  282. |                                                                      |
  283. ------------------------------------------------------------------------
  284.  
  285.                         -----------------
  286.                              PART II
  287.                         -----------------
  288.  
  289. ------------------------------------------------------------------------
  290. OVERVIEW AND SYNTAXIS OF APPLE UCSD KERMIT RUG/PT V1.0 COMMANDS.
  291. ------------------------------------------------------------------------
  292.  
  293. COMMAND         SUBJECT         PARAMETER
  294. -------         -------         ---------
  295.  
  296. CONNECT            -                -
  297. EXIT               -                -
  298. QUIT               -                -
  299. RECEIVE            -                -
  300. (P)DIRECTORY       -            <volume number>
  301. SEND               -            <filename>
  302. SET             BAUD            <number>
  303.                 DEBUG           ON / OFF
  304.                 DELKEY          ON / OFF
  305.                 EMULATE         ON / OFF
  306.                 END-OF-LINE     <character>
  307.                 ESCAPE          <character>
  308.                 FILE-WARNING    ON / OFF
  309.                 IBM             ON / OFF
  310.                 LOCAL-ECHO      ON / OFF
  311.                 MAXPACK         <number>
  312.                 MAXTRY          <number>
  313.                 NOFEED          ON / OFF
  314.                 PARITY          NONE/ODD/EVEN/MARK/SPACE
  315.                 PREFIX          <volume name>
  316.                 REJECT          ON / OFF
  317.                 STOPBIT         <number>
  318.                 TEXTFILE        ON / OFF
  319.                 TIMEOUT         <number>
  320.                 WORD-LENGTH     <number>
  321.                 XOFF-CHAR       <character>
  322.                 XON-CHAR        <character>
  323.                 XOFF-WAIT-COUNT <number>
  324. (P)SHOW         <one of the above subjects>
  325. (P)SHOW         ALL                 -
  326. (P)HELP         SET                 -
  327. (P)HELP         SET             <subject>
  328. (P)HELP         <command>           -
  329. (P)HELP            -                -
  330.  
  331. -  For an explanation of the commands : startup Kermit and type HELP.
  332. -  PHELP, PSHOW and PDIRECTORY send their output to the printer (if present).
  333. -  Commands, subjects and parameters should be separated by at least one space
  334.    and terminated with a <return>.
  335. -  Words in the command line can be abbreviated to the shortest non-ambiguous
  336.    form.
  337. -  The maximum length of the command line is 80 characters.
  338. -  Control characters in the command line are echoed to the screen as
  339.    e.g. <^X>. <backspace> and <return> are not echoed. However the sequence
  340.    "SET END-OF-LINE<return>" will set the END-OF-LINE character to <^M>.
  341.    ( see also the section on special character handling ).
  342.  
  343. ----------------------------
  344. SPECIAL CHARACTER HANDLING
  345. ----------------------------
  346.    
  347. The Apple UCSD p-system knows two classes of control characters that
  348. are treated specially when typed in from the Apple keyboard:
  349.  
  350. Class I
  351. -------
  352.  
  353. <^S>    stops/starts scrolling of the Apple console (program is interrupted).
  354. <^F>    stops/starts output to the Apple console (program goes on).
  355. <^@>    program break (system will be reinitialized).
  356.  
  357. For the UCSD Kermit command line and during CONNECT these special characters
  358. are NOT checked. These characters can thus be part of the command line or
  359. can be sent to the host during CONNECT.
  360. In order to stop/start the output of the host to the Apple screen use the
  361. Xon/Xoff characters as defined for the host (e.g. <^S> and <^Q> ).
  362. During file transfer and on exit of the Kermit-UCSD program the normal action
  363. of these keys is reinstalled.
  364.  
  365. Class II
  366. --------
  367.  
  368. A) 40 column screen
  369.    ----------------
  370.    <^A> <^Z> <^K> <^W> <^E> are intercepted by the standard Apple UCSD
  371.    keyboard driver for special screen handling functions.
  372.    If you specify 40 in the last line of the KERMIT.DATA file then these
  373.    characters will keep their normal Apple UCSD function, but they can not
  374.    be sent to the host.
  375.    For the 40 column screen you should change the file-transfer interrupt
  376.    key in the KERMIT.DATA file from <^E> to something else.
  377.  
  378. B) 80 column screen
  379.    ----------------
  380.    If you specify 80 in the last line of the KERMIT.DATA file then the
  381.    <^A> <^Z> <^K> <^W> <^E> keys will lose their special function even if
  382.    you do not have an 80 column card.
  383.    If your system has an 80 column card then the Apple keyboard will not be
  384.    checked by the standard Apple UCSD keyboard driver but by a driver program
  385.    in ROM on your 80 column card. This driver may have its own special
  386.    character checking (like <^A> and <^K>). The UCSD Kermit program has no
  387.    influence on this.
  388.  
  389. To find out which key-codes cannot be sent to the host, test the keys
  390. after the prompt "Kermit-UCSD>" and see if they give an echo to the screen.
  391.  
  392.  
  393.  
  394. ----------------------------------------------------------
  395. FUNCTION OF SYSTEM.ATTACH, ATTACH.DRIVERS AND ATTACH.DATA.
  396. ----------------------------------------------------------
  397.  
  398.  
  399. General
  400. -------
  401.  
  402. The SYSTEM.ATTACH program should be present on the boot disk. It is auto-
  403. matically executed before SYSTEM.STARTUP. It modifies the BIOS of the Apple
  404. UCSD p-system to allow for user-defined device drivers. The user-defined
  405. driver program is in the library ATTACH.DRIVERS and is installed in memory
  406. below the p-system heap. The file ATTACH.DATA contains instructions for
  407. SYSTEM.ATTACH.
  408. For more information consult:
  409. V1.1 : The disk ATTACHUD (I.A.C. International Apple Core) with the document
  410.        "ATTACH-BIOS Document for Apple II Pascal 1.1. By Barry Haynes, Jan 12,
  411.         1980".
  412. V1.2 : Apple II Pascal Device Support Tools (Workbench Series) A2W0014
  413.        (Apple Computer Inc.)
  414.  
  415. NOTE:
  416.  
  417. The SYSTEM.ATTACH on this disk comes from the I.A.C. disk. The version bytes
  418. of this SYSTEM.ATTACH have been patched in order to make it work also with
  419. the Apple UCSD p-system V1.2.
  420.  
  421.  
  422. Function of the attached driver:
  423. --------------------------------
  424.  
  425. In the Apple UCSD p-system V1.1 and V1.2 the UCSD Pascal procedure UNITSTATUS
  426. is not implemented for the device REMIN: and REMOUT:. This means that one can
  427. not determine for REMIN whether there is a character at the serial input port,
  428. waiting to be read. The Pascal statement READ(remin, char) thus will wait in
  429. a closed loop until a character has arrived at the serial input port.
  430. In V1.2 this unacceptable situation has been partly resolved by the new
  431. procedure REMSTATUS in the unit APPLESTUFF. However REMSTATUS only works for
  432. an Apple Communication Card or a Firmware Card like the Super Serial Card.
  433.  
  434. The new serial card driver in ATTACH.DRIVERS does implement the procedure
  435. UNITSTATUS (see below) for a number of serial cards. In addition it has the
  436. following features :
  437. -  When first initialized (cold boot) it recognizes the serial card type in
  438.    slot 2 and binds into the system the appropiate UNITSTATUS and UNITREAD
  439.    routines. Then it jumps to the standard UCSD serial card initialization
  440.    routine to set the default serial port parameters.
  441. -  It installs a circular 256 byte serial input buffer. The serial input
  442.    port is checked for an incoming character every time the UCSD system 
  443.    performs an I/O operation and the character (if present) is stored in the
  444.    buffer. The UNITREAD or READ procedures then read only the buffer.
  445.    ( This is completely analogous to the implementation of the type-ahead
  446.      buffer for the keyboard driver. )
  447. -  If the circular REMIN buffer overflows then a high pitched bell is heard
  448.    and the current content of the buffer is lost.
  449. -  When reinitialized (warm boot or UNITCLEAR(7) ) the buffer is emptied,
  450.    but the serial parameter settings remain unchanged.
  451.  
  452.  
  453. How to use this SYSTEM.ATTACH for your own programs
  454. ---------------------------------------------------
  455.  
  456. The UNITSTATUS procedure is a standard UCSD p-system procedure like
  457. UNITWRITE, UNITREAD and UNITCLEAR and is meant for communication between
  458. a Pascal program and a device driver. It has the following form :
  459.  
  460. UNITSTATUS( Device_number, Data_record, Control_Word );
  461.  
  462. The following examples explain its use for this REMIN/REMOUT driver :
  463.  
  464.  
  465. Use the following declarations :
  466.  
  467. CONST        Remin_Device   = 7;  { or Remin_Device = 8; effect is the same }
  468.  
  469. TYPE         Cntrl_Word_Rec = PACKED RECORD
  470.                                Channel        : ( outp, inp );
  471.                                Purpose        : ( status, control );
  472.                                A_Reserved     :  0..2047;
  473.                                Special_Request: ( none, special_function );
  474.                                B_Reserved     :  0..3;
  475.                               END;
  476.  
  477.              A_Remin_Rec    = RECORD
  478.                                Addres  : INTEGER;
  479.                                Value   : INTEGER;
  480.                               END;
  481.  
  482.              B_Remin_Rec    = ( all_sp_char,
  483.                                 stop_flush_break_sp_char,
  484.                                 scr_40_sp_char,
  485.                                 no_sp_char,
  486.                                 mask_msbit_remin,
  487.                                 no_mask_msbit_remin );
  488.  
  489.              C_Remin_Rec    =  INTEGER;
  490.  
  491. VAR         Control_word    :  Cntrl_Word_Rec;
  492.             Memory          :  A_Remin_Rec;
  493.             System_Default  :  B_Remin_Rec;
  494.             Remin_Buf_count :  C_Remin_Rec;
  495.  
  496.  
  497. I)  Check the number of characters in the remin buffer.
  498.     ---------------------------------------------------
  499.  
  500.     WITH Control_Word DO
  501.      Channel := inp;     { or Channel := outp; same effect }
  502.      Purpose := status;
  503.      A_Reserved := 0;
  504.      Special_Request := none;
  505.      B_Reserved := 0;
  506.     END;
  507.  
  508.     UNITSTATUS( Remin_Device, Remin_Buf_count, Control_word );
  509.  
  510.     ----------
  511.  
  512.     The number of characters currently present in the remin buffer is now
  513.     returned in the variable Remin_Buf_count.
  514.  
  515.  
  516. II) Change a system default value.
  517.     ------------------------------
  518.  
  519.     WITH Control_Word DO
  520.      Channel := inp;     { or Channel := outp; same effect }
  521.      Purpose := control;
  522.      A_Reserved := 0;
  523.      Special_Request := none;
  524.      B_Reserved := 0;
  525.     END;
  526.  
  527.     System_Default := no_sp_char;
  528.     UNITSTATUS( Remin_Device, System_Default, Control_Word );
  529.  
  530.     -----------
  531.  
  532.     The meaning of the different system default values is:
  533.     ( see also the section on special character handling )
  534.     
  535.     all_sp_char             : Class I and Class II special characters will be
  536.                               checked by the keyboard driver.
  537.     stop_flush_break_sp_char: Only Class  I special characters will be checked.
  538.     scr_40_sp_char          : Only Class II special characters will be checked.
  539.     no_sp_char              : Class I and Class II special characters will not
  540.                               be checked.
  541.     mask_msbit_remin        : The most significant bit of the received 
  542.                               characters at the serial input port is set to 0.
  543.     no_mask_msbit_remin     : The most significant bit of the received 
  544.                               characters is left unchanged.
  545.  
  546.     The system startup default values are : all_sp_char and mask_msbit_remin.
  547.  
  548.  
  549. III) Get the value of a memory location ( PEEK ).
  550.      --------------------------------------------
  551.     
  552.     WITH Control_Word DO
  553.      Channel := inp;     { or Channel := outp; same effect }
  554.      Purpose := status;
  555.      A_Reserved := 0;
  556.      Special_Request := special_function;
  557.      B_Reserved := 0;
  558.     END;
  559.  
  560.     Memory.Addres := ........;
  561.     Memory.Value  := 0;    { initialize Value first : was declared as Integer }
  562.     UNITSTATUS( Remin_Device, Memory, Control_Word );
  563.  
  564.     ----------
  565.  
  566.     The value of the specified memory location is now returned in
  567.     Memory.Value.
  568.  
  569.  
  570. IV) Change the value of a memory location ( POKE ).
  571.     -----------------------------------------------
  572.     
  573.     WITH Control_Word DO
  574.      Channel := inp;     { or Channel := outp; same effect }
  575.      Purpose := control;
  576.      A_Reserved := 0;
  577.      Special_Request := special_function;
  578.      B_Reserved := 0;
  579.     END;
  580.  
  581.     Memory.Addres := ..........;
  582.     Memory.Value  := ..........;
  583.     UNITSTATUS( Remin_Device, Memory, Control_Word );
  584.  
  585.     ------------
  586.  
  587.     The specified value will now be stored at the specified address.
  588.  
  589.  
  590. The possibility to peek and poke with this UNITSTATUS routine can be used
  591. to address the control and command registers of the acia on the serial card
  592. directly.
  593.  
  594. NOTE:
  595.  
  596. For each function of this UNITSTATUS routine the controlword should be
  597. defined differently! If you do not specify the correct controlword strange
  598. things may happen, especially when you start to poke without being aware
  599. of it!
  600.  
  601. (*=== KERM.DOC3.TEXT ===*)
  602. >>>>>>>>>>>>>>> KERM.DOC3.TEXT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  603.  
  604.  
  605. ------------------------------------------------------------------------
  606. |                                                                      |
  607. |         DOCUMENTATION FOR APPLE UCSD KERMIT ( Source Files )         |
  608. |                       VERSION   RUG/PT  V1.0                         |
  609. |                                                                      |
  610. |                       P. Terpstra                                    |
  611. |                       Dept. Biochemistry                             |
  612. |                       University Groningen                           |
  613. |                       Nijenborgh 16                                  |
  614. |                       9747 AG  Groningen                             |
  615. |                       The Netherlands                                |
  616. |                                                                      |
  617. |                       (20-dec-1985)                                  |
  618. |                                                                      |
  619. ------------------------------------------------------------------------
  620.  
  621.                         -----------------
  622.                              PART III
  623.                         -----------------
  624.  
  625. The source text of the Apple UCSD Kermit program is obtainable on two
  626. disks from the above address.
  627.  
  628. This file explains how to compile the source text into a working Kermit
  629. program.
  630.  
  631. ----------------------------------
  632. CONTENTS OF THE SOURCE DISKS
  633. ----------------------------------
  634.  
  635. Disk KERTEX1:
  636. -------------
  637.  
  638. KERMIT.TEXT             The main Kermit program.
  639. KERMGLOB.TEXT           Intrinsic SYSTEM.LIBRARY Unit. Contains all globals.
  640. KERMACIA.TEXT               "           "         "
  641. KERMUTIL.TEXT               "           "         "
  642. KERMPACK.TEXT               "           "         "
  643. SENDER.TEXT                 "           "         "
  644. RECEIVER.TEXT               "           "         "
  645. PARSER.TEXT                 "           "         "
  646. KERMSETSHW.TEXT             "           "         "
  647. KERMINIT.TEXT               "           "         "
  648. HELPER.TEXT                 "           "         "
  649. ASM.KERMIT.TEXT         6502 Assembly procedures
  650.  
  651. Disk KERTEX2:
  652. -------------
  653.  
  654. KERMTERM.TEXT           The Kermit terminal procedure in 6502 assembly.
  655. REMDRIVER.TEXT          The REMIN/REMOUT driver for ATTACH.DRIVERS
  656. REMDR.DOC.TEXT          Introduction to REMDRIVER.TEXT.
  657. AP2.TEXT                Setup parameters for IBS AP2 card.
  658. APCOM.TEXT                "      "        "  Apple Communications Card
  659. SSC.TEXT                  "      "        "  Super Serial Card
  660. UNKNOWN.TEXT              "      "        "  unknown serial card
  661. MAKEDATA.TEXT           Program to transform setup parameter textfile into
  662.                         KERMIT.DATA file.
  663. ATTACH.UPD.TEXT         Program to update SYSTEM.ATTACH from the I.A.C.
  664.                         disk ATTACHUD to version 1.2 compatibility.
  665. KERM.DOC1.TEXT          Documents the run time disk KERMIT and gives an intro-
  666.                         duction to the program Kermit.
  667. KERM.DOC2.TEXT          Documents the Kermit commands and explains the
  668.                         SYSTEM.ATTACH and ATTACH.DRIVERS.
  669. KERM.DOC3.TEXT          You are reading it.
  670.  
  671.  
  672. --------------------------------------------------
  673. INTERRELATION OF THE INTRINSIC UNITS
  674. --------------------------------------------------
  675.  
  676. Unit    USES    KERMGLOB KERMUTIL KERMPACK KERMACIA  linked to ASM.KERMIT
  677. ----    ----    -------- -------- -------- --------  --------------------
  678.  
  679. KERMGLOB           -        -        -        -              -
  680. KERMACIA           +        -        -        -              +
  681. KERMUTIL           +        -        -        -              +
  682. KERMPACK           +        +        -        -              +
  683. SENDER             +        +        +        -              -
  684. RECEIVER           +        +        +        -              -
  685. PARSER             +        +        -        -              -
  686. KERMSETSHW         +        +        -        +              -
  687. KERMINIT           +        +        -        +              -
  688. HELPER             +        +        -        -              -
  689.  
  690. The main program KERMIT uses all of the above units and is linked to KERMTERM.
  691.  
  692. ---------------------------------------------------
  693. HOW TO COMPILE THE KERMIT PROGRAM
  694. ---------------------------------------------------
  695.  
  696.  1) - Assemble ASM.KERMIT.TEXT, KERMTERM.TEXT and REMDRIVER.TEXT
  697.  2) - Make an empty SYSTEM.LIBRARY on the boot disk using the system program
  698.       LIBRARY.
  699.  3) - Compile KERMGLOB.TEXT and transfer the .CODE file to the SYSTEM.LIBRARY.
  700.  4) - Compile KERMACIA.TEXT and KERMUTIL.TEXT. With the SYSTEM.LINKER link in
  701.       some procedures from ASM.KERMIT.CODE. Transfer the linked KERMACIA.CODE
  702.       and KERMUTIL.CODE to the SYSTEM.LIBRARY.
  703.  5) - Repeat step 4 for KERMPACK.TEXT.
  704.  6) - Compile now SENDER.TEXT, RECEIVER.TEXT, PARSER.TEXT, KERMSETSHW.TEXT,
  705.       KERMINIT.TEXT and HELPER.TEXT. Transfer the corresponding .CODE files
  706.       to the SYSTEM.LIBRARY. The SYSTEM.LIBRARY is now complete.
  707.  7) - Compile the main program KERMIT.TEXT and link in the procedure Kermterm
  708.       from the file KERMTERM.CODE.
  709.  8) - Compile the program MAKEDATA.TEXT and run it. This will produce the
  710.       file KERMIT.DATA suitable for your system. ( see also KERM.DOC1.TEXT ).
  711.  9) - Run the program LIBRARY. Choose the option New file and transfer 
  712.       REMDRIVER.CODE to slot 0. Give this library the name ATTACH.DRIVERS.
  713. 10) - You have now all the needed run time files except SYSTEM.ATTACH and
  714.       ATTACH.DATA. These two files are not supplied on the source disks, but
  715.       are present on the run time disk KERMIT. If you do not have the run time
  716.       disk then you should obtain the program ATTACHUD present on : 
  717.    A) The disk ATTACHUD (I.A.C. International Apple Core) with the document
  718.       "ATTACH-BIOS Document for Apple II Pascal 1.1. By Barry Haynes, Jan 12,
  719.        1980". For V1.1. ( and patched for V1.2 ).
  720.    B) "Apple II Pascal Device Support Tools" (Workbench Series) A2W0014
  721.        (Apple Computer Inc.). For V1.2
  722. These disks contain SYSTEM.ATTACH and the program ATTACHUD to produce
  723. the file ATTACH.DATA
  724.  
  725. ----------------------------------------------
  726. HOW TO MAKE THE FILE ATTACH.DATA
  727. ----------------------------------------------
  728.  
  729. With ATTACHUD from the I.A.C. disk
  730. ----------------------------------
  731.  
  732. 1) - Run ATTACHUD and answer the questions in the following way:
  733. 2) - Name of the attach data file? --> ATTACH.DATA
  734. 3) - Driver uses Hires page one?   --> N
  735. 4) - Driver uses Hires page two?   --> N
  736. 5) - Name of the driver?           --> REMDRIVER
  737. 6) - Driver refers to unit number? --> 1
  738. 7) - Initialize at boot time?      --> N
  739. 8) - Driver refers to another unit?--> Y
  740. 9) - Driver refers to unit number? --> 2
  741. 10)- Initialize at boot time?      --> N
  742. 11)- Driver refers to another unit?--> Y
  743. 12)- Driver refers to unit number? --> 7
  744. 13)- Initialize at boot time?      --> Y
  745. 14)- Driver refers to another unit?--> Y
  746. 15)- Driver refers to unit number? --> 8
  747. 16)- Initialize at boot time?      --> N
  748. 17)- Driver refers to another unit?--> N
  749. 18)- Align driver on byte boundary?--> N
  750. 19)- Attach another driver?        --> N
  751.  
  752. This will finally produce the ATTACH.DATA file.
  753. If you want to use the SYSTEM.ATTACH from this disk with V1.2 then
  754. compile the program ATTACH.UPD.TEXT on KERTEX2 and run it. This program
  755. will update the old SYSTEM.ATTACH.
  756.  
  757.  
  758. With the Apple II Pascal Device Support Tools disk.
  759. ---------------------------------------------------
  760.  
  761. 1)..18) same questions and answers as above.
  762. 19) -   Transient initialization section?  --> N
  763. 20) -   Driver uses interrupts?            --> N
  764. 21) -   Attach another driver?             --> N
  765.  
  766. This will produce the ATTACH.DATA file.
  767. The SYSTEM.ATTACH on this disk can NOT be used with V1.1.
  768. The ATTACH.DATA file produced here is not compatible with the old SYSTEM.ATTACH
  769. nor is the ATTACH.DATA file produced by the I.A.C. program compatible with
  770. the new SYSTEM.ATTACH!
  771.  
  772.  
  773. Once you have all the run time files you can make a self starting disk as
  774. explained in KERM.DOC1.TEXT.
  775.