This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's
z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.
Z80 & 68k Assembly =>
z80 & ez80 Assembly
Author |
Message |
|
poopslayer78
Newbie
Joined: 10 Sep 2009 Posts: 28
|
Posted: 05 Feb 2010 07:42:06 pm Post subject: |
|
|
Never mind, found the old document
old post:
I posted this topic a while ago but lost the document that I saved the answer to so ill try again.
I am trying to get the current time in assembly for my ti84+SE. the routine i'm thinking of pushes 3 values to the floating point stack. these three values are the hours, minutes, and seconds of the current time.
Last edited by Guest on 05 Feb 2010 07:59:21 pm; edited 1 time in total |
|
Back to top |
|
|
FloppusMaximus
Advanced Member
Joined: 22 Aug 2008 Posts: 472
|
Posted: 05 Feb 2010 10:01:31 pm Post subject: |
|
|
I remember having this discussion fairly recently...
The routine you're looking for is GetTime (515B). It's only available on OS 2.30 and above, and it's quite slow.
If you need something that's faster and/or works on all OSes, you could do this:
Code: ld hl,OP1
ld bc,$0449
read_clock:
dec c
ini
jr nz,read_clock
ld de,60
B_CALL Div32ByDE
ld a,(OP2 + 3)
push af
B_CALL Div32ByDE
ld a,(OP2 + 3)
push af
ld e,24
B_CALL Div32ByDE
ld a,(OP2 + 3) ; A = hours
pop bc ; B = minutes
pop de ; D = seconds
|
|
Back to top |
|
|
|
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page