include vflatd.inc mov dl, VflatD_Create_Virtual_Frame_Buffer ; Function number mov dh, Flags ; Must be zero mov eax, FrameBufSize ; Size of frame buffer in bytes mov ebx, BankSize ; Size of bank, in bytes mov esi, BankLocation ; Location of bank push ds pop es lea di, BankSwitchProc ; Bank switch code movzx edi, di mov cx, BankSwitchProcLength ; Length of bank switch code call VFlatDApiProcAdr jc errorhandler mov VideoSelector, ax mov VideoAddress, edx
Registers a display driver's bank-switch function and retrieves a selector for a logical frame buffer. Uses Flags.
Flags
Options flags. Currently, no flags are defined; this parameter must be zero.
FrameBufSize
Size of frame buffer, in bytes.
BankSize
Size of bank, in bytes.
BankLocation
Location of bank, for example, A0000h.
BankSwitchProc
Address of display driver's bank switch procedure.
BankSwitchProcLength
Length of display driver's bank-switch procedure.
The bank-switch procedure must be written using 32-bit code and must be a maximum of 100 bytes in length. When the procedure is called, EAX will identify the new bank to be swapped into the physical frame buffer. The procedure must save all registers except EAX, EDX, and Flags, and it must not have a ret instruction (since the code is copied inline).