Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!bellcore!wind!tr From: tr@wind.bellcore.com (tom reingold) Newsgroups: comp.sources.wanted,comp.lang.c,comp.sys.ibm.pc Subject: Re: C / IBM REQUIREMENTS...... Message-ID: <2195@bellcore.bellcore.com> Date: Wed, 26-Aug-87 17:00:27 EDT Article-I.D.: bellcore.2195 Posted: Wed Aug 26 17:00:27 1987 Date-Received: Fri, 28-Aug-87 06:36:14 EDT References: <6050@ut-ngp.UUCP> Sender: news@bellcore.bellcore.com Reply-To: tr@wind.UUCP (tom reingold) Organization: BellCoRe (Bell Communications Research) Lines: 34 Xref: mnetor comp.sources.wanted:2041 comp.lang.c:3934 comp.sys.ibm.pc:7156 In article <6050@ut-ngp.UUCP> marshek@ut-ngp.UUCP (The Genie) writes: $ $ Anybody out there have any stuff to do a peek & poke function in C ? $ (The peek & poke of BASIC). $ Further, do you have any idea where I can get a C code to do $ simple calculator functions (+,-,*,/,log) and the trigonometric $ functions on an IBM PC..... $ Thanx in advance. 1) Here is a sample function that uses a "poke" to the time of day counter in the PC. It is not guaranteed by Microsoft, as they recommend that we use DOS calls instead. I gather that the DOS corresponding to this accesses this memory address but that address may change one day. Enjoy. ------------------------------------------------------------ #define TICKADDR 0x46C long gettick(void) { long far* tick=MK_FP(0, TICKADDR); /* absolute pointer to tick * counter (18.2/sec) */ return(*tick); } ------------------------------------------------------------ 2) I don't have any calculator source code. Tom Reingold INTERNET: tr@bellcore.bellcore.com UUCP: {seismo,ihnp4,ucbvax,decvax}!bellcore!tr {ulysses,allegra,clyde,princeton}!bellcore!tr