Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!sun!aeras!grinch!luis From: luis@grinch.UUCP (luis) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: Looking for C functions to access PC memory Message-ID: <261@grinch.grinch.UUCP> Date: Sat, 7-Nov-87 23:43:36 EST Article-I.D.: grinch.261 Posted: Sat Nov 7 23:43:36 1987 Date-Received: Wed, 11-Nov-87 02:39:49 EST References: <24261F3U@PSUVMB> <447@ucdavis.ucdavis.edu> Reply-To: luis@grinch.UUCP (Luis Chanu) Organization: Textural Software, San Jose, CA. Lines: 27 Keywords: Using pointer in C Xref: mnetor comp.sys.ibm.pc:9907 comp.lang.c:5338 In article <447@ucdavis.ucdavis.edu> kwok@iris.UUCP (Conrad Kwok) writes: >When you are using C, you don't need any special routine to read >memory. All you need to do is to declare a pointer (near or far >depending on the address) and then you may read or write to that >location using normal assignment statements. Here is an example to >read the value at location 0xC000:0x0100 > > char far *ptr; > > ptr = (char far *) 0xC0000100L; > printf("Value at 0xC000:0x0100 is %d\n", *ptr); > >[...] Thank you for posting the example, but I have a few questions... 1. Why is there an 'L' at the end of the address? (does it stand for Long?) 2. I have been trying to access the DTR on my modem, but I don't know what the base address is. From the Technical Reference, I know that the offset is 3FE (bit 0), but can't find the base addres.. Can anyone help? ------------------------------------------------------------------------------- Luis Chanu "Live every day as if it were your last, UUCP: ...ihnp4!sun!aeras!grinch!luis because one day you will be right." UUCP: ...pyramid!wjvax!grinch!luis -Benny Hill Disk-Claimer: That's not your disk, that's my disk. -------------------------------------------------------------------------------