双子座是什么象| 卵巢囊肿有什么危害| 做肠镜前一天可以吃什么| 什么的时间| 琴酒是什么酒| 跳绳有什么好处| 浑身没劲是什么原因| ssr是什么| 518是什么星座| 舌头有问题看什么科| 双币信用卡是什么意思| 为什么会得淋巴肿瘤| 炖猪蹄放什么调料| 夏天吹什么风| 金丝熊吃什么| 四维什么时候做最佳| 梦见老牛是什么意思| 梦见闹离婚是什么意思| 试纸什么时候用最准确| 为什么男人喜欢吃槟榔| 百日咳是什么引起的| 梦见山体滑坡是什么意思| cps是什么| 大腿青筋明显是什么原因| 孑然一身是什么意思| 什么人不能吃芒果| 坐月子能吃什么| 骑马野战指什么生肖| 流口水是什么病的前兆| 小孩耳鸣是什么原因引起的| 桃子像什么| 淋巴转移什么意思| 宫外孕有什么症状| 梦见捡钱了是什么预兆| 不自觉是什么意思| 发蜡是什么| 蛇与什么属相相克相冲| 精不液化是什么原因导致的| 刺史相当于现在什么官| 五七干校是什么意思| 孩子肚子有虫子有什么症状| 看见双彩虹有什么征兆| 梦见杀鸡是什么意思| 脸上长黑斑是什么原因引起的| 为什么会有生长纹| 慢性浅表性胃炎是什么意思| 煞北是什么意思| 上海有什么景点| 蚕丝衣服用什么洗最好| 未分类结晶偏高是什么意思| 喝雄黄酒是什么节日| 空腹不能吃什么水果| 宝宝吃什么奶粉好| 人流后什么叫重体力活| 父母有刑是什么意思| 窝沟封闭是什么意思| 工装裤搭配什么上衣| 什么是冰丝面料| 北京摇号什么时候开始的| slay是什么意思| 月经老提前是什么原因| 婀娜多姿是什么动物| 记忆力衰退吃什么药| 北京为什么这么热| 七情六欲指的是什么| 女人阴部黑是什么原因| 什么方法可以促进睡眠| 浩特是什么意思| 布洛芬起什么作用| 甲状腺结节是什么引起的| 惜字如金是什么意思| 什么的面目| 雷震子是什么神位| 对等是什么意思| 鼻窦在什么位置图片| 前列腺炎忌口什么食物| 大腿肿胀是什么原因| 男人为什么会出轨| 应收账款在贷方表示什么| 小螃蟹吃什么食物| 田七配什么煲汤最好| 积食发烧吃什么药| 肝功七项查的是什么| 什么是超声检查| 人外是什么意思| 急性腹泻拉水吃什么药| 女的肾虚是什么原因引起的| 掰手指头响有什么危害| 谝是什么意思| 霸天虎和威震天是什么关系| 什么地端详| 拉肚子吃什么药好得快| 推杯换盏什么意思| 低分化腺癌是什么意思| 晚上做梦梦到蛇是什么意思| 眼镜轴位是什么| hoho是什么意思| 甄别是什么意思| 膝盖酸疼是什么原因| 乳腺炎吃什么药好| 中午喜鹊叫有什么预兆| 拔牙什么时候拔最好| 藏在我回忆里的那个人什么歌| 塌陷是什么意思| 美工是做什么的| 月完念什么| 补气血吃什么水果| 聿五行属什么| 阴虱病是什么原因引起的| 兔唇是什么原因造成的| 尿颜色很黄是什么原因| 肚脐眼周围是什么器官| 大张伟原名叫什么| 提肛有什么好处| 溦是什么意思| 湿疹有什么特效药| 站桩对身体有什么好处和功效| 祸从口出什么意思| 高中生适合用什么手机| 错综复杂是什么意思| 什么生肖没有牙齿| 泓五行属什么| 掉头发吃什么| 三唑酮主治什么病害| 人绒毛膜促性腺激素是查什么的| 手臂长斑是什么原因| 肾阳虚吃什么药最好| 大包子什么馅好吃| 足底筋膜炎什么症状| 黯然泪下是什么意思| 神经元特异性烯醇化酶偏高是什么意思| 交警支队长是什么级别| 泸州老窖是什么香型| 腿有淤青是什么原因| 川芎治什么病最好| 处女什么意思| ifu是什么意思| 手术后为什么不让睡觉| 一件代发是什么意思| as医学上是什么意思| 相依相偎是什么意思| 干净的什么| 痞子是什么意思| 飞五行属什么| 怀孕后为什么会生化| 尿血什么原因| 爰是什么意思| 特斯拉是什么电池| 什么东西补钙最好最快| 牙齿为什么会掉| 心超是检查什么的| 心慌心悸吃什么药| cd8高是什么原因| 静脉曲张做什么检查| 大蒜吃多了有什么坏处| 黑指甲是什么症状图片| 香港电话前面加什么| 鱼为什么睁着眼睛睡觉| 叶子发黄缺什么肥| 叫姑姑是什么关系| 什么是脱敏治疗| 紫苏有什么功效| 梦见亲嘴是什么意思| 癫痫属于什么科| 锋芒毕露是什么意思| 平均分是什么意思| 不负卿是什么意思| 内急是什么意思| 心肌梗塞是什么原因引起的| 婴儿黄疸高有什么影响| 卡鱼刺去医院挂什么科| 示数是什么意思| 喉咙肿痛吃什么药| 骨质密度增高是什么意思| 阳历九月份是什么星座| 散光有什么症状| 大限将至什么意思| 用什么泡脚减肥最快| 什么是二代身份证| 搬家有什么讲究| 流年是什么意思| 心脏搭桥后最怕什么| 小孩反复发烧是什么原因| 药店为什么不让卖高锰酸钾| 胸口疼挂什么科室| 脖子变粗了是什么原因| 红薯什么时候成熟| 脚发胀是什么前兆| 好运连绵是什么意思| 跑步对身体有什么好处| 子宫肥大有什么危害| raf是什么意思| 左眼屈光不正是什么意思| 胆固醇高是什么原因引起的| 四个金念什么| 1987是什么年| 打胰岛素有什么副作用| 肌酐高什么东西不能吃| 月经总是提前是什么原因| 什么是不动产权证| 传度是什么意思| 缺钾会有什么症状| 律动是什么意思| 后脖子出汗多是什么原因| 九寨沟属于什么市| 梦见找孩子什么预兆| 糖类抗原199偏高是什么原因| 女性夜尿多是什么原因| 穷思竭虑什么意思| 柠檬水喝了有什么好处| 麻风病是什么病| 什么叫疱疹| 舌头烧灼感是什么原因| 实名认证是什么意思| 做梦梦到自己怀孕了是什么意思| 稀释是什么意思| 1945年是什么年| 最短的季节是什么| 空谷幽兰下一句是什么| 做糖耐前一天需要注意什么| 背部长痘痘是什么原因造成| 饧是什么意思| 额头上有痣代表什么| 为什么会打雷| 肿瘤前期有什么症状| 小心地什么| 夏天的诗句有什么| 宝宝老是摇头是什么原因| 11月1号是什么星座| 孕囊小是什么原因| 雌二醇低吃什么补得快| 游走是什么意思| 肛瘘是什么症状表现| 晚上九点多是什么时辰| 喉咙痛吃什么药好得最快| 早泄什么症状| 小孩便秘吃什么食物好| 女人吃芡实有什么好处| 黄水疮用什么药膏最快| 10月16是什么星座| 尿酸高多吃什么食物好| 有对什么| 子宫内膜炎用什么药效果好| 世界上最难写的字是什么字| 马来玉是什么玉| 平顶山为什么叫平顶山| 一厢情愿是什么意思| 学考成绩什么时候公布| 一月二十三号是什么星座| 什么银行卡最好用| 肠澼是什么意思| 予字五行属什么| 一度电是什么概念| 阔绰什么意思| 卤米松软膏主治什么| 眼睛散光和近视有什么区别| 老人嗜睡是什么征兆| dp是什么| 为什么广西女孩子好娶| 什么入什么口| 板带是什么| 42岁属什么| 暑假是什么时候放假| 做包子用什么面粉| 百度Jump to content

山西女篮再次晋级WCBA总决赛

From Wikipedia, the free encyclopedia
百度   这意味着,自驾游将更加通畅,不必再为路难走、难停车等问题烦恼。

The Macintosh Toolbox implements many of the high-level features of the Classic Mac OS, including a set of application programming interfaces for software development on the platform. The Toolbox consists of a number of "managers," software components such as QuickDraw, responsible for drawing onscreen graphics, and the Menu Manager, which maintain data structures describing the menu bar. As the original Macintosh was designed without virtual memory or memory protection, it was important to classify code according to when it should be loaded into memory or kept on disk, and how it should be accessed. The Toolbox consists of subroutines essential enough to be permanently kept in memory and accessible by a two-byte machine instruction; however it excludes core "kernel" functionality such as memory management and the file system. Note that the Toolbox does not draw the menu onscreen: menus were designed to have a customizable appearance, so the drawing code was stored in a resource, which could be on a disk.

Advent and implementation

[edit]

On 68k systems

[edit]

The original Motorola 68000 family implementation of the Macintosh operating system executes system calls using that processor's illegal opcode exception handling mechanism. Motorola specified that instructions beginning with 1111 and 1010 would never be used in future 68000 family processors, thus freeing them for use as such by an operating system. Further, they each had their own dedicated interrupt vector, separate from the generic illegal opcode handler. As 1111 was reserved for use by co-processors such as the 68881 FPU, Apple chose 1010 (A in hexadecimal) as the prefix for operating system calls. Handling illegal instructions is known as trapping, so these special instructions were called A-traps.[1] When the processor encounters such an instruction, it transfers control to the operating system, which looks up the appropriate task and performs it. There were two advantages to this mechanism:

  • It results in compact programs. Only two bytes are taken by every operating system access, in contrast to four or six when using regular jump instructions.
  • The table used to look up the appropriate function is stored in RAM. Then, even if the underlying code was stored in ROM, it could still be overridden (patched) by replacing the ROM memory address with a RAM address.

The system was further optimized by allotting some bits of the A-trap instruction to store parameters to the most common functions. For example, memory allocation is a very common task, so it should be expressed in as few bytes of code as possible. Sometimes the programmer wants to clear the memory block to zeros, so either the allocation function should take a boolean parameter, or there should be two allocation functions. To pass a parameter would require an additional two-byte instruction, which would be inefficient. Having two functions would require at least an extra four bytes of RAM used for the address in the function look-up table. The most efficient solution is to map multiple A-traps to the same subroutine, which then uses the A-trap as a parameter. This is true of the most commonly used subroutines. However, the Toolbox was composed of the less commonly used subroutines. The Toolbox was defined as the set of subroutines which took no parameters within the A-trap, and were indexed from a 1024-entry, 4-kilobyte dispatch table.[2] (Machines shipped with less than one megabyte of RAM use a single table of 512 entries, which corresponds to the 256-entry OS dispatch table of later ROM revisions.[3])

On PowerPC systems

[edit]

In 1994, Apple released Macintoshes using the PowerPC architecture, which lacked hardware support for the A-trap mechanism available on 68k systems. Because of their use in applying software patches, however, the dispatch tables were retained. The API library code underlying any Toolbox routine then does nothing except reference the dispatch table. The dispatch table linked only to emulated 68000 family code. Toolbox functions implemented in native PowerPC code have to first disable the emulator using the Mixed Mode Manager. For the sake of uniformity and extensibility, new function entries even continued to be added to the Toolbox after the PowerPC transition.

An alternative mechanism did exist, however, in the Code Fragment Manager, which was used to load and dynamically link native PowerPC programs. The PowerPC system call facility, analogous to the A-trap mechanism, was used to interface with the Mac OS nanokernel, which offered few services directly useful to applications.

Functionality

[edit]

Programming interfaces

[edit]

The Toolbox is composed of commonly used functions, but not the most commonly used functions. As a result, it grew into a hodgepodge of different API libraries.[3] The Toolbox encompasses most of the basic functionality which distinguished the Classic Mac OS. Apple's references “Inside Macintosh: Macintosh Toolbox Essentials” and “Inside Macintosh: More Macintosh Toolbox”, similarly vague in scope, also document most of the Toolbox.

Use in booting

[edit]

Because much of the Toolbox is implemented in ROM, alongside the computer's firmware, it was convenient to use as a bootloader environment. In conjunction with resources stored on the ROM chip, the Toolbox can turn the screen gray, show a dialog box with the signature "Welcome to Macintosh" greeting, and display the mouse cursor. By using Toolbox to help boot the machine, a rudimentary Mac-like environment can be initialized before ever loading the System suitcase from disk (in fact before ROMs on NuBus cards were executed), which is when the decision to use 24-bit or 32-bit addressing has to be made. (System 7's support for 32-bit addressing requires 32-bit clean ROMs, as older Mac ROMs do not have support for this). The need for diagnostics as in the BIOS resident for IBM PC compatibles' boards is not necessary since the Macintosh has most of its diagnostics in POST and automatically reports errors via the "Sad Mac" codes.

The similarity between the boot-up environment and the actual operating system should not be confused with being identical, however. Although the "Classic Mac OS" boot process is convoluted and largely undocumented, it is not more limited than an IBM PC compatible BIOS. Like a PC's master boot record, a ROM-based Mac reads and executes code from the first blocks ("boot blocks") of the disk partition selected as the boot device. The boot blocks then verify that a suitable rudimentary environment exists, and use it to load the System suitcase. A different operating system with a different file system can boot by simply using its own code in the boot blocks.[4] This system was not used for PowerPC Linux, however, because Open Firmware in New World ROM machines requires a bootloader within an HFS filesystem—a reason having nothing to do with the Toolbox or "old-fashioned" Macs in general. More narrowly, the Startup Disk control panel in the Classic Mac OS and later macOS only allows the user to select a mounted filesystem with very particular constraints.

Legacy

[edit]

In Mac OS X, the Toolbox is not used at all, though the Classic Environment loads the Toolbox ROM file into its virtual machine. Much of the Toolbox was restructured and implemented as part of Apple's Carbon programming API, allowing programmers familiar with the Toolbox to port their program code more easily to Mac OS X.

See also

[edit]

References

[edit]
  1. ^ Apple Inc. (6 July 1996). "A-Line Instructions". Archived from the original on 2025-08-07. Alt URL
  2. ^ Apple Inc. (6 July 1996). "About the Trap Manager". Archived from the original on 2025-08-07. Alt URL
  3. ^ a b Olson, James H. (4 September 1997). "Mac Alamanac II". Linux/m68k for Macintosh.
  4. ^ Apple Inc. (6 July 1996). "Boot Blocks". Archived from the original on 2025-08-07. Alt URL
[edit]
白头发吃什么可以改善 12月22号是什么星座 examine什么意思 三千年前是什么朝代 luky是什么意思
span是什么意思 两肺纹理增粗是什么意思 运钞车押运员是什么人 哪里是什么意思 我用什么才能留住你
瓜子脸适合剪什么发型 蝼蛄是什么动物 offer是什么 想一出是一出什么意思 尿结石是什么症状
爸爸的爸爸叫什么儿歌 杭州有什么好玩的地方 起义是什么意思 婴儿枕头里面装什么好 养病是什么意思
用盐袋子热敷小肚子有什么功效hcv7jop5ns0r.cn 高丽棒子是什么意思hcv8jop0ns3r.cn 慢阻肺是什么病hcv8jop1ns4r.cn 孕早期吃什么有利于胎心胎芽发育hcv7jop4ns5r.cn 什么食物热量低hcv7jop6ns1r.cn
女人脚浮肿是什么原因hcv9jop3ns5r.cn 水绿色是什么颜色hcv7jop6ns8r.cn 冲菜是什么菜hcv7jop6ns8r.cn 睾丸肿大是什么原因ff14chat.com 什么是亚麻籽hcv9jop0ns6r.cn
苏州有什么好玩的地方hcv9jop3ns7r.cn 关照是什么意思hcv8jop5ns2r.cn 鼻窦炎吃什么药jiuxinfghf.com 麦冬长什么样子图片hcv9jop5ns4r.cn 胰岛素偏高是什么意思hcv8jop9ns5r.cn
转述句什么意思creativexi.com 舌头黄是什么原因hcv9jop1ns1r.cn 手术后吃什么水果hcv9jop5ns2r.cn 1月22是什么星座hcv8jop3ns0r.cn 夜间尿多是什么原因aiwuzhiyu.com
百度