Article View: comp.sys.ibm.pc
Article #42330POKE, PEEK, FAR POINTER
From: Fang Zhong
Date: Wed, 14 Feb 1990 06:15
Date: Wed, 14 Feb 1990 06:15
24 lines
1173 bytes
1173 bytes
I am relatively new to PC-AT and MS C. I am asking helps from the net.
We bought a frequency-timer-counter board for our AT. We need to
write to and read from several registers. Currently, I am using POKE and
PEEK functions from a GPIB board package. For a given address with segment
and offset, how do I use far pointer to write to and read from the address?
Will the far pointer macro be faster than POKE and PEEK?
Here is something I have tried and it did not work.
unsigned far *addr;
unsigned seg, offset, byte;
addr = NULL;
addr += seg*16 + offset;
*addr = byte;
printf("%u\n"), *addr);
Any helps are appreciated very much.
--
Fang Zhong 1-919-684-8247
Duke University Dept. of Physics fang@phy.duke.edu
Durham, N.C. 27706
Technical Details
Message-ID:
<848@dukempd.phy.duke.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!mephisto!mcnc!duke!dukempd!fangShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!mephisto!mcnc!duke!dukempd!fang From: fang@dukempd.phy.duke.edu (Fang Zhong) Newsgroups: comp.sys.ibm.pc Subject: POKE, PEEK, FAR POINTER Keywords: ON a AT with Microsoft C Message-ID: <848@dukempd.phy.duke.edu> Date: 14 Feb 90 06:15:27 GMT Organization: Duke University Physics Dept.; Durham, N.C. Lines: 24