home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
caway349.zip
/
MISC
/
LINEAR.ZIP
/
PAGING.DOC
< prev
next >
Wrap
Text File
|
1995-10-27
|
2KB
|
55 lines
Here is some code for creating a linear video buffer for svga cards.
The supplied files are :
Paging.doc : This file
Paging.c : C code.
Paging.h : function prototypes.
Excepts.asm : stack calling convention of code.
Exceptr.asm : register calling convention of code.
Test.c : Sample code.
The asm files uses WASM assembler.I don't know if it can be assembled by MASM
or TASM
For building the sample code, just type :
wcl386 /l=causeway /4r /Otexan test paging execptr.asm kbhitr.obj
or
wcl386 /l=causeway /4s /Otexan test paging execpts.asm kbhits.obj
(use the kbhit() patch)
The assembly files have three functions for configuring the video card :
VideoPrologue
VideoEpilogue
VideoBankSwitch
The VideoPrologue is called once when the buffer is created. It recommended
to allocate the buffer after graphic mode have been set.
The VideoEpilogue is called once when the buffer is destroyed.
The given code use the VESA bank switch system for 64 Kb granularity.
For other values, EAX reg (the bank number) can be modified on entry :
Granularity Eax
64k -
32k shl eax,1
16k shl eax,2
8k shl eax,3
4k shl eax,4
The code will be improved later...
The C functions are (prototyped into paging.h) :
void * GetLinearVideo(int VideoSize) VideoSize=size of videobuffer in MBytes.
void CloseLinearVideo(void);
J.P. (Sorry for the grammatical errors in english...)