阅读上一个主题 :: 阅读下一个主题 |
作者 |
Underneath the Apple New World... |
 |
nunia [个人文集]
加入时间: 2005/11/04 文章: 2184
经验值: 5079
|
|
|
作者:nunia 在 罕见奇谈 发贴, 来自 http://www.hjclub.org
Forth language lives on every Apple.
An Open Firmware implementation is based on the Forth programming language, in particular, the FCode dialect. It is implemented in Forth and stored in the ROM as FCode bytecode.
You can enter Open Firmware by pressing the key combination cmd-opt-O-F jsut as you power on any Macintosh.
ok
0 >
0> dev /packages/telnet ok
" enet:telnet, 10.0.0.1" io
this would run a Telnet Server on the machine with IP address 10.0.0.1
Other Examples:
1. This command prints the device tree:
0> dev / ls
2. this gives you information about installed RAM:
0> dev /memory .properties ok
If you need to reduce the installed RAM size (as seen by Mac OS X) for any reason, without actually having to remove a RAM stick, you can actualy delete the reg entry using the delete-property command, and specify your own reg.
3. you can load a file (kernel) using the load command, and boot it using boot command. You can get and set variables (options) using the printenv and setenv commands. These variables are stored in the non-volatile memory (NVRAM) of Open Firmware. For example, if you want your email address to be used as the "OEM banner", you should do the following:
0> setenv oem-banner [email protected]
0> setenv oem-banner? true
To sum up, Open Firware is a powerful tool for controlling, debugging, and exploring the computer.
It is also the holy ghost that can blow life into droids. I have failed ibook with lost connection to internal hard drive but i can still use it with an iPod as its storage device and boot from CD-ROM...
so there, now you know FORTH is never going to go away as long as "I" who speak it live on...
作者:nunia 在 罕见奇谈 发贴, 来自 http://www.hjclub.org |
|
|
返回顶端 |
|
 |
|
|
|
您不能在本论坛发表新主题 您不能在本论坛回复主题 您不能在本论坛编辑自己的文章 您不能在本论坛删除自己的文章 您不能在本论坛发表投票 您不能在这个论坛添加附件 您不能在这个论坛下载文件
|
based on phpbb, All rights reserved.
|