no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:viogetphysbuf [2018/09/01 03:26] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This call gets addressability to the physical display buffer. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ; | ||
+ | ; | ||
+ | ; | ||
+ | ;selectors (SEL): Selector list. | ||
+ | :Returns the selectors (each of word-length) that address the physical display buffer. The first selector returned in the list, addresses the first 64KB of the physical display buffer or displaybuflen, | ||
+ | :The last selector returned in the list, addresses the remainder of the display buffer. The application is responsible for ensuring enough space is reserved for the selector list to accommodate the specified buffer length. | ||
+ | ;PhysBuf Block (PhysBuf): Address of the data structure. The PhysBuf Block is a variable length data structure. The first word is the Length of the PhysBuf Block in bytes. The remaining words of the structure are the selectors that address the physical video buffer. If Length is specified as 2, the required length of the PhysBuf Block is returned in its place. | ||
+ | ;PhysBuf Block (USHORT) : Length of PhysBuf structure in bytes | ||
+ | selector (SEL) | ||
+ | First selector | ||
+ | selector (SEL) | ||
+ | Next selector | ||
+ | selector (SEL) | ||
+ | ... ... | ||
+ | selector (SEL) | ||
+ | Last selector | ||
+ | ;Reserved (USHORT) - input : Reserved word of 0s. | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | * 0 NO_ERROR | ||
+ | * 350 ERROR_VIO_PTR | ||
+ | * 429 ERROR_VIO_IN_BG | ||
+ | * 430 ERROR_VIO_ILLEGAL_DURING_POPUP | ||
+ | * 436 ERROR_VIO_INVALID_HANDLE | ||
+ | * 465 ERROR_VIO_DETACHED | ||
+ | * 494 ERROR_VIO_EXTENDED_SG | ||
+ | |||
+ | ==Remarks== | ||
+ | If displaybuflen = 0, VioGetPhysBuf returns a selector that addresses the physical display buffer corresponding to the current mode. One selector is returned in Selector List. If a VioGetPhysBuf is issued after a VioGetBuf, then all VioWrtXX calls will on longer be written to the LVB. They will only be written to the physical display buffer. An application uses VioGetPhysBuf to get addressability to the physical display buffer. The selector returned by VioGetPhysBuf may be used only when an application program is executing in the foreground. When an application wants to access the physical display buffer, the application must call VioScrLock. VioScrLock either waits until the program is running in the foreground or returns a warning when the program is running in the background. For more information refer to VioScrLock and VioScrUnLock. | ||
+ | |||
+ | The buffer range specified for the physical screen buffer must fall between hex ' | ||
+ | |||
+ | ==Example Code== | ||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | typedef struct _VIOPHYSBUF { /* viopb */ | ||
+ | PBYTE pBuf; /* Buffer start address */ | ||
+ | ULONG cb; /* Buffer length */ | ||
+ | SEL asel[1]; | ||
+ | } VIOPHYSBUF; | ||
+ | |||
+ | #define INCL_VIO | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | PVIOPHYSBUF | ||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | VIOPHYSBUF struc | ||
+ | viopb_pBuf dd ? ;Buffer start address | ||
+ | viopb_cb | ||
+ | viopb_asel dw 1 dup (?) ;selector list | ||
+ | VIOPHYSBUF ends | ||
+ | |||
+ | EXTRN VioGetPhysBuf: | ||
+ | INCL_VIO | ||
+ | |||
+ | PUSH@ OTHER | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Note ====== | ||
+ | |||
+ | Text based on [[http:// | ||
+ | |||
+ | {{page> | ||
+ | |||