home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / forth / 3983 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  3.5 KB

  1. Path: sparky!uunet!think.com!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bs764
  2. From: bs764@cleveland.Freenet.Edu (Fred H Olson)
  3. Newsgroups: comp.lang.forth
  4. Subject: MSI-6000 and "exploded format source code"
  5. Date: 24 Jan 1993 21:43:20 GMT
  6. Organization: Case Western Reserve University, Cleveland, Ohio (USA)
  7. Lines: 82
  8. Message-ID: <1jv2hoINNoie@usenet.INS.CWRU.Edu>
  9. NNTP-Posting-Host: hela.ins.cwru.edu
  10.  
  11.  
  12. MSI-6000 and "exploded format source code"
  13.  
  14.                                   Sat  01-23-1993
  15.                                   Fred H. Olson    ( WB0YQM )
  16.                                   1221 Russell Av N
  17.                                   Minneapolis, MN 55411
  18.                                   (612) 588-9532
  19.                                   (Internet: fred%jwh@vx.cis.umn.edu)
  20.  
  21. In my preceeding message about the MSI-6000, the '(?)' after
  22. the mention of the Forth source file is related to it's
  23. unusual format which I would call "exploded". The 20 page
  24. listing starts with array and variable definitions. On page 2
  25. it starts  the definition of M6000 which is apparently the top
  26. level word in the application.
  27.  
  28. EXPLODED FORMAT
  29. When a word ( <new-word> ) that is not previously defined is
  30. used in <old-word>, the definition of <new-word> follows it's
  31. first use INSIDE THE DEFINITION OF <old-word> almost like a
  32. comment. The definition of <new-word> is preceded by a row of
  33. asterisks with a string:
  34. *******<new-word> routin for <old-word>*******************
  35. The definition of <new-word> is followed by:
  36. *******End <new-word> routin for <old-word>***************
  37. These asterisk delimited definitions can be nested. Is this
  38. some exotic source code listing produced from the actual
  39. source code?
  40.  
  41. I note some inconsistencies in the asterisk embedded
  42. strings which suggest that they are maintained in an editor
  43. manually and suggesting this is not a machine generated
  44. format.  Which suggests this *i*s the actual source code!
  45.  
  46. Below is an example of this "exploded format" using F83 code
  47. for . ( dot) :
  48.  
  49. First as F83 might have it:
  50.                                                  
  51. : EMIT   PRINTING @ ?BRANCH 14 DUP (PRINT) (LIT) -1
  52.          #OUT +! (CONSOLE) ;
  53. : HOLD   (LIT) -1 HLD +! HLD @ C! ;  ok
  54. : SIGN   0< ?BRANCH 8 (LIT) 45 HOLD ; 
  55. : SPACE  BL EMIT ;
  56. : TYPE   0 (?DO) 10 COUNT EMIT (LOOP) -6 DROP ; 
  57. : (.)    DUP ABS 0 <# #S ROT SIGN #> ;
  58. : .      (.) TYPE SPACE ;
  59.  
  60. Now in "exploded format" :
  61.  
  62. : .   (.)
  63. *******(.) routin for . **********************************
  64. : (.)   DUP ABS 0 <# #S ROT SIGN
  65. *******SIGN routin for (.) *******************************
  66. : SIGN   0< ?BRANCH 8 (LIT) 45 HOLD
  67. *******HOLD routin for SIGN ******************************
  68. : HOLD   (LIT) -1 HLD +! HLD @ C! ;
  69. *******End HOLD routin for SIGN **************************
  70. *******End SIGN routin for (.) ***************************
  71. #> ; 
  72. *******End (.) routin for . ******************************
  73.       TYPE
  74. *******TYPE routin for (.) *******************************
  75. : TYPE   0 (?DO) 10 COUNT EMIT
  76. *******EMIT routin for TYPE ******************************
  77. : EMIT   PRINTING @ ?BRANCH 14 DUP (PRINT) (LIT) -1 #OUT +!
  78. *******End EMIT routin for TYPE **************************
  79.          (LOOP) -6 DROP ;
  80. *******End (.) routin for . ******************************
  81.       SPACE
  82. *******SPACE routin for . ********************************
  83. : SPACE   BL EMIT ;
  84. *******End SPACE routin for . ****************************
  85.  
  86.   I am not overly confident that I have the exploded format
  87. exactly; frankly I find it mind boggling.  But I swear I
  88. didn't make it up; that's how this listing is. Really.
  89.  
  90. Fred
  91. -- 
  92.