[OpenBIOS] OF1275 Questions

Patrick Mauritz oxygene at studentenbude.ath.cx
Wed May 22 08:45:21 CEST 2002


On Tue, May 21, 2002 at 09:52:27PM -0700, John R. Hogerhuis wrote:
> DEFER
think of it as a forward declaration.

defer foobar 

creates a word foobar that displays a
message, sth like "tried execution of an uninitialized
defer word" which can be overwritten by

['] foobar ( the old name) to some-forth-word

if you run foobar after that, it does the same as
some-forth-word

cannot be used inside a colon definition

> INSTANCE
creates the next occurence of buffer, defer, value or
variable instance specific. that way it'll get reallocated 
each time an instance of that package is created

ex. from IEEE1275: ok 30 instance value new-name

> BUFFER:
creates a named buffer of a given size which returns the
address of the first byte on execution
ex. from IEEE1275:

100 buffer: new-name ( creates a buffer called new-name
                       which has 100 bytes)
55 new-name 20 + c!  ( writes 55 in new-name[20])


> I couldn't find these in the DPANS94 spec... anyone
> know what these are? I never did much with ANS Forth,
> so I am not sure why I can't find these words in the
> docs. Perhaps INSTANCE and BUFFER: are specific to OF?
OF uses a subset of ANS but extends it with own words - 
I think the same thing is achieved with different words
in ANS and OF at some places


hope I could help,
patrick mauritz
-- 
,------------------------------------------------------------------------.
>   In the Beginning there was nothing, which exploded - Yeah right...   <
`------------------------------------------------------------------------'
                      Drink wet cement. Get stoned.
-
To unsubscribe: send mail to majordomo at freiburg.linux.de
with 'unsubscribe openbios' in the body of the message
http://www.freiburg.linux.de/OpenBIOS/ - free your system..



More information about the openbios mailing list