home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug028.arc / F83.DOC < prev    next >
Text File  |  1979-12-31  |  9KB  |  223 lines

  1.                                  F83.DOC
  2.  
  3. Listing 'F83     .DOC'
  4. 'F83     .DOC' Open 72 Sectors 6.0 Minutes
  5.  
  6.  
  7.                              WELCOME TO FORTH  
  8.  
  9. This    is  a  public  domain  system,   and  may  be   freely  distributed  
  10. and  copied,  as  long as the authors are given  credit and   no  copyright 
  11. notice  is  placed upon it.   If we catch  someone selling this  system  as 
  12. their  own proprietary product,  with  their copyright notice ,  we will do 
  13. our best to make them regret it for the rest of their lives.  You have been 
  14. warned!!
  15.  
  16.     These disks contain the following files:
  17.  
  18. EXTEND80.BLK
  19. CPU8080.BLK
  20. UTILITY.BLK
  21. META80.BLK
  22. DIRECT.BLK
  23. KERNEL.COM
  24. F83.COM
  25.  
  26. To regenerate the system,
  27. first copy everything to a large disk on (for example) drive B,
  28. then do the following:
  29.  
  30. B>F83 META80.BLK  ( run F83 on META80.BLK )
  31. OK   ( loads meta compiler and generates KERNEL.COM )
  32. BYE  ( return to CP/M )
  33. B>KERNEL EXTEND80.BLK  ( run KERNEL on EXTEND80.BLK )
  34. START  ( loads all extensions )
  35. BYE    ( return to CP/M )
  36. B>SAVE xx F83.COM  ( create new version of F83.COM )
  37.  
  38. You  can  have  a printout of these instructions by  using  Control  P  and 
  39. entering  TYPE FORTH.DOC
  40.  
  41. In   what   follows the <CR> symbol  represents  the  carriage return   key  
  42. on  your terminal.   To enter  Forth  from  the  CP/M environment,   insert  
  43. the  disk  containing  the F83.COM  file  into drive A  of  your  computer, 
  44. (after booting it of course) and  type 
  45. F83<CR>
  46.  
  47. Forth will reply with:
  48.  
  49. 8080 Forth 83 Model 1.0.0
  50. Modified 16Oct83
  51.  
  52.  
  53. Forth  is about ten years old now (1983) but some of the  features  of  F83 
  54. are relatively new to the Public Domain Forth Model.
  55.   
  56. The   VIEW  command is one of the best.  VIEW <word> <CR>  will  find   the 
  57. screen  that  contains the code for the <word>,   provided that  the   file 
  58. that contains <word> is on the  currently  logged disk  drive.   If you can 
  59. fit  all of the source code on  a  single drive,   VIEW  works  great,  and 
  60. takes care of opening the file  and displaying the screen for you.  èWe   have   also   tried  to make extensive use   of   the   shadow  screen  
  61. concept.   In  this regard,  the word A moves you  from  the current screen  
  62. to   it associated  shadow  screen.    The  SHADOW vocabulary  contains   a  
  63. bunch  of  words  that  are  helpful  in maintaining  shadow screens.  COPY 
  64. allows  you  to copy not only  a screen,  but also its  associated  shadow.  
  65. SHOW allows you to  list each source screen across from its shadow when you 
  66. want to  print them.   Finally CONVEY allows you to move groups of  screens  
  67. and  their   associated shadows.   To see what words are  in   the   SHADOW 
  68. vocabulary simply type SHADOW WORDS<CR>
  69.  
  70. There   is   also   a decompiler  present  which  reverses   the  compiling  
  71. process,  producing source code from object code.    The user  interface to 
  72. it  is  the word SEE <name> where <name> is  the name  of  a   Forth   word  
  73. you  wish  to  decompile.    While   the information  SEE  gives you is not 
  74. as complete as that  given  by VIEW,   a  least it is always available, and  
  75. not  dependent  upon whether  or  not  the correct file is present  on  the  
  76. currently logged in disk drive.  For a real experience try decompiling  the 
  77. words  STATUS,   which is a DEFERred word,   ie an execution  vector.   SEE  
  78. calls   itself recursively in this case and tracks  down   the  definition.  
  79. This can be quite handy.
  80.  
  81. To   see a list of the words that are in the dictionary  type WORDS.    You 
  82. will see lots of words.   Each is a command and  each can be VIEWed.  Let's 
  83. look  at the word SHOW by typing VIEW  SHOW.    Assuming  all is  well  you 
  84. will see a Forth screen containing  the definition  of SHOW along with some 
  85. other  words.  Type  A  L  (cr)  and  you will be rewarded with the  Shadow 
  86. screen that  goes  with it.    A  L  (cr)  will Alternate List you back  to  
  87. the   original  screen of code.   Look at it and when you see a  word  that  
  88. doesn't seem fully self evident,  VIEW it and read the shadow screen.   The 
  89. word   SHOW  and its source code that we have been viewing,   is  a command  
  90. that   prints out three source screens along  with  three shadows   for   a 
  91. total of six screens per  page.    There  are  two versions of SHOW.    The 
  92. vocabulary  you are in determines how SHOW will print out.   If you are  in 
  93. the SHADOW vocabulary, six screens of code and shadows will print.   If you 
  94. are in FORTH six screens of code will be printed.
  95.  
  96. Now   for  some more commands.     N is next screen and  L  is list.    N L  
  97. lists the next screen and  B L lists the next screen back.   N ED will edit 
  98. the  next screen etc.   Now lets printout  a few  screens that will  detail 
  99. some  of the editor  commands.   Most are from Starting Forth but some  are 
  100. new ones.  
  101.  
  102. Type this: EDITOR VIEW JOIN<CR>
  103.  
  104. You  are looking at a screen of editing commands.    Lets go to the  shadow  
  105. with  the   A L  command and do some exploring.    While  we are   in   the  
  106. shadows lets look at the next five  or  six  shadow screens  that should be 
  107. editor  words.    Use N L.    If you have  a printer  you may  print  these 
  108. screens now as follows.    Type  VIEW WIPE  for example.     If wipe is the 
  109. first  of  6 screens of editor words remember the screen  number.   If  for 
  110. instance it was 80 then 
  111.  
  112. type  80 85 SHADOW SHOW<CR> 
  113.  
  114. If  you  are new to Forth your best bet is to  purchase  the book  STARTING  
  115. FORTH by LEO BRODIE.   It costs  about  seventeen dollars  and is available 
  116. at most large book stores.   On page 84 you  will find the commands for the 
  117. line  editor.    The  F83   model follows both the book and  the  Forth  83 
  118. standard.
  119. èThe  Forth Interest Group ( FIG ) has chapters in many areas.  In  the  San 
  120. Francisco  Bay  Area,   meetings are held  on  the  4th Saturday   of  each 
  121. month,   currently at Chabot College in Hayward,  CA.   Call  the  FIG  hot 
  122. line  if  you wish to  double  check  the location ph 962-8653 or  the  FIG 
  123. Tree BBS (300 baud) at 538-3580.
  124.  
  125.  
  126. Henry Laxen                                  Mike Perry
  127. 1259 Cornell Avenue                          1125 Bancroft Way
  128. Berkeley, CA 94706                           Berkeley, CA 94702
  129.  
  130.  
  131.                              System Memory Map  
  132.  
  133. The  memory map will vary somewhat with CPU,   and  operating system,   and  
  134. options.  For CP/M on the 8080 with 64K of  memory, with four block buffers 
  135. and all utilities, it is as follows:
  136.  
  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.  
  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  the  
  174. difference   between  the  top  of  the  dictionary  and  the beginning  of 
  175. the  parameter  stack.   The  location  of  the   parameter  stack   varies 
  176. depending  on  the  amount  of memory  available  to   the  machine.    The 
  177. 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 can be 
  183. altered by remeta-compiling the system.
  184.  
  185. 5.   No   mass  storage block ranges are reserved  by  the   system,  other 
  186. than the contents of the files that are distributed.
  187.  
  188. 6.  The user has available to him blocks 0 thru 65534.  Note  that block  0  
  189. may   not  be  used for loading.   Block  number   65535   is  reserved  to 
  190. indicate the buffer is missing.
  191.  
  192. 7.  Any  ascii terminal should work with this system.   If the  user has  a  
  193. cursor  addressable terminal,  the editor  can  be  easily modified to take 
  194. 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.