GetOSDefaultYou can use the
GetOSDefaultprocedure to identify the operating system that gets booted on the Macintosh computer.
Procedure GetOSDefault (paramBlock: DefOSPtr);
- A pointer to a default operating system parameter block.
<-- sdReserved byte Reserved. <-- sdOSType byte Operating-system type.
GetOSDefaultprocedure identifies the operating system that gets booted on the Macintosh computer. A value of 1 returned in the
sdOSTypefield 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
GetOSDefaultand compare the value it returns with the value in the
ddTypefield 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
GetOSDefaultwith the value in one of the
ddTypefields. 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
ddTypevalue that matches the one returned by
ASSEMBLY LANGUAGE INFORMATIONThe registers on entry and exit for this routine are
Registers on entry A0 Address of the default operating system parameter block
Registers on exit A0 Address of the default operating system parameter block
SEE ALSOFor 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
SetOSDefaultprocedure described next.