Sie sind auf Seite 1von 2

L Functions 87h and 89h of Interrupt 15h

- Function 87h switches the processor to protected mode, moves a block of data so that
extended memory is accessible, and resets the processor to real mode.
- Function 89h switches the pticessor to protected mode.

Function 87h - Move Block

This function moves a block of data in memory by switching the processor to protected mode,
moving the block, and resetting the processor back to real mode. By means of this function,
extended memory becomes accessible and data can be copied from standard memory to ex-
tended memory, and vice versa. The function moves the data in units of two bytes, or one word.
In addition to the descriptors for source and target segments, the BIOS builds up the required
four descriptors in the GDT. For this purpose the calling program has to reserve 48 bytes for a
GDT with the entries needed. The source and target descriptors which comprise the entries
segment limit (in bytes), base address and access rights (always equal to 93h) must be generated
by the calling program. These have to be written into the 48 byte table at offset 10h and 18h,
respectively. Note the differences between the 80286 and i386/i486/Pentium descriptors.

Register Call value Return value


AH 87h 1)
cx number of words to copy
51 GDT offset”
ES GDT segment2)
Carry error if -3 0

‘) OOh=move was successful. 01 h=RAM panty error


OZh=unexpected exception. 03h=error concerning address ltne A20
” GDT structure’

1288
Functions 87h and 89h of Interrupt 15h 1289

60266 Descriptor GDT i366/i486/Pentium Descriptor

Reserved

Access Rights (93h)

Base Address
AO-A23
of Target

Segment Limit
Lc-L15
of Target Target Address
Descriptor (Program)
I. ,__--
Source Address
Descriptor (Program)

’ Pointer to GDT Access Rights (93h)


(BIOS)

Base Address Base Address


Invalid Descriptor
(BIOS)

1 Function 89h - Switch to Protected Mode

This function switches the processor to protected mode and transfers the control to the code
segment to which the GDT points. For this purpose, the GDT has to be built up in real mode
by the calling program. The passed interrupt numbers for IRQO and IRQ8 are used to adjust the
interrupt offsets of the 8259A PICs. Note that the processors 80286 and i386/i486/Pentium
processors have different GDT formats. The function uses the entries in the GDT for initializing
the IDTR and the SS register.

Register Call value Return value


AH 89h *,
BH interrupt number for IRQO
BL Interrupt number for IRQ8
SI GDT offset
ES GDT segment
carry error If 0 0

*’ OOh=wtch was successful. processor now in protected mode


ffh=swltch was not successful. processor in real mode

Das könnte Ihnen auch gefallen