Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 9 - Start Manager / Start Manager Reference
Routines / Identifying and Setting the Default Operating System


GetOSDefault

You can use the GetOSDefault procedure to identify the operating system that gets booted on the Macintosh computer.

Procedure GetOSDefault (paramBlock: DefOSPtr);
paramBlock
A pointer to a default operating system parameter block.
<--sdReservedbyteReserved.
<--sdOSTypebyteOperating-system type.

DESCRIPTION
The GetOSDefault procedure identifies the operating system that gets booted on the Macintosh computer. A value of 1 returned in the sdOSType field indicates the Macintosh Operating System. Apple Computer, Inc. reserves the numbers 0 through 15 for its use.

When the Macintosh Operating System boots, certain startup routines call GetOSDefault and compare the value it returns with the value in the ddType field of the driver's portion of the driver descriptor record. Each driver for the startup device has its own block of fields in this record. The startup routine tries to match the operating-system type returned by GetOSDefault with the value in one of the ddType fields. If it finds a match, the computer continues to boot; if it doesn't, the startup routine searches other drives attached to the computer. The boot process does not continue until the startup routine finds a ddType value that matches the one returned by GetOSDefault.

ASSEMBLY LANGUAGE INFORMATION
The registers on entry and exit for this routine are
Registers on entry
A0Address of the default operating system parameter block
Registers on exit
A0Address of the default operating system parameter block

SEE ALSO
For more information about the default operating system parameter block, see "The Default Operating System Parameter Block" beginning on page 9-19.

For information about the driver descriptor record, see the chapter "SCSI Manager" in Inside Macintosh: Devices.

To specify the default operating system, see the description of the SetOSDefault procedure described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996