Application Examples
Var
Regs: Registers;
Begin
with Regs do
Begin
{---------------------------------------------------}
{ Map a logical page at physical page 0.
}
{ Load pseudo-registers prior to invoking EMM.
}
{
AH = map page function
}
{
DX = handle
}
{
BX = logical page number
}
{
AL = physical page number
}
{---------------------------------------------------}
AH := Map_Pages;
DX := Handle;
BX := Logical_Page;
AL := Physical_Page;
Intr (EMM_INT, Regs);
{---------------------------------------------------}
{ Unload the pseudo-registers after invoking EMM.
}
{
AH = status
}
{---------------------------------------------------}
Map_Expanded_Memory_Pages := AH;
end; { with Regs do}
end; { Function Map_Expanded_Memory_Pages}
{-----------------------------------------------------------}
{ This function gets the physical address of the EMM page
}
{ frame we are using.
The address returned is the segment
}
{ of the page frame.
}
{-----------------------------------------------------------}
Function Get_Page_Frame_Base_Address
(Var Page_Frame_Address: Integer): Integer;
Var
Regs: Registers;
Begin
with Regs do
Begin
{---------------------------------------------------}
{ Get the page frame segment address from EMM.
}
{ Load pseudo-registers prior to invoking EMM.
}
{
AH = get page frame segment function
}
{---------------------------------------------------}
AH := Get_Page_Frame;
intr (EMM_INT,Regs);
{---------------------------------------------------}
{ Unload the pseudo-registers after invoking EMM.
}
{
BX = page frame segment address
}
{
AH = status
}
{---------------------------------------------------}
Page_Frame_Address := BX;
Get_Page_Frame_Base_Address := AH;
end; { with Regs do }
end; { Function Get_Page_Frame_Base_Address }
4-16
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com