[A83] Re: Calculator power-off woes


[Prev][Next][Index][Thread]

[A83] Re: Calculator power-off woes



Problems: My interrupt resides in savesscreen, plus the TI-OS APD changes 
the IM to 1.  The end of my main interrupt routine does include a JP $003A 
(I didn't exx\ex af,af' again) but for purposes of turning the LCD on after 
the halt, I thought it would be best not to.  Maybe I will try something 
else... maybe im 1 before the halt, then im 2 after?

>I'd suggest letting the os do the work for you.  I think this code may work
>for you:
>
>myInterrupt:
>  di
>  ex   af,af'
>  exx
>
>  ;**your code goes here**
>
>;end of interrupt
>  exx
>  ex   af,af'
>  jp   0038h
>
>
>This supports APDing and if you want to immediately turn off the 
>calculator,
>you could simply adjust the APD timer to 1.
>
>brandon sterner
>
>----- Original Message -----
>From: "Jeff" <telepath75@hotmail.com>
>To: <assembly-83@lists.ticalc.org>
>Sent: Tuesday, August 05, 2003 2:39 PM
>Subject: [A83] Calculator power-off woes
>
>
> > HELLLLLLPPPP!  I think I've tried everything!
> >
> > I am working on a custom interrupt mode 2 routine for the TI-83, and I
>want
> > to turn off the calculator within it.  The problems I have are:
> > (1) out (3),1 does not turn off the LCD
> > (2) halt either responds to no interrupts (frozen calc, turnon is never
> > called, usually happens on both VTI and real calc) or responds to all
> > interrupts, including timer (happens when I step thru in VTI).
> >
> > This is basically the code I want to use:
> >
> > int_start:
> >  exx
> >  ex    af,af'
> >  bit   pwrflag
> >  jr    z,turnon
> >
> > .
> > .
> > .
> >
> > turnoff:
> >  res   pwrflag
> >  ex    af,af'
> >  exx
> >  push  af
> >  ld    a,01h
> >  ei
> >  out   (03h),a
> >  halt            ;wait for on-key interrupt (shouldn't this call 
>turnon?)
> >  di
> >  pop   af
> >  exx
> >  ex    af,af'
> >
> > .
> > .
> > .
> >
> > turnon:
> >  set   pwrflag
> >  ld    a,0Fh
> >  out   (3),a
> >  exx
> >  ex    af,af'
> >  reti
> >
> >
> >
>
>

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail