home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!gatech!pitt!willett!ForthNet
- From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie)
- Newsgroups: comp.lang.forth
- Subject: Data types
- Message-ID: <4273.UUL1.3#5129@willett.pgh.pa.us>
- Date: 24 Jan 93 13:45:26 GMT
- Organization: EIEI-U
- Lines: 74
-
- Category 10, Topic 29
- Message 18 Sat Jan 23, 1993
- ELLIOTT.C at 14:35 EST
-
- -----via CRS Premium Bulletin Board -
- USR 16.8K Dual Standard (416) 629-7000
-
- Date: 01-18-93 (01:27)
- To: ALL
- From: MARCEL HENDRIX
- Subj: VALUES
-
- Re Re ``Changes in dpANS-3'' (Bernd Paysan):
-
- ...
- |> bp> 8. VALUE changed to take an initial argument from the stack
- |> bp> (like CONSTANT)
- ...
- |> the previous dpANS proposal was better
- |> with respect to ROMmability (IMHO). I suppose now we'll have to
- |> put in code ( a chain? ) to initialize all VALUE's when the
- |> system boots from ROM.
-
- bp> Hm, I don't see were the problem is.
-
- Well, take "3 VALUE foo". When target compiling, the "3" is
- stored in ROM. When the system ``boots'' from ROM, code will be
- needed to copy the value 3 in the RAM location occupied by foo at
- run-time. There will be no user code that does this explicitly,
- as the standard suggests that VALUE is somewhat like CONSTANT in
- this respect (this is what I fear, I hope to be wrong).
-
- bp> Every object in Unix, TOS or MS-DOS has (at least) three parts:
- bp> The TEXT (initialized, but unchanged at runtime) which could
- bp> stay in ROM, the DATA (initialized, but possibly modified at
- bp> runtime), which is copied to RAM at boot time and the BLOCK
- bp> STORAGE, (uninitialized or initialized to zero and modified
- bp> while running) which is only allocated and erased at boot time.
-
- Somehow, I do not think it is a solution to simply burn all RAM
- into ROM ( CREATE bar 128000 ALLOT ), although it has the kind of
- elegant simplicity Forth is famous for. I hope I'm
- misinterpreting your comment :-)
-
- bp> I prefer VARIABLES and CREATE structures to be initialized at
- bp> target compile time.
-
- I do not know how a commercial target compiler will handle
- "VARIABLE foo 3 foo !", but personally I would not expect (nor
- demand) it to (have) work(ed) when the system is booted and runs.
-
- In fact, it will not be very difficult to handle initialization
- of VALUE's -- doing the same with CREATE structures poses real
- problems. ( CREATE ape 33 , 0 , 8 ape 2 CELLS + ! ).
-
- bp> "Late answers are wrong answers!"
-
- Marcel Hendrix, | "an engineer is somebody who spends three
- Dutch Forth Workshop. | hours figuring out how to do a two hour
- | job in one hour."
-
-
- NET/Mail : FS FORTH Systeme BBS West Germany ++49 7667 556
- ---
- * The GrapeVine/Ferret Face BBS * NLR,ARK * 501-753-8121 DS *
- * PostLink(tm) v1.04 GRAPEVINE (#318) : RelayNet(tm) Hub
-
-
-
- -----
- This message came from GEnie via willett. You *cannot* reply to the author
- using e-mail. Please post a follow-up article, or use any instructions
- the author may have included (USMail addresses, telephone #, etc.).
- Report problems to: dwp@willett.pgh.pa.us
-