www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/23/21:29:34

Date: Fri, 23 Sep 94 17:01:02 -0400
From: dj AT stealth DOT ctron DOT com (DJ Delorie)
To: wraith AT csd DOT uwm DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: use of farptr.h

Here's the corrected example:

> #include <stdio.h>
> #include <go32.h>
> #include <sys/farptr.h>
> 
> void main ()
> {
>  char color = 0;
>  long loop = 0;
>  
>  asm ("mov $0x0013, %eax");
>  asm ("int $0x10");
>
>  _farsetsel(__go32_conventional_mem_selector());
>  for ( color = 0; color <=255 ; color++) 
>   for ( loop = 0; loop <= 65535 ; loop++ )
>     _farnspokeb ( 0xa0000 + loop, color );
> 
>  while (getchar() == '\0');
> 
>  asm ("mov $0x0003, %eax");
>  asm ("int $0x10");
>  return;
> }

Note that I haven't actually tried this yet.


- Raw text -


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