Int 15H [AT] [PS/2] Function 89H (137) Enter protected mode

Switches the CPU from real mode into protected mode.

Call with:

AH = 89H

BH = interrupt number for IRQ0, written to ICW2 of 8259 PIC #1

(must be evenly divisible by 8, determines IRQ0—IRQ7)

BL = interrupt number for IRQ8, written to ICW2 of 8259 PIC #2

(must be evenly divisible by 8, determines IRQ8—IRQ15)

ES:SI = segment:offset of Global Descriptor Table (GDT)

Returns:

If function successful (CPU is in protected mode)

Carry flag = clear

AH = 00H

CS = user-defined selector

DS = user-defined selector

ES = user-defined selector

SS = user-defined selector

If function unsuccessful (CPU is in real mode)

Carry flag = set

AH = FFH

Notes:

The Global Descriptor Table must contain eight descriptors set up as follows:

Offset Descriptor usage 00H dummy descriptor (initialized to 0) 08H Global Descriptor Table (GDT) 10H Interrupt Descriptor Table (IDT) 18H user's data segment (DS) 20H user's extra segment (ES) 28H user's stack segment (SS) 30H user's code segment (CS) 38H BIOS code segment

The user must initialize the first seven descriptors; the eighth is filled in by the ROM BIOS to provide addressability for its own execution. The calling program may modify and use the eighth descriptor for any purpose after return from this function call.

This function is not supported on the PS/2 Models 25 and 30.