[fpc-pascal]Reading the screen

Johann Glaser Johann.Glaser at gmx.at
Fri Sep 29 10:28:05 CEST 2000


Hi!

> >Begin
>  >Segment := $B800;
> > Offset  := 2*(Y*80 + X);
> >  DosMemGet(Segment,Offset,Ascii,1); 
> >  Inc(Offset);
> >  DosMemGet(Segment,Offset,Attribut,1);
> >End;
> 
> It's easier, but it works bad. I haven't test it in detail, but if I use
> it
> in my unit for text user interface, it doesn't work in all cases. As I
> tested
> the video RAM myself, it's not full linear sequence of bytes, but it has
> blocks
> of 8 characters (16 bytes). This code gets the bytes from linear address
> space.
> So some addresses are the same, but other addresses are different
> (You'll get
> another character !!).

Are you really sure? This shouldn't happen, because the character storage
is _only_ dependant on the graphics card. And this does it scince CGA this
way. If the Protected Mode Wrapper has unpredictable behavior, than you may
be right. Or the hardware (too fast bus access, caching, ...) is
unpredictable.

I used the video memory a lot when I was working on DOS a few years ago.
And it worked properly. But this was on smaller machines. In Protected Mode
it worked properly too. No characters were on the wrong place.

Bye
  Hansi

-- 
Sent through GMX FreeMail - http://www.gmx.net




More information about the fpc-pascal mailing list