Article View: rec.games.programmer
Article #2249Calling VESA from Watcom C 9.0
From: Paul Hsieh
Date: Fri, 10 Jun 1994 14:31
Date: Fri, 10 Jun 1994 14:31
28 lines
2745 bytes
2745 bytes
Hello out there. I realize that I'm about to be flamed for being such an advocate of WC and end up asking a question about it, however ... I have been trying to call my VESA driver from a WC 9.0 program. The DOS4GW version is 1.8 (which is pretty ancient, but it mostly works well for me). The scenario is pretty simply. I need to set AX=4F00, and ES:DI to my _far address (i.e., below the first meg) then call int 10 and watch ES:DI fill up with lotsa goodly info. In real mode this is not a problem (I wrote a little .com file which functions perfectly). To do this in WC, I first allocated some low memory using DPMI function 0x0400. I got back a segment and selector that I verified were reasonable values. Then to use it, I simply calculated the flat address equivalent (i.e., segment*0x10) in a variable I called "VIS". Then, before calling int 10 I set ES to (VIS & 0xF0000) >> 4 and DI to (VIS & 0xFFFF), AX=0x4F00. Upon return from the int 10, I got the required 0x004F. But the information in VIS was untouched. I verified this with 3 different VESA drivers, so I am pretty sure that the VESA drivers are not at fault. Does anyone know exactly what's going wrong? I might be mixing up the definition of selector and segment, but in most cases ES becomes 0, which I assume was translated to 0 either as a selector or a segment. Is version 1.8 of DOS4GW just too old or buggy? Have I pulled a major braino here? Any help on this problem would be greatly appreciated. Paul Hsieh
Technical Details
Message-ID:
<Cr6r0J.DDC@news.atitech.ca>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!uunet!uunet.ca!uunet.ca!hq!phsiehReferences:
<2t0sn7$m1r@harbinger.cc.monash.edu.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f6aa,e6b2b5751c2b9056 X-Google-Attributes: gid10f6aa,public X-Google-Thread: fe306,e6b2b5751c2b9056 X-Google-Attributes: gidfe306,public X-Google-Thread: 1103af,e6b2b5751c2b9056 X-Google-Attributes: gid1103af,public X-Google-Thread: 102983,e6b2b5751c2b9056 X-Google-Attributes: gid102983,public X-Google-Thread: f9382,e6b2b5751c2b9056 X-Google-Attributes: gidf9382,public X-Google-Thread: 102bfa,e6b2b5751c2b9056 X-Google-Attributes: gid102bfa,public X-Google-Thread: 10a997,e6b2b5751c2b9056 X-Google-Attributes: gid10a997,public X-Google-ArrivalTime: 1994-06-10 21:19:59 PST Newsgroups: rec.games.programmer,alt.uu.comp.os.linux.questions,aus.computers.linux,comp.os.linux,comp.os.linux.misc,alt.msdos.programmer,comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!uunet!uunet.ca!uunet.ca!hq!phsieh From: phsieh@atitech.ca (Paul Hsieh) Subject: Calling VESA from Watcom C 9.0 Message-ID: <Cr6r0J.DDC@news.atitech.ca> Sender: news@news.atitech.ca Nntp-Posting-Host: 129.9.1.4 Organization: ATI Technologies Inc. References: <2t0sn7$m1r@harbinger.cc.monash.edu.au> Date: Fri, 10 Jun 1994 14:31:30 GMT Lines: 28