海纳百川

登录 | 登录并检查站内短信 | 个人设置 网站首页 |  论坛首页 |  博客 |  搜索 |  收藏夹 |  帮助 |  团队  | 注册  | RSS
主题: Underneath the Apple New World...
回复主题   printer-friendly view    海纳百川首页 -> 罕见奇谈
阅读上一个主题 :: 阅读下一个主题  
作者 Underneath the Apple New World...   
nunia
[个人文集]






加入时间: 2005/11/04
文章: 2184

经验值: 5079


文章标题: Underneath the Apple New World... (570 reads)      时间: 2006-7-16 周日, 下午7:29

作者: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
返回顶端
阅读会员资料 nunia离线  发送站内短信 浏览发表者的主页
显示文章:     
回复主题   printer-friendly view    海纳百川首页 -> 罕见奇谈 所有的时间均为 北京时间


 
论坛转跳:   
不能在本论坛发表新主题
不能在本论坛回复主题
不能在本论坛编辑自己的文章
不能在本论坛删除自己的文章
不能在本论坛发表投票
不能在这个论坛添加附件
不能在这个论坛下载文件


based on phpbb, All rights reserved.
[ Page generation time: 0.067218 seconds ] :: [ 23 queries excuted ] :: [ GZIP compression enabled ]