Subject: Re: A NetBSD Boot Floppy to Load Open Firmware settings?
To: Tomas D <u0giene@yahoo.com>
From: Dan LaBell <dan4l-nospam@verizon.net>
List: port-macppc
Date: 04/03/2005 00:43:08
On Mar 24, 2005, at 2:41 AM, Tomas D wrote:

> Hi Dan,
> Hi Anthony,
> Hi All,
> --- Dan LaBell <dan4l-nospam@verizon.net> wrote:
>>
>> On Mar 22, 2005, at 12:07 PM, Anthony de Almeida
>> Lopes wrote:
>>
>>> Hi, I was wondering if anyone would like to
>> collaborate on creating a
>>> NetBSD boot floppy (probably a pair actually) for
>> the sole purpose of
>>> loading Open Firmware settings.
>>
>
> I have simmilar problem my "bios" battery died so if
> power home fails (which happens sometimes cause nobody
> cant be bothered to go and topup electricity, but
> that's another story) I have to set all input output
> devices load real and load base settings and then it
> boots up, I wonder if there's a way of doing that with
> floppy disk automatically, i gues not,

Well, if your machine can boot floppy, I don't have 1.
Can you boot floppy as easily as CD ?  Like hold F
instead of C.  If so, you could try putting the commands you need into 
a text file and try to boot that.  For forth/Open firmware to boot it
the file has to start with '\ '  its kind of like #! for shell scripts.
At this point you have something you could boot ( or again like shell 
source ) from open firmware via boot fd:,commands.txt or similiar.   I 
know
you can do that.   To get mac-boot to take it -- it's mac-boot that 
handles C to boot cd etc --, it might be as simple as changing the 
creator code (or is it filetype? ) to tbxi.

Can openfirmware handle multisession CD's?  Will it boot the first
or the most recent session?

>  if you guys
> gonna do something I'll be happy to test it and see if
> it works.
>  cheers tom
>
Well, if you or anyone else is feeling adventurous, I found what
looks like an openfirmware language bug with the word/command ?leave
for instance:
  20 0 do cr i . i 5 = ?leave loop  \ crashes
  20 0 do cr i . i 5 = if leave then loop \ works.

Should be equivalent,  wondering if its just my machine or what.  Gave 
me some grief working out it wasn't my code,  esp. since first form is 
recommended.  With indentation:
   20 0 do
           cr i .
           i 5 = ?leave
   loop

It should print out:
0
1
2
3
4
5
( leave is to forth-do-loop as to break is c-for-loop ).
I tested this in other forths f-pc on freedos, and bashforth, where it
works as it should, but for me it hard crashes 1/4 of the time
and loops 3 times then default-catch the rest.