home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol154 / f83.doc < prev    next >
Encoding:
Text File  |  1984-04-29  |  8.7 KB  |  223 lines

  1. .PO 3
  2.  
  3.     WELCOME TO FORTH  
  4.  
  5.      This   is  a  public  domain  system,  and  may  be   freely 
  6. distributed  and copied, as long as the authors are given  credit 
  7. and  no copyright notice is placed upon it.  If we catch  someone 
  8. selling this system as their own proprietary product, with  their 
  9. copyright notice , we will do our best to make them regret it for 
  10. the rest of their lives.  You have been warned!!
  11.  
  12.     These disks contain the following files:
  13. EXTEND80.BLK
  14. CPU8080.BLK
  15. UTILITY.BLK
  16. META80.BLK
  17. DIRECT.BLK
  18. KERNEL.COM
  19. F83.COM
  20.  
  21. To regenerate the system,
  22. first copy everything to a large disk on (for example) drive B,
  23. then do the following:
  24.  
  25. B>F83 META80.BLK  ( run F83 on META80.BLK )
  26. OK   ( loads meta compiler and generates KERNEL.COM )
  27. BYE  ( return to CP/M )
  28. B>KERNEL EXTEND80.BLK  ( run KERNEL on EXTEND80.BLK )
  29. START  ( loads all extensions )
  30. BYE    ( return to CP/M )
  31. B>SAVE xx F83.COM  ( create new version of F83.COM )
  32.  
  33. You can have a printout of these instructions by using Control P
  34. and entering  TYPE FORTH.DOC
  35.  
  36.      In  what  follows the <CR> symbol  represents  the  carriage 
  37. return  key  on  your terminal.  To enter  Forth  from  the  CP/M 
  38. environment,  insert  the disk containing the F83.COM  file  into 
  39. drive A of your computer, (after booting it of course) and  type 
  40. F83<CR>
  41.  
  42.      Forth will reply with:
  43.  
  44. 8080 Forth 83 Model 1.0.0
  45. Modified 16Oct83
  46.  
  47.  
  48. Forth is about ten years old now (1983) but some of the  features 
  49. of F83 are relatively new to the Public Domain Forth Model.
  50.   
  51.      The  VIEW command is one of the best. VIEW <word> <CR>  will 
  52. find  the screen that contains the code for the <word>,  provided 
  53. that  the  file that contains <word> is on the  currently  logged 
  54. disk  drive.  If you can fit all of the source code on  a  single 
  55. drive,  VIEW works great, and takes care of opening the file  and 
  56. displaying the screen for you.  
  57.  
  58.      We  have  also  tried to make extensive use  of  the  shadow 
  59. screen  concept.  In this regard, the word A moves you  from  the 
  60. current screen  to  it associated  shadow  screen.   The  SHADOW 
  61. vocabulary  contains  a  bunch  of  words  that  are  helpful  in 
  62. maintaining  shadow screens.  COPY allows you to copy not only  a 
  63. screen, but also its associated shadow.  SHOW allows you to  list 
  64. each source screen across from its shadow when you want to  print 
  65. them.   Finally CONVEY allows you to move groups of  screens  and 
  66. their  associated shadows.  To see what words are in  the  SHADOW 
  67. vocabulary simply type SHADOW WORDS<CR>
  68.  
  69.      There  is  also  a decompiler  present  which  reverses  the 
  70. compiling  process, producing source code from object code.   The 
  71. user  interface to it is the word SEE <name> where <name> is  the 
  72. name  of  a  Forth  word  you  wish  to  decompile.   While   the 
  73. information  SEE  gives you is not as complete as that  given  by 
  74. VIEW,  a  least it is always available, and  not  dependent  upon 
  75. whether  or  not  the correct file is present  on  the  currently 
  76. logged in disk drive.  For a real experience try decompiling  the 
  77. words STATUS,  which is a DEFERred word,  ie an execution vector.  
  78. SEE  calls  itself recursively in this case and tracks  down  the 
  79. definition.  This can be quite handy.
  80.  
  81.      To  see a list of the words that are in the dictionary  type 
  82. WORDS.   You will see lots of words.  Each is a command and  each 
  83. can be VIEWed.  Let's look at the word SHOW by typing VIEW  SHOW.   
  84. Assuming  all is well you will see a Forth screen containing  the 
  85. definition  of SHOW along with some other words. Type  A  L  (cr)  
  86. and  you will be rewarded with the Shadow screen that  goes  with 
  87. it.   A  L  (cr)  will Alternate List you back  to  the  original 
  88. screen of code.  Look at it and when you see a word that  doesn't 
  89. seem fully self evident, VIEW it and read the shadow screen.  The 
  90. word  SHOW  and its source code that we have been viewing,  is  a 
  91. command  that  prints out three source screens along  with  three 
  92. shadows  for  a total of six screens per  page.   There  are  two 
  93. versions of SHOW.   The vocabulary you are in determines how SHOW 
  94. will print out.  If you are in the SHADOW vocabulary, six screens 
  95. of code and shadows will print.   If you are in FORTH six screens 
  96. of code will be printed.
  97.  
  98.      Now  for  some more commands.    N is next screen and  L  is 
  99. list.   N L  lists the next screen and  B L lists the next screen 
  100. back.   N ED will edit the next screen etc.  Now lets printout  a 
  101. few  screens that will detail some of the editor  commands.  Most 
  102. are from Starting Forth but some are new ones.  
  103.  
  104. Type this: EDITOR VIEW JOIN<CR>
  105.  
  106. You are looking at a screen of editing commands.   Lets go to the 
  107. shadow  with the  A L  command and do some exploring.   While  we 
  108. are  in  the  shadows lets look at the next five  or  six  shadow 
  109. screens  that should be editor words.   Use N L.   If you have  a 
  110. printer  you may print these screens now as follows.   Type  VIEW 
  111. WIPE  for example.    If wipe is the first of 6 screens of editor 
  112. words remember the screen number.  If for instance it was 80 then 
  113. type  80 85 SHADOW SHOW<CR> 
  114.  
  115.      If  you  are new to Forth your best bet is to  purchase  the 
  116. book  STARTING  FORTH by LEO BRODIE.   It costs  about  seventeen 
  117. dollars  and is available at most large book stores.   On page 84 
  118. you  will find the commands for the line editor.   The F83  model 
  119. follows both the book and the Forth 83 standard.
  120.  
  121.      The Forth Interest Group ( FIG ) has chapters in many areas. 
  122. In  the  San Francisco Bay Area,  meetings are held  on  the  4th 
  123. Saturday  of each month,  currently at Chabot College in Hayward, 
  124. CA.   Call  the  FIG  hot line if you wish to  double  check  the 
  125. location ph 962-8653 or the FIG Tree BBS (300 baud) at 538-3580.
  126.  
  127.  
  128. Henry Laxen                                  Mike Perry
  129. 1259 Cornell Avenue                          1125 Bancroft Way
  130. Berkeley, CA 94706                           Berkeley, CA 94702
  131. .pa
  132.  
  133.              System Memory Map  
  134.      The  memory map will vary somewhat with CPU,  and  operating 
  135. system,  and  options.  For CP/M on the 8080 with 64K of  memory, 
  136. with four block buffers and all utilities, it is as follows:
  137.      ( all addresses in hexadecimal)
  138.  
  139.      0100      Jump to cold start
  140.      0104      Jump to warm start
  141.      0108 ----
  142.  
  143.                Dictionary with all utilities loaded.
  144.  
  145.      5E75 ---- HERE
  146.  
  147.                Free space.
  148.  
  149.      D10E ---- SP0, TIB
  150.  
  151.                | Text Input Buffer
  152.                V
  153.                             ^
  154.                Return Stack |
  155.  
  156.      D1D6 ---- RP0, >BUFFERS
  157.  
  158.                Block Buffer Pointer Table
  159.  
  160.      D200 ---- FIRST
  161.  
  162.                Block Buffers
  163.  
  164.      E200 ---- LIMIT
  165.  
  166.  
  167. .PA
  168.              Standard System Documentation Requirement
  169.  
  170. 1.  The  system  dictionary space is CPU  dependant  and  can  be 
  171. determined by typeing HERE U. <CR>
  172.  
  173. 2. The application dictionary space is also CPU dependant and  is 
  174. the  difference  between  the  top  of  the  dictionary  and  the 
  175. beginning of the parameter stack.  The location of the  parameter 
  176. stack  varies depending on the amount of memory available to  the 
  177. machine.   The application dictionary space can be determined  by 
  178. typing SP@ HERE - U. <CR>
  179.  
  180. 3. The data stack space is the same as the dictionary space.
  181.  
  182. 4.  The return stack space was arbitrarily set at 256 bytes.   It 
  183. can be altered by remeta-compiling the system.
  184.  
  185. 5.  No  mass  storage block ranges are reserved  by  the  system, 
  186. other than the contents of the files that are distributed.
  187.  
  188. 6. The user has available to him blocks 0 thru 65534.  Note  that 
  189. block  0  may  not be used for loading.  Block  number  65535  is 
  190. reserved to indicate the buffer is missing.
  191.  
  192. 7. Any ascii terminal should work with this system.  If the  user 
  193. has  a  cursor  addressable terminal, the editor  can  be  easily 
  194. modified to take advantage of the terminal's characteristics.
  195.  
  196. 8. System action taken upon error conditions:
  197.  
  198.      ' <name> ['] <name>  not found results in ? error message
  199.      
  200.      */ */MOD / /MOD MOD UM/MOD  all division by 0 errors  result      
  201.      in a 0 quotient
  202.  
  203.      : in the case of an error, a ? error message will be printed
  204.  
  205.      DO if a nesting error occurs, the system will crash. (if you 
  206.      are lucky)
  207.  
  208.      EXECUTE  if  addr is not a compilation address,  the  system 
  209.      will crash. see DO
  210.  
  211.      EXIT if the top of the return stack does not contain a valid 
  212.      return point, the system will crash.  see DO
  213.  
  214.      FORGET <name>  if <name> is not found, a ? error message  is 
  215.      printed.   If the compilation vocabulary is  forgotten,  the 
  216.      system will crash. see DO
  217.  
  218.      FORTH-83  if the error condition occurs,  that this is not a  
  219.      standard  system,  I don't want to hear about it and I  hope 
  220.      the system not only crashes, but burns.
  221.  
  222.      LOAD if u is zero, the system will crash.  see DO
  223.