Re: A83: Re: Newbies :)


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

Re: A83: Re: Newbies :)




There are many ways to get the calculator off.  Also, CalcOff has been
out since before James's tutorials


<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>
       See ya,
       Mastermind

       http://www.bigfoot.com/~mastermind5


On Sat, 05 Dec 1998 19:42:55 PST "Evil Sam" <evil_sam@hotmail.com>
writes:
>
>>Here's the bit of code from Joe's PW program that turns the calc 
>off... 
>Do
>>with it what you will, and direct questions to him... =P
>>															--Jason 
>K.
>>	di				; turn off interrupts
>>	ld	a, $01		;\
>>	out	(3), a		;  \ Tell the calculator to 
>shut down
>>	xor	a			;  / at getkey
>>	out	(4), a		;/
>>	ei				; turn the interrupts back 
>on
>>	res	4, (iy+9)	; get rid of the "on" flag to 
>prevent errors
>>	call getkey		; shut down the calculator and 
>wait for [ON]
>>
>>	; Note By Me:  His "getkey" is the equivalent of "_getkey".
>
> "xor a / out (4),a" will screw up the calc's interrupt speed. The 
>correct shutdown code is this(taken from Penguins 82/83, Bill Nagel 
>can't be wrong :). The getkey part is unnecessary. If the ON flag is 
>cleared, then it will wait for the ON flag to occur :)
>
>OFF:
>  RES 4, (IY $09)     ; Turn off 'ON' flag
>  DI                  ; disable interrupts
>  LD  A, 01           ; bit 3 = lcd status
>  OUT ($03), A        ; bit 0 = ON-interrupt status
>  XOR A               ; make interrupts go fast
>  OUT ($04), A
>  EI                  ; enable interrupts
>  HALT                ; wait for ON (that's the only interrupt)
>  DI
>  LD  A, $16          ; Default setting for interrupt speed
>  OUT ($04), A
>  ret
>
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]