Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:docs:fapi:viogetphysbuf [2021/08/20 08:06] – prokushev | en:docs:fapi:viogetphysbuf [2021/09/19 02:17] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{page> | {{page> | ||
+ | |||
+ | ====== VioGetPhysBuf ====== | ||
This call gets addressability to the physical display buffer. | This call gets addressability to the physical display buffer. | ||
- | ==Syntax== | + | ===== Syntax |
- | | + | <code c> |
+ | VioGetPhysBuf (DisplayBuf, | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ;DisplayBuf(PVIOPHYSBUF) - input/ | + | |
- | ;displaybufaddr (PBYTE): Address of the 32 bit start address (selector: | + | |
- | ;displaybuflen (ULONG): 32 bit length of the physical display buffer. If displaybuflen is 0, then displaybufaddr is treated as the far address of the PhysBuf Block described below and the Selector List is not present. | + | |
- | ;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. | + | 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, |
- | ;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. | + | 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 (USHORT) : Length of PhysBuf structure in bytes | + | |
+ | | ||
selector (SEL) | selector (SEL) | ||
First selector | First selector | ||
Line 23: | Line 28: | ||
selector (SEL) | selector (SEL) | ||
Last selector | Last selector | ||
- | ;Reserved (USHORT) - input : Reserved word of 0s. | + | * Reserved (USHORT) - input : Reserved word of 0s. |
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return | ||
- | ==Return Code== | ||
- | rc (USHORT) - return | ||
Return code descriptions are: | 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== | + | * 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. | 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 ' | The buffer range specified for the physical screen buffer must fall between hex ' | ||
- | ==Example Code== | + | ===== Bindings ===== |
- | ===C Binding=== | + | |
- | <PRE> | + | ====C Binding==== |
+ | <code c> | ||
typedef struct _VIOPHYSBUF { /* viopb */ | typedef struct _VIOPHYSBUF { /* viopb */ | ||
PBYTE pBuf; /* Buffer start address */ | PBYTE pBuf; /* Buffer start address */ | ||
Line 58: | Line 68: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM Binding=== | + | ====MASM Binding==== |
- | <PRE> | + | <code asm> |
VIOPHYSBUF struc | VIOPHYSBUF struc | ||
viopb_pBuf dd ? ;Buffer start address | viopb_pBuf dd ? ;Buffer start address | ||
Line 76: | Line 86: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |