Date: Thu, 26 Jun 1997 14:27:10 -0700 (PDT) Message-Id: <199706262127.OAA25660@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: markoliv AT mercury DOT kosone DOT com From: Nate Eldredge Subject: Re: can you answer this Cc: djgpp AT delorie DOT com Precedence: bulk > Ok it's a great compiler but i don't know what's going on. First of all I >don't really understand protected mode programming. The first question is, >how do i change the video mode. I have always used inline assembler like >this > [deleted] >If i understand (and i don't think i do) , cwsdpmi will slam the machine >into real mode, perform the operation and exit. Could someone please >straighten me out on this? If you can point me to resources that would be >great but it would be alot better if you mailed me or >posted to this group. I suggest you have a look at the docs for the function __dpmi_int. This is the preferred way to simulate real-mode interrupts. > Ok, next question - how do i write to video memory [deleted] The preferred way to do _this_ is the so-called "farptr" functions. Look them up in the docs. Basically, what you do is use selector _dos_ds() and offset (0xA0000 (note- 4 "0"s) plus the offset into video memory). This is also mentioned in the FAQ. > Ok, one more question. I am sure everyone asks someone this question >sometime. I have an interrupt handler that drives the >keyboard. I am sure that this won't work the same way. Could someone please >tell me how to install an interrupt handler. Ok, to >drive the mouse, i just poll interrupt table 0x33 - will this work in the >same way? I am also pretty sure that my sound card can't be programmed in >the same way - i use midpak and digpak - but if anyone has any help on this >i would appreciate it. This, I believe, is covered in the FAQ as well. However, if you want to save yourself a *LOT* of work, take a look at the Allegro library by Shawn Hargreaves. It's at http://www.talula.demon.co.uk/ (the directory escapes me, but you should be able to find it from there). It's a game library containing very well-done facilities for graphics, keyboard, mouse, sound, timer, "and much much more". :) Hope this helps. Nate Eldredge eldredge AT ap DOT net