www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/08/05:16:38

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Date: Wed, 8 Feb 1995 09:26:06 GMT
Subject: Re: using _farns*() (was: Re: Funny error in class)

I wrote:-
> (2) On entering the `enclosed function', before any _farns*() calls in that
> enclosed function, how do I make sure that the segment registers are
> correct for the _farns*() calls in that call of that enclosed function?
dj AT stealth DOT ctron DOT com (DJ Delorie) replied:-
> either don't use the _farns* functions, or use _farsetsel().
C:\DJGPP\INCLUDE\SYS\FARPTR.H says:-
> extern inline void _farsetsel(unsigned short selector) {
>   asm("movw %0,%%fs" : : "r" (selector)); }
If then I use _farns*() with _farsetsel() to look at and/or to write to:-
(1) the color text screen
(2) the monochrome text screen
(3) the graphic screen
(4) the lower end of the RAM (real addresses 0 to (say) 0x10000),
please what do I use as the argument of _farsetsel()
and what do I use as the `offset' argument of _farns*()?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019