# Omnimaga

## Calculator Community => TI Calculators => General Calculator Help => Topic started by: Waave on August 31, 2011, 07:59:01 pm

Title: At what memory address(es) is system time stored on TI84?
Post by: Waave on August 31, 2011, 07:59:01 pm
I made a simple clock app using axe. I have everything working but the functions which get time, right now they are just placeholders which increase the time indefinitely.  I think I can get the time by reading from the memory address where the OS stores time, but I don't know what address that is.  If anyone knows it (them), could you tell me?  If you don't know, do you know a way I could find out?  If this method WILL NOT work, that would also be useful to know ;)
Title: Re: At what memory address(es) is system time stored on TI84?
Post by: Xeda112358 on August 31, 2011, 08:24:25 pm
Actually, the timer has to be read via ports (to my knowledge). The ports to read are 45h, 46h, 47h, and 48h (I think 48h is one...)

However, this might get tricky since this would have to be done in 32-bits. If you want just a simple timer, you can do something like this:

Code: [Select]
`Asm(EB0E45ED680CED60ED52`The way this will work is that you can run this once with a 0 on the previous line and store the result to a variable. This will be an offset that can be used later. When you run this again, later, make sure the variable with the offset is on the line before. This will then output the number of seconds that have passed since it was used the first time. Um, here is an example:
Code: [Select]
`0Asm(EB0E45ED680CED60ED52      ;Stores the current timer state to Ans→T<<code>>T                             ;T will be subtracted from the current timer stateAsm(EB0E45ED680CED60ED52      ;Ans will be the number of seconds (up to 65535) since the timer was initially tested`
I don't know if this helps...?
Title: Re: At what memory address(es) is system time stored on TI84?
Post by: thepenguin77 on August 31, 2011, 09:11:01 pm
Indeed, that clock is read by reading ports 45-48 (http://wikiti.brandonw.net/index.php?title=83Plus:Ports:45). This 32 bit number represents the number of seconds that have passed since midnight on January 1st, 1997.

Code: [Select]
` ld hl, op1 ld bc, 4*256+\$44loop: inc c ini jr nz, loop`
Code: [Select]
`21 78 84 01 45 04 0C ED A2 20 FB`
After running this, the current time will be at \$8478, (you can change the 78 84 in the hex to whatever you want :D)
Title: Re: At what memory address(es) is system time stored on TI84?
Post by: Waave on September 01, 2011, 08:25:30 am
Sounds good, but any help on how to access that number? (I'm using Axe Parser)

Also, the time will be in seconds, correct?