From: "Mark Oliver" Subject: can you answer this Newsgroups: comp.os.msdos.djgpp Message-ID: <01bc7b5b$6836e640$b328bace@client.kosone.com> Date: 17 Jun 97 20:13:13 GMT Lines: 74 NNTP-Posting-Host: apollo.kosone.com Organization: Kingston Online Services To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I am afraid this will be a long post that will maybe test your knowledge and maybe make you laugh at me. Hi, i am Brian Oliver, sixteen years old and a game/demo programmer type. Two days ago I downloaded djgpp and rhide before that i was using Borland's Turbo C++ 3.0 since about Christmas 97 (i have only been programming for 10 months). Anway it produced sixteen bit slow code and didn't provide me with access to extended memory so I downloaded djgpp. Oh, by the way i use a 486 DX/66 with 32 megs of RAM and Windows 95. Ok, I have a few questions for you super djgpp users. 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 void set_vid_mode(unsigned char mode) { asm{ mov al, 0 mov ah,mode int 10h } } i don't think that's exactly it, but you get the idea - i can't remember offhand. Ok my problem isn't AT&T syntax(picked that up in a day) but I am not sure whether it will work because I am in protected mode. (that's how little i know about protected mode programming). 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. Ok, next question - how do i write to video memory - i would normally do it like this //set up a pointer unsigned char far *vga = (unsigned char far *)0xA0000000; then i would write to it *(vga + x + (y * 320)) = color; ok, from my pathetically tiny amount of knowledge i have gained in the past couple of days i would do this unsigned char *vga = (unsigned char *)0xA000; then i would write to it the same way i am pretty sure that that won't work so could you please tell me what i can do. Since most of the game stuff won't be altered by jumping to 32 bit protected mode, and this stuff will, could you please help me? 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. Ok, I thank you very much for bearing with me through this somewhat large post. I would appreciate it very much if you could help answer any of these questions or point me to someone or some resources that can. Can you please e-mail me or post to this group. And if you have any questions that you think i can answer mail me or post to this group. In general I try to answer all the questions on a newsgroup that I can correctly answer. Anway, I thank you in advance for any information. Brian Oliver e-mail me at markoliv AT mercury DOT kosone DOT com