Date: Mon, 21 Aug 1995 09:42:32 -0700 To: djgpp AT sun DOT soe DOT clarkson DOT edu From: taps AT cyberstore DOT ca (Tapio Vocadlo) Subject: Re: GPF when accessing video memory directly Thanks Mat and Eli, yes, I blatantly misunderstood the meaning of 'offset' and 'selector' in the _farpokeb() function. Maybe if the prototype could call the offset something else, it wouldn't be as confusing... I read part of the DPMI specs yesterday. From what I understand, one can't have 32-bit processing without running in protected mode, so there's no way (except for Mr. Walker's Fat DS hack) to have 32 bits and total machine access at the same time. Can't the 80386+ be switched into a simple 32-bit real mode, pretending it's a 68030..? What's the .byte that _farpokeb() and the other farptr functions insert before their remaining asm code? Some kind of processor instruction? Thanks. > > Tapio> #include > > Tapio> unsigned char gc=65; > > Tapio> _farpokeb(0xb800,0,gc); > > > Tapio> I'm obviously doing something wrong, since far mem i/o has > Tapio> to work, but what..? > >You aren't giving it a selector value for DOS memory. Selector values >are completely different from real-mode segment values. Instead, >you'd want something like: > >_farpokeb(_go32_conventional_mem_selector(), 0xb8000, gc); > >(also note that you need 0xb8000 instead of 0xb800; you're in 32-bit >mode now). > >-Mat >