From: Adam Majer Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie GFX Date: Sat, 12 Aug 2000 23:53:18 -0500 Organization: Galactica Software Lines: 52 Sender: ummajera AT link764 DOT adsl2 DOT pangea DOT ca Message-ID: <399629BE.983ADB65@galacticasoftware.com> References: <01c004b9$f4bc0ec0$ac7297d4 AT grebo> NNTP-Posting-Host: link764.adsl2.pangea.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: canopus.cc.umanitoba.ca 966142400 11062 64.4.94.252 (13 Aug 2000 04:53:20 GMT) X-Complaints-To: Postmaster AT cc DOT umanitoba DOT ca NNTP-Posting-Date: 13 Aug 2000 04:53:20 GMT X-Mailer: Mozilla 4.73 [en] (Win95; U) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Here is a little hint that might just help: To set Mode 13h, just do #include void main() { __dpmi_regs r; r.x.ax = 0x13; __dpmi_int(0x10, &r); // access video memory here through _dos_ds and proper offset; int OffsetToBeginningOfVideoMemory = 0xA0000; _farpokeb(_dos_ds, OffsetToBeginningOfVideoMemory, 4); // puts char #4 at the top left corner getch(); // go back to mode 3 r.x.ax = 0x03; __dpmi_int(0x10, &r); } I think this will compile. _dos_ds is a selector to the beginning of dos memory. You need it to get to A000:0000 (or A0000 in linear memory). All real mode interrupts must be called with the __dpmi_int(..) function. Check onlike help at www.delorie.com/djgpp/docs/ for more info (or in RHIDE). The bad thing about DJGPP is that there are no far pts hence the need for the far functions. But it is still good. Hope some of this helps, Adam yidaki wrote: > Im trying to learn gfx programming in c++ but with no actual result... > I know streams arrays and all of the basic programming but when i see a gfx > tutorial i see all these strange words and calls ive never seen before. > theres several links to gfx tutorial but setting mode 13 doesnt work. > i take the example code and try to compile it with gpp but the compiler > complains about _ax* and such not being initiated. im no expert but i > believe thats a call to a lib i dont have or something like that. please > help me... > > Robin > > www.robinoberg.com