From: "Stefan Viljoen" Newsgroups: comp.os.msdos.djgpp Subject: Re: calling a pointer Date: Mon, 9 Aug 1999 23:26:01 +0300 Organization: The South African Internet Exchange Lines: 32 Message-ID: <7onh9l$3ne$6@ctb-nnrp1.saix.net> References: <37ADD81B DOT 4840 AT iquest DOT net> NNTP-Posting-Host: pc36-01-p09.nt.saix.net X-Trace: ctb-nnrp1.saix.net 934234229 3822 155.239.194.9 (9 Aug 1999 21:30:29 GMT) X-Complaints-To: abuse AT saix DOT net NNTP-Posting-Date: 9 Aug 1999 21:30:29 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Mike Nansgar wrote in message news:37ADD81B DOT 4840 AT iquest DOT net... > I am writing VESA VBE 2.0 routines using a combination of DJGPP and > NASM. It seems as if my code (which calls the NEAR p-mode code) half > works; it does set the page because when I write to the video, it sets > the right pixels. But immediately after setting them it crashes with a > GPF at my 'rep stosd' instruction! The same 'rep stosd' works perfectly > when used with the set bank interrupt. Any help would be greatly > appreciated. Thanks in advance! I have encountered something similar when I was converting demo code from real mode TASM to protected mode DJGPP + NASM - the problem was that my rep stosd instructions worked perfectly, but as soon as I linked in Allegro into the converted program, it started cracking up with a GPF at the rep stosd just as your program is doing. If I remember right it had something to do with allegro changing the descriptor in DS (Shawn?) - I seem to remember fixing it by recording the DS selector in a variable, and switching this back before a rep stosd, and then replacing it again afterward. Some instructions that I dropped totally in the real / protected mode switch included some compound instructions that required implied registers that I could not use in protected mode like in real mode - I broke these up into simpler instructions, like a mov and an inc for something like stos... -- This message courtesy of RylanNet rylan AT intekom DOT co DOT za http://home.intekom.com/rylan/ -- StarWars for ever!.