Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ukma!psuvm.bitnet!bpm@psueclb.BITNET From: bpm@psueclb.BITNET Newsgroups: comp.lang.c Subject: Re: Absolute addressing in Turbo-C Message-ID: <792@PSUECLB> Date: Sat, 22-Aug-87 14:47:55 EDT Article-I.D.: PSUECLB.792 Posted: Sat Aug 22 14:47:55 1987 Date-Received: Wed, 26-Aug-87 00:37:17 EDT Organization: Engineering Computer Lab, Pennsylvania State University Lines: 22 >[I] am trying to rewrite my Turbo Pascal routines for communicating with >the PG-Adaptor in C, a language in which I have some programming >experience, but am no expert in. >I have to use absolute addressing, because of various buffers and variables >that both the PGA and I need to access. To illustrate, some of the original >Turbo Pascal declarations: > > VAR outBuffer : ARRAY [0..255] OF BYTE ABSOLUTE $C000:$6000; > outHead : BYTE ABSOLUTE $C000:$6300; > outTail : BYTE ABSOLUTE $C000:$6301; > To declare an absolute pointer in Turbo C, use the "far" adjective. For example, the equivalent to the above is: char far outBuffer[256] = 0xC0006000; char far *outHead = 0xC0006300; char far *outTail = 0xC0006301; --whiffle