From: "A.Appleyard" To: DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU Date: Mon, 30 Jan 1995 16:22:16 GMT Subject: Writing to screens etc In accordance with suggestions re how to write to the screens etc in Gnu C, I have looked at the file c:\djgpp\include\sys\farptr.h . The functions have these argument patterms:- #define uns insigned extern inline void _farpokeb( uns short selector, uns long offset, uns char value); extern inline void _farpokew( uns short selector, uns long offset, uns short value); extern inline void _farpokel( uns short selector, uns long offset, uns long value); extern inline uns char _farpeekb(uns short selector, uns long offset); extern inline uns short _farpeekw(uns short selector, uns long offset); extern inline uns long _farpeekl(uns short selector, uns long offset); extern inline void _farsetsel(uns short selector); extern inline void _farnspokeb(uns long offset, uns char value); extern inline void _farnspokew(uns long offset, uns short value); extern inline void _farnspokel(uns long offset, uns long value); extern inline uns char _farnspeekb(uns long offset); extern inline uns short _farnspeekw(uns long offset); extern inline uns long _farnspeekl(uns long offset); (1) Since the graphics screen is (in real mode) at 0xa0000000 etseq, can I write an 0x14 byte to graphics screen address 0xa0000017 in Gnu C thus:- ? _farsetsel(0xa000); _farnspokeb(0x0017,0x14); ? Or how? Can I get away with always setting the selector = 0 and putting the full address in the offset? (2) It seems that the text screen is sometimes at 0xb0000000, sometimes at 0xb8000000. How for each PC can a program tell which is which? Is it true that sometimes the address is different when writing to screen from when reading from screen? If so, what happens in e.g. `*x+=2;', where x points to a screen address?