Mail Archives: djgpp/1999/10/17/12:39:48
From: | flobere AT club-internet DOT fr
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Memory in DJGPP
|
Date: | Sun, 17 Oct 1999 14:47:12 +0200
|
Organization: | Club-Internet (France)
|
Lines: | 41
|
Message-ID: | <3809C550.11378E61@club-internet.fr>
|
References: | <7ua3p5$nlt$1 AT news8 DOT svr DOT pol DOT co DOT uk>
|
NNTP-Posting-Host: | ppp-172-250.villette.club-internet.fr
|
Mime-Version: | 1.0
|
X-Trace: | front1m.grolier.fr 940164415 6933 195.36.172.250 (17 Oct 1999 12:46:55 GMT)
|
NNTP-Posting-Date: | 17 Oct 1999 12:46:55 GMT
|
X-Mailer: | Mozilla 4.6 [fr] (Win95; I)
|
X-Accept-Language: | fr
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
> okay, i was looking in the hlp on RHIDE for the memset, and other mem
> functions. Apparently some only allow int size moves and stuff? I thought
> you could move anything int he range of 32bits?
Take a look at the source of these functions, there are in the DJGPP
Dev Source package. You will have all the answer you need.
> Also, what does the __tb mean? i think it stands for a transfer buffer? but
> im nto sure what that actually means, or when to use such a thing. I
> noticed it being used in retreiving the VESA mode info. You are supposed to
> called a interupt and the data is sent to es:di and u should set a stuct to
> this.
You are right, __tb is a transfert buffer. Actually, it is a real mode transfert
buffer.
It is very useful when a real mode interuption need a buffer (ds:si or es:di) to
work
properly.
> why do they divide by 16?
Here is how to compute a protect mode adress, from a real mode segment/offset
one :
protect adress = real mode segment * 16 + real mode offset
that is why __tb is divided by 16.
For exemple, the 03h text mode adress is, in real mode B800h, in protect mode
it is B800h * 16 = B8000h.
> I know I have sent another mesaage about this but i didnt ask this int he
> same way: whne you have the physical address of the videobuffer, what can
> you do with it?
Once you have the physical address, you have to map it in a protected memory
area, using DPMI functions. __dpmi_map_physical_adress or something.
Then, you get a protect mode pointer to the memory area where your
Vram is mapped. You can read and write in it using the _far* functions.
(_farpokel, etc). Or if you want to transfer big blocs of memory, you can
use _dosmemput or _dosmemget. You cannot directly acces the vram.
Read the Rhide Libc Docs on the _far functions, to get more informations.
- Raw text -