Date: Thu, 13 Sep 2001 16:37:11 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: dima 3141596 cc: djgpp AT delorie DOT com Subject: Re: addressing question In-Reply-To: <9nqdp9$22n2$1@pandora.alkar.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 13 Sep 2001, dima 3141596 wrote: > Ok, I have GDT with 3 valid entries: code segment, data segment and > data segment pointed to video RAM (0x0b8000). > Than I switch to PM and load CS <- entry 1, DS <- entry 2, ES <- > entry 3. > After it I want output any information to the screen: mov ES:[...], x > in assembler :). > How can I make it in the DJGPP ? The various ways of accessing the video memory from a DJGPP program are described and explained in the DJGPP FAQ, sections 10.2 and 18.4. > In the Turbo C I can do it : char far* scr = MK_FP(segment, > offset); > then any instruction like it: *scr = '1'; will generate asm code > mov ax,segment > mov es,ax > mov es:[offset] , '1' ------> here ES !!! This won't work in protected mode, even in Turbo C.