🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
1 messages
1 total messages Started by Mike Fisher Fri, 17 Aug 1990 13:12
Re: Finding the MCGA in Quick C 2.01
#1911
Author: Mike Fisher
Date: Fri, 17 Aug 1990 13:12
27 lines
1281 bytes
In article <9042@uhccux.uhcc.Hawaii.Edu> julian@uhccux.uhcc.Hawaii.Edu (Julian Cowley) writes:

   So my question boils down to this: what is the cleanest way of
   accessing an absolute address such as 0xa0000 in Quick C?


I don't use Quick C, but I can tell you what works for me in Turbo C. 

PutPixel (int x, int y, unsigned char c)
{
  unsigned char huge *w;		/* huge seems to work better here */

  w = (unsigned char huge *)(0xA0000000L + (long)y * 320L + (long)x);

  *w = c;
}


Good luck...


--
-------------------------------------------------------------------------------
|  Real life:  There is no such thing...	       Mike Fisher	      |
|									      |
|  University of Florida CIS Dept.                     mlf@cis.ufl.edu        |
-------------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads