From: Fullbeat Newsgroups: comp.os.msdos.djgpp Subject: [Fwd: VESA question in DJGPP] Date: Mon, 26 May 1997 12:18:51 +0200 Organization: Seven Deadly Sins Lines: 71 Message-ID: <3389638B.605AB0A@leonardo.math.unipd.it> NNTP-Posting-Host: stud33.math.unipd.it Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------67A9EFC65823A707537B6E48" To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk This is a multi-part message in MIME format. --------------67A9EFC65823A707537B6E48 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit -- paolo ______________________________ Paolo Milani University of Padova email: pmilani AT leonardo DOT math DOT unipd DOT it --------------67A9EFC65823A707537B6E48 Content-Type: message/news Content-Transfer-Encoding: 7bit Content-Disposition: inline Path: maya.dei.unipd.it!usenet From: Fullbeat Newsgroups: rec.games.programmer Subject: VESA question in DJGPP Date: Mon, 26 May 1997 11:43:52 +0200 Organization: Seven Deadly Sins Message-ID: <33895B58 DOT 6FD507E4 AT leonardo DOT math DOT unipd DOT it> NNTP-Posting-Host: stud33.math.unipd.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.25 i586) I am using DJGPP 2, and want to call VBE function 4f01h (Get Vesa Info) I declared a structure vesa_info_block following the VBE docs: I have the #pragma pack(1) directive for this, thus enabling me to hold the original struct size unaltered. This is for calling the real-mode interrupt that returns infos in this fashion. I call the real-mode interrupt 10h through __dpmi_int, passing a __dpmi_regs structure. Let's say I have this code: struct vesa_info_block buf; struct __dpmi_regs r; r.x.ax = 0x4f01; if (__dpmi_int(0x10,&r) == -1) return (ERROR); int rm_phys_buf = (r.x.es<<4) + r.x.di; dosmemget(rm_phys_buf,sizeof(vesa_info_block),&buf); At this point the 'buf' structure should contain all infos from the int 10h call. The problem is that only the first 2 fields look right, signature="VESA",version=0x0102 All other fields are screwed up (eg, total vidmem reported 4376k instead of 2048k) Is the problem that I am not passing the buffer address to the int.10h call? I would be very grateful to anyone finding out a solution for this. Also I shall want my code to be VBE 2.0 compliant (in protected mode). Thanx in advance. -- paolo ______________________________ Paolo Milani University of Padova email: pmilani AT leonardo DOT math DOT unipd DOT it --------------67A9EFC65823A707537B6E48--