| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | "Rod Pemberton" <donthave AT noreply DOT bit> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Get XMS version code |
| Date: | Mon, 21 Nov 2005 00:09:58 -0500 |
| Organization: | Aioe.org NNTP Server |
| Lines: | 56 |
| Message-ID: | <dlrkqc$nr0$1@domitilla.aioe.org> |
| References: | <1132226267 DOT 238205 DOT 60500 AT g14g2000cwa DOT googlegroups DOT com> <dlja9c$jk$1 AT domitilla DOT aioe DOT org> <1132546146 DOT 464807 DOT 81190 AT g44g2000cwa DOT googlegroups DOT com> |
| NNTP-Posting-Host: | pCFjXAYAthfOLF6YhIh1ZA.758.domitilla.aioe.org |
| X-Complaints-To: | abuse AT aioe DOT org |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1441 |
| X-Priority: | 3 |
| X-Newsreader: | Microsoft Outlook Express 6.00.2800.1437 |
| X-MSMail-Priority: | Normal |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
<blk5743 AT yahoo DOT com DOT tw> wrote in message
news:1132546146 DOT 464807 DOT 81190 AT g44g2000cwa DOT googlegroups DOT com...
> Thanks for Rod Pemberton's reply
>
> i had tried for these 2 problem again.
>
> First problem: should i ingnore any segment value(es,ds...)
> when i use 32 bits compiler
>
> Second problem:
> i re-write my code again. but it still fail when i excute on
From your assembly, I think, the code I wrote (below) is what you want.
Or, at least, it is somewhat similar...
Rod Pemberton
#include <stdio.h>
#include <dpmi.h>
__dpmi_regs r;
int main(void)
{
r.x.ax = 0x4300;
__dpmi_int (0x2f, &r);
if(r.h.al!=0x80)
{ /* no XMS */
printf("1\n");
}
else
{ /* XMS */
printf("2\n");
r.x.ax = 0x4310;
__dpmi_int (0x2f, &r);
r.h.ah=0x00;
r.x.cs=r.x.es;
r.x.ip=r.x.bx;
__dpmi_simulate_real_mode_procedure_retf(&r);
// __dpmi_simulate_real_mode_procedure_iret(&r);
if (r.x.ax==0x0300)
{ /* OK */
printf("3\n");
}
else
{ /* NG */
printf("4\n");
}
}
return(0);
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |