Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!lll-lcc!ames!ucbcad!ucbvax!CS.UCLA.EDU!trainor From: trainor@CS.UCLA.EDU (Douglas J Trainor) Newsgroups: comp.sys.apple Subject: $$$ for IIgs info!!! Message-ID: <870716.111338z.06973.trainor@PEGASUS.CS.UCLA.EDU> Date: Thu, 16-Jul-87 07:13:38 EDT Article-I.D.: PEGASUS.870716.111338z.06973.trainor Posted: Thu Jul 16 07:13:38 1987 Date-Received: Sat, 18-Jul-87 11:38:11 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 39 I must resort to capitalism. I will send a crisp $10.00 bill to the first person providing me with a little assembly routine that reads the system clock from BASIC. Plus an insane bonus offer of $10.00 if your mail arrives on July 16th, totaling a possible 20 dollars!!! I am having problems getting this to work, and I don't have the adequate documentation. This is for UCLA educational purposes. The Mac and IIgs (?) have a ROM routine called TickCount which returns the number of ticks (1/60 of secs) since the machine was booted (32 bits). Anything like this is just fine, but not required. It can probably be done in many different ways. All I want to do is to time portions of code. Assume there are a few memory locations where you are going to stick this time (say 777-780 in decimal) and your routine is at address ADDR. It would be called from BASIC by something like: CALL ADDR :REM SAVE TIME T1=PEEK(777)+2^8*PEEK(778)+2^16*PEEK(779) :REM CALC TIME GOSUB 999 :REM WASTE TIME CALL ADDR T2=PEEK(777)+2^8*PEEK(778)+2^16*PEEK(779) T=T2-T1 :REM TIME DELTA 32 bits aren't really needed, but 16 bits might be too small, but I could check if T<0 to compensate... I'm not particular. The sequence of bytes for the time can be increasing, decreasing, whatever. In fact, do it in any way you want such that I can get the value into a variable! When IIgs boots it says "ProDOS 16 v1.1 Loader v1.1", but when I start up my BASIC program it says "ProDOS 8 v1.3 ProDOS BASIC 1.1" Go for it, Douglas PS: You could even compile a C or Pascal program and look at the code...