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: Get XMS version code Date: 17 Nov 2005 03:17:47 -0800 Organization: http://groups.google.com Lines: 63 Message-ID: <1132226267.238205.60500@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: 61.66.169.71 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1132226272 16487 127.0.0.1 (17 Nov 2005 11:17:52 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Thu, 17 Nov 2005 11:17:52 +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: g14g2000cwa.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 hello, i modify a sample code from xms30 as below i will get a XMS API handle(XMSH[DWORD] declare in .cpp file) it will always fail when i run => call [_XMSH] <= i do not know how to modify this line. same code if define to 16 bits use( .com type) it can work well. but i can not combine the .com file with my djgpp project files. and i have another problem with segment registers i want to assign value to es register i use * mov ax, 1 -> mov es,ax (assign 1 to es) or mov ax, 1 -> push ax -> pop es both method will fail when the value assign to es please kindly to help me. thanks. [bits 32] [GLOBAL _GetXMSAddr__Fv] ;function for other .cpp call [EXTERN _printf] [EXTERN _XMSH] ;unsigned long, declare in another .cpp file msg db "No XMS",0ah,0 msg2 db "Get XMS",0ah,0 msg3 db "Get XMS Ver Fail",0ah,0 msg4 db "Get XMS Ver OK",0ah,0 [section .text] _GetXMSAddr__Fv: mov ax,4300h int 2fh cmp al,80h jne NoXMS jmp XMS NoXMS: push dword msg call _printf mov ax, 0 jmp END XMS: push dword msg2 call _printf mov ax,4310h int 2fh mov [_XMSH], bx mov [_XMSH+2], es mov ah,00h call [_XMSH] cmp ax,0300h jne NG jmp OK NG: push dword msg3 call _printf jmp END OK: push dword msg4 call _printf END: ret