Mail Archives: djgpp/1997/06/01/21:35:00
You really don't have to worry about protected mode as DJGPP handles it on
its own. The big thing is when you use interrupts, especially for VESA as
uses conventional memory to allocate it's tables. There are a few other
hardware things that an understanding of protected mode comes in handy.
But as said before, DJGPP handles the privileges quite well. Another thing
you will have to get used to is that there are no more segments, just
selectors. The selector can be (at least for me) thought of as a segment.
The _DOS_DS usually returns the selector in ES and you access video memory
(for example) this way in assembler:
mov es,_DOS_DS (I think)
mov edi,a00000
mov es:edi,1
That's roughly about what it entails anyways... the example above won't
compile correctly but will give the general idea. This is different from
the non-protected mode by:
mov ax,A000h
mov es,ax
xor edi,edi
mov [es:edi],1
That's the old way with real mode.
It's not that hard when you get into it. Other than that, it's the same as
programming in a real mode compiler. The above stuff is not necessary to
know right away, or in fact at all (I think). It really depends on what
you want to do with DJGPP.
Mike
--
E-Mail me at:
mwinsor AT hotmail DOT com or tape_worm AT geocities DOT com
Check out my game in development:
http://www.geocities.com/siliconvalley/park/2120
POULAIN Vincent <vpoulain AT club-internet DOT fr> wrote in article
<01bc6d5a$d98cd160$LocalHost AT vpoulain>...
>
>
> > Hello, I'm new to DJGPP and protected-mode programming, I was
> > wondering how do I use protected mode? Do programs made w/ DJGPP
> > automatically go into protected mode when they are run??
- Raw text -