To: "A.Appleyard" Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Re: using _farns*() (was: Re: Funny error in class) Date: Wed, 08 Feb 95 14:28:26 +0200 From: "Eli Zaretskii" > please what do I use as the argument of _farsetsel() > and what do I use as the `offset' argument of _farns*()? You should call _farsetsel(_go32_conventional_mem_selector()), then call _farns*() with the linear address of the memory location you want to peek/poke. The linear address is given by lin_addr = 16*segment + offset, where segment and offset are from the real-mode segment:offset pair of a far pointer. Confused? Here are some examples: > (1) the color text screen lin_addr = 0xb8000 + > (2) the monochrome text screen Likewise, but the base address is 0xb0000 > (4) the lower end of the RAM (real addresses 0 to (say) 0x10000), lin_addr = 0 to 0x10000 The case of graphics screen is explained in my FAQ, question 10.5.