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.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 28 Jan 2004 08:49:59 am    Post subject:

How do you turn the calc off in the battery save mode?

and, is there a command you can place in a loop that will make it save batteries?



i thought that i saw these commands before somewhere, but i can't remember...
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 28 Jan 2004 10:36:19 am    Post subject:

I found nothing on detached solutions, which made mirage work in "battery-friendly mode".
Edit: if the calc is off it's already consuming much less battery power since the LCD is off.


Last edited by Guest on 28 Jan 2004 10:37:27 am; edited 1 time in total
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 28 Jan 2004 10:59:36 am    Post subject:

If you wish to turn off the LCD and have the calc sit in low power mode you must output %00000001 to port 3 followed by a halt.

TurnOffLCD:
ld a,%00000001 ;duh I think you know what this does.
out (3),a ;Shuts the LCD off
halt ;Suspends execution until an interrupt occurs a.k.a. [on] key press
ret ;ret to TIOS or main loop

This code will cause your calc's RAM to reset if you remove a battery while it's running.

Another thing I need to mention is that if you are writing a no-shell asm program it will set the onInterrupt flag. It is wise to add this between the halt and ret in the above code.

res onInterrupt,(IY+onFlags)

Otherwise it may generate some undesired results.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 28 Jan 2004 06:39:26 pm    Post subject:

yes yes, i knew all about this, but is there some way to do it with battery removal protecton? (btw, that is the way i already have it Laughing)

Last edited by Guest on 28 Jan 2004 06:39:44 pm; edited 1 time in total
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 28 Jan 2004 07:13:54 pm    Post subject:

I remembered this from a while ago on the DS website:


Code:
Gen_Checksum:
   push ix
   ld ix,9D95h
   ld bc,60DBh
   ld hl,0011h
   ld d,h
loop:
   ld e,(ix+0)
   inc ix
   add hl,de
   dec bc
   ld a,c
   or b
   jr nz,loop
   ld e,d
   ex de,hl
   sbc hl,de
   pop ix
   ret


Then


Code:
   call Gen_Checksum
   ld ($85BE),hl


Will re-calculate the RAM checksum that the TIOS uses to determine if there should be a RAM reset. GetKey does this automatically BTW.

N.B. This will work on a TI-83 Plus. Not sure about TI-83/TI-84 Plus, but doubtless there is a similar variable.


Last edited by Guest on 28 Jan 2004 07:15:48 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 29 Jan 2004 09:44:57 pm    Post subject:

the code for fully turning the calc off (you can ppull the batts out) is

Code:
poweroff:
    di
    ex af,af'
    exx
    ld a,1
    out (3),a
    halt
    xor a
    out (4),a
    ex af,af'
    exx
    ei
    ret


Courtesy JWales


Last edited by Guest on 29 Jan 2004 09:45:13 pm; edited 1 time in total
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 29 Jan 2004 10:27:33 pm    Post subject:

Thank you, that is what i was after :P

just couldn't find it in the forum anywhere :S

Thanks Darth, Thanks JWales Smile
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 31 Jan 2004 10:40:18 am    Post subject:

its here in the asm forum if you set it to show all topics then hunt for one named "Questions" started by me
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 31 Jan 2004 12:47:46 pm    Post subject:

has it been tested?

this is cool, because JWales is already in my Credits Laughing (he made the basis for the sprite routine i used to use) Very Happy
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 31 Jan 2004 07:29:38 pm    Post subject:

I have no idea if that code works properly or not. When I posted it, I specifically said that it was a guess. Go ahead and test it but no guarentee's.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 02 Feb 2004 09:18:17 am    Post subject:

oh, ok, thanks!

i will try it out sometime to make sure it works Laughing Very Happy
Back to top
JeePee


Member


Joined: 18 Jan 2004
Posts: 181

Posted: 02 Feb 2004 02:37:26 pm    Post subject:

Justin W. wrote:
I have no idea if that code works properly or not. When I posted it, I specifically said that it was a guess. Go ahead and test it but no guarentee's.

Had to remove all 4 batteries again! (Tested it allready before you posted Laughing )
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 02 Feb 2004 03:43:40 pm    Post subject:

and it worked??? sweeeett!!!!

i know it does nothing on the flash debugger...

Neutral

it is aggravating to press [on] and have nothing happen :lol:

:lol:
Back to top
sgm


Calc Guru


Joined: 04 Sep 2003
Posts: 1265

Posted: 02 Feb 2004 04:05:23 pm    Post subject:

You can BCALL $5008. That'll turn the calc off.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 02 Feb 2004 06:04:10 pm    Post subject:

undefined? wow...

i would still rather use Justin's routine, cause it isnt a bcall Laughing


Last edited by Guest on 02 Feb 2004 06:38:54 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 02 Feb 2004 06:13:49 pm    Post subject:

huh? sigma's IS a bcall...mine isnt...did you mistype that?
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 02 Feb 2004 06:38:44 pm    Post subject:

whooops! yes Neutral

thanks for the catch there Laughing
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement