ADC Home > Reference Library > Technical Q&As > Legacy Documents > Hardware & Drivers >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

FCode & OS X

Q: Some Open Firmware methods available on older Macintosh computers seem to be missing on machines introduced in the later part of 2001. How can I continue to debug and produce FCode drivers without these methods?

A: While debugging use the Open Firmware Configuration Variable fcode-debug?.

fcode-debug? is a Boolean which when true means "turn on headers" and when false means the opposite. It has a default value of false. Here is how you turn on or off fcode-debug?.

Enter the Open Firmware user interface by starting the Macintosh computer while depressing the cmd-option-o-f keys. Enter the following to turn on headers:

setenv fcode-debug? true

When you are done turn off this variable as follows:

setenv fcode-debug? false

It is very important that you turn this variable off before shipping your code. Having this variable off (i.e. false) is the only way to test your FCode for use of hidden methods. Methods are only hidden when fcode-debug? is false.

Your production code can no longer use hidden methods since the user can easily turn off this flag by depressing cmd-option-p-r to reset NVRAM when starting the computer.

Also, it is now essential that all methods that you will be exporting be

labeled as EXTERNAL words. Consult the 1275 spec for more details.

[Jan 15 2002]

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.