[fpc-pascal]Reading the screen

Martin Hankovec Martin.Hankovec at oku-st.cz
Fri Sep 29 09:44:32 CEST 2000

I just tried the code:

 >Segment := $B800;
> Offset  := 2*(Y*80 + X);
>  DosMemGet(Segment,Offset,Ascii,1); 
>  Inc(Offset);
>  DosMemGet(Segment,Offset,Attribut,1);

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 !!).

Anybody tested this code and found it FULL working ? Maybe I'm wrong.



More information about the fpc-pascal mailing list