home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!spool.mu.edu!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bs764
- From: bs764@cleveland.Freenet.Edu (Fred H Olson)
- Newsgroups: comp.lang.forth
- Subject: MSI-6000 and "exploded format source code"
- Date: 24 Jan 1993 21:43:20 GMT
- Organization: Case Western Reserve University, Cleveland, Ohio (USA)
- Lines: 82
- Message-ID: <1jv2hoINNoie@usenet.INS.CWRU.Edu>
- NNTP-Posting-Host: hela.ins.cwru.edu
-
-
- MSI-6000 and "exploded format source code"
-
- Sat 01-23-1993
- Fred H. Olson ( WB0YQM )
- 1221 Russell Av N
- Minneapolis, MN 55411
- (612) 588-9532
- (Internet: fred%jwh@vx.cis.umn.edu)
-
- In my preceeding message about the MSI-6000, the '(?)' after
- the mention of the Forth source file is related to it's
- unusual format which I would call "exploded". The 20 page
- listing starts with array and variable definitions. On page 2
- it starts the definition of M6000 which is apparently the top
- level word in the application.
-
- EXPLODED FORMAT
- When a word ( <new-word> ) that is not previously defined is
- used in <old-word>, the definition of <new-word> follows it's
- first use INSIDE THE DEFINITION OF <old-word> almost like a
- comment. The definition of <new-word> is preceded by a row of
- asterisks with a string:
- *******<new-word> routin for <old-word>*******************
- The definition of <new-word> is followed by:
- *******End <new-word> routin for <old-word>***************
- These asterisk delimited definitions can be nested. Is this
- some exotic source code listing produced from the actual
- source code?
-
- I note some inconsistencies in the asterisk embedded
- strings which suggest that they are maintained in an editor
- manually and suggesting this is not a machine generated
- format. Which suggests this *i*s the actual source code!
-
- Below is an example of this "exploded format" using F83 code
- for . ( dot) :
-
- First as F83 might have it:
-
- : EMIT PRINTING @ ?BRANCH 14 DUP (PRINT) (LIT) -1
- #OUT +! (CONSOLE) ;
- : HOLD (LIT) -1 HLD +! HLD @ C! ; ok
- : SIGN 0< ?BRANCH 8 (LIT) 45 HOLD ;
- : SPACE BL EMIT ;
- : TYPE 0 (?DO) 10 COUNT EMIT (LOOP) -6 DROP ;
- : (.) DUP ABS 0 <# #S ROT SIGN #> ;
- : . (.) TYPE SPACE ;
-
- Now in "exploded format" :
-
- : . (.)
- *******(.) routin for . **********************************
- : (.) DUP ABS 0 <# #S ROT SIGN
- *******SIGN routin for (.) *******************************
- : SIGN 0< ?BRANCH 8 (LIT) 45 HOLD
- *******HOLD routin for SIGN ******************************
- : HOLD (LIT) -1 HLD +! HLD @ C! ;
- *******End HOLD routin for SIGN **************************
- ;
- *******End SIGN routin for (.) ***************************
- #> ;
- *******End (.) routin for . ******************************
- TYPE
- *******TYPE routin for (.) *******************************
- : TYPE 0 (?DO) 10 COUNT EMIT
- *******EMIT routin for TYPE ******************************
- : EMIT PRINTING @ ?BRANCH 14 DUP (PRINT) (LIT) -1 #OUT +!
- *******End EMIT routin for TYPE **************************
- (LOOP) -6 DROP ;
- *******End (.) routin for . ******************************
- SPACE
- *******SPACE routin for . ********************************
- : SPACE BL EMIT ;
- *******End SPACE routin for . ****************************
-
- I am not overly confident that I have the exploded format
- exactly; frankly I find it mind boggling. But I swear I
- didn't make it up; that's how this listing is. Really.
-
- Fred
- --
-