delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | blk5743 AT yahoo DOT com DOT tw |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Get XMS version code |
Date: | 20 Nov 2005 20:09:06 -0800 |
Organization: | http://groups.google.com |
Lines: | 62 |
Message-ID: | <1132546146.464807.81190@g44g2000cwa.googlegroups.com> |
References: | <1132226267 DOT 238205 DOT 60500 AT g14g2000cwa DOT googlegroups DOT com> |
<dlja9c$jk$1 AT domitilla DOT aioe DOT org> | |
NNTP-Posting-Host: | 61.66.169.71 |
Mime-Version: | 1.0 |
X-Trace: | posting.google.com 1132546151 13512 127.0.0.1 (21 Nov 2005 04:09:11 GMT) |
X-Complaints-To: | groups-abuse AT google DOT com |
NNTP-Posting-Date: | Mon, 21 Nov 2005 04:09:11 +0000 (UTC) |
User-Agent: | G2/0.2 |
X-HTTP-UserAgent: | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe) |
X-HTTP-Via: | 1.0 SVRPROXY |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | g44g2000cwa.googlegroups.com; posting-host=61.66.169.71; |
posting-account=fl8v7w0AAAAQV4ThVU509YNPI8o0JeB3 | |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie 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 **** lcall (_XMSHnd) ****** how can i call the XMS function? it is my code again. unsigned long XMSHnd; #define DWORD unsigned long #define WORD unsigned short #define BYTE unsigned char struct _RMStruct{ DWORD EDI; DWORD ESI; DWORD EBP; DWORD Reserve; DWORD EBX; DWORD EDX; DWORD ECX; DWORD EAX; WORD flags; WORD ES; WORD DS; WORD FS; WORD GS; WORD IP; WORD CS; WORD SP; WORD SS; }RMStruct; int main(void) { RMStruct.EAX = 0x4310; wTemp1 = _my_ds(); lTemp1 = (DWORD)(&RMStruct); asm(" movl _lTemp1, %edi movw $0x0300, %ax movw $0x002f, %bx movw $0x0030, %cx int $0x31" ); printf("\r\n EAX = %lX",RMStruct.EAX); printf("\r\n EBX = %lX",RMStruct.EBX); printf("\r\n ES = %X",RMStruct.ES); XMSHnd = RMStruct.EBX + ((WORD)RMStruct.ES << 16); printf("\r\n XMSHnd = %lX",XMSHnd); asm(" movb $0x00, %ah lcall (_XMSHnd) movw %ax, _wTemp1 "); printf("\r\n Ver %04X",wTemp1); }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |