Subject: Re: Open Firmware 3 Boot, revisited
To: Chris Tribo <>
From: Dan LaBell <>
List: port-macppc
Date: 02/28/2005 16:51:16
Generally, forth is postfix and either interprets tokens (sep. by 
whitespace) as numbers or address and places them on the stack, or as a 
'word' or function and runs it.  However, words can manipulate the line 
being read, taking over the parsing, that's why you need a space around 
", it's actually an operator like +, but it takes over parsing and 
reads until next " , makes that into a string , (allocates memory for 
it) and leaves address on the stack.  So " screen" output, is actually 
passing an address to output.

>>> setenv boot-command " screen" output boot

Setenv also parses the line, that's how it apparently provides 
"prefix/normal" interface.
Also, it means you can't just paste other forth stuff into it, because 
it won't work.
Mainly, because setenv isn't really 'normal' forth, also, neither is 
boot, for that matter.
To make matters more confusing, the trick only works in interpreted 
mode when there's an line being parsed in, in 'compiled mode' or inside 
a function, it won't.  I rediscovered this aspect of forth, when I was 
experimenting with an interactive boot menu,  since I factored my menu 
into other functions, I hit a snag as I couldn't just use straight 
forward boot commands I was used to.

At any rate, the CD just wants to set the output once, for 1 boot only, 
and doesn't mess w/ the nvram, setenv sets nvram. In fact, it should 
already be 'screen', but if it needs setting I think:
  setenv output-device screen
would work, you can check current setting with printenv.

What's the machine doing right now? Also, wasn't that for machines were 
OF defaulted to serial?  Machines where option-command-o-f would put 
the ok prompt on a serial line?.
Isn't this a mini?  I'm thinking you want you leave boot-command alone, 
and try boot-file.
And experiment maybe by wrapping the boot file: make a text file, boot 
and, at the bottom execute boot again with your parameters: something 
\ need comment first line
." boot1" cr
" screen" output
." boot2" cr
boot hd:,\ofwboot.xcf
Changing last line to match, what you need, sorry I deleted the email 
w/ the boot command. I don't know if you need to set output, but this 
way you can rip from other boot scripts,
it will parse the same way. Boot like boot hd:,\of.boot .

On Monday, February 28, 2005, at 12:09 PM, Chris Tribo wrote:

> I think " screen" output is for the CHRP snag key boot script on the 
> install CD. If you're using it in OF shouldn't it be "output screen"? 
> I don't have an OF 3.x machine that I can test that on at the moment.
> On Feb 28, 2005, at 9:25 AM, Donald Lee wrote:
>> At 12:16 PM +0100 2/28/05, Daniel Eggert wrote:
>>> On Feb 27, 2005, at 2:12 AM, Donald Lee wrote:
>>>>>>>>>> "Donald" == Donald Lee <> writes:
>>>>>    Donald> There was a problem a while back with Quicksilver
>>>>>    Donald> machines, where the problem turned out to be solved by
>>>>>    Donald> setting the OF output to the screen..... Same sort of
>>>>>    Donald> symptoms..... I don't remember details offhand...
>>>>> You mean
>> [snip]
>>> I guess what the message tries to say, is that I should
>>>    setenv boot-command " screen" output boot
>>> but that does not help. The screen still stays black (no sync) when 
>>> I have
>>>    setenv auto-boot? true
>>> Maybve it's something Mac mini-specific?
>>> /Daniel
>> I don't know.  I only tried it.  I don't pretend to understand it.
>> (well,  maybe a litt.e ;-> )
>> -dgl-