Mail Archives: djgpp/1995/02/01/01:05:12
> > _farsetsel(_go32_info_block.selector_for_linear_memory);
> > _farnspokeb(0xa0017,0x14);
>
> (1) Should `0xa0017' be `0x0017' or `0xa0000017'?
0xa0017 is correct. farnspokeb() takes a linear address which is 16*segment
register + offset.
> (2) Do I have to call farsetsel() once per program, or every time I write to
> the screen?
farsetsel() loads a selector into the fs register. Gcc doesn't ever use this
register, nor do the library routines, so in theory you can set it once and
forget it. In practice, it's probably safer to assume that you need to call
farsetsel() again after making any sort of system call. Comments in
sys/farptr.h say essentially this.
- Raw text -