| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | kumarh AT gmail DOT com (Hemant Kumar) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | __tb troubles |
| Date: | 30 Sep 2004 23:28:35 -0700 |
| Organization: | http://groups.google.com |
| Lines: | 35 |
| Message-ID: | <878e8c25.0409302228.69fe8d24@posting.google.com> |
| NNTP-Posting-Host: | 209.213.198.25 |
| X-Trace: | posting.google.com 1096612116 1273 127.0.0.1 (1 Oct 2004 06:28:36 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Fri, 1 Oct 2004 06:28:36 +0000 (UTC) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Hi,
I am trying to read the system memory map using Interrupt 15h and
function E820h as follows. The problem is that __tb on returning gives
me garbage. I was initially using struct but switched to cars after
reading about packing issues.
Return value from the call indicates success. is this somthing I am
missing out herehat am I missing ?
__dpmi_regs regs;
char sMapEntry[20];
regs.d.ebx = dwHandle; //Previous handle returned by
interrupt
regs.d.eax = 0xE820;
regs.x.es = __tb >> 4; // just need 20 bytes so using transfer
buffer
regs.x.di = __tb >> 0x0f;
regs.d.ecx = 0x14; //20 bytes;
regs.d.edx = 0x534D4150; // Parameter of interrupt call - SMAP
signature
__dpmi_int(0x15, ®s); // Interrupt call
dosmemget (__tb, 20 , sMapEntry);
if (regs.d.eax != 0x534D4150) { // Check signature in EAX.
printf ("Memory Map not found !\n");
return;
}
dwHandle = regs.d.ebx;
Thanks,
Hemant
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |