Open Firmware is extremely cool. It's not just something to write boot loaders in, it's a real operating system. But more than that, it's just really, really neat.

First off, there's the nature of Forth, Open Firmware (from here on OF)'s language. Forth is a highly functional language. You generally write little simple functions, and build on them in higher-level (but still small) functions up to the top of the program.

The thing is, every function you define is actually compiled! So although it's stored as machine-independent ASCII Forth source or FCode, it's executed natively, very fast. And it's compact from the functionalism.

Next is the driver support. From OF, you can access your Mac's disk drives, flash its blinkenlights, control its graphics with some basic drawing commands, handle user input from the keyboard and mouse, and, if you're into lower-level stuff, fool with logical-to-physical memory mapping and turn a multiprocessing Mac's CPUs on and off (tho that last I haven't done yet). When I write an OS, it'll just keep OF alive in a process space and access the drivers every Mac has in firmware.

So how do you learn how to use this wonderful creature? There isn't much documentation out there. The best resource I've seen is Sun's documentation for OpenBoot, which is essentially the same thing. Google for the Sun OpenBoot AnswerBook. It's tedious to look through the big dictionary appendix, tho. If you want something more convenient, get the IEEE 1275 spec from Global Engineering Documents. That might be a little expensive for the hobbyist tho, and it comes in an unhandsomely unbound stack of white copier paper :v(.

Aside from that, look at the Forth built into your Mac by using the see and sifting commands. See (someword) gives you a pretty-printed disassembly, and sifting (string) gives you all the words containing a given string.

Just a few corrections to the above posts... an OF program, in FCode, resides on every Mac PCI card. Its main purpose is to allow a booting system to build a schematic of itself and its peripherals, and its peripherals' peripherals, which is saved in the Name Registry (in the case of the Mac OS). Bootloader stuff is kind of a secondary function that OF takes on because it's such a good general-purpose OS. Many of OF's more advanced features result from the demands of dealing with a filesystem on disk and interacting with the user.

Also, the standard is ANS Forth, not ANSI. Not to be anal.

OFPong runs as a file loaded into OF from a serial port (or, disk or network connection in the case of my OFPong 1.1). So your Mac can't really play Pong with no external storage connected. (Actually, it might be possible to load it into NVRAM, but AFAIK nobody's ever done it and it wouldn't improve the coolness factor that much.)

Finally, to reiterate the point made by everyone else here already - you can reset your Mac with cmd-opt-p-r if something goes wrong. You are very unlikely to make something go wrong, however, unless you fool with the nvset command (which you shouldn't). Using this key combo won't clear your preferences folder or anything - it mainly resets the clock, your default startup drive and startup screen.

So have fun OF-hacking. And sing the open firmware song as you do!