Re: A85: Count


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

Re: A85: Count




i think this would work.  i could be wrong though.  it was written
quickly.  anyways, for this, you have to press the EXIT key 64K times,
so that wouldn't be fun.  for your program, i don't think you ever
stopped to display the numbers.  they will all be displayed *very*
quickly.  this may be your problem.  the code might be fine.

-mike pearce

#include "ti-85.h"

.org 0
.db "Test",0

 ROM_CALL(CLEARLCD)
 ld hl,0
StartLoop:
 push hl		; save count
 ld hl,0
 ld (CURSOR_ROW),hl
 ROM_CALL(D_HL_DECI)	; does this destroy hl???
WaitKey:
 call GET_KEY		; does this destroy hl???
 cp K_EXIT
 jr nz,WaitKey
 pop hl			; restore the count
 inc hl			; increment the count
 ld a,h			;\ is hl 0?
 or l			;/
 jr nz,StartLoop	; hl is not zero so jump
 ret

.end

On Sun, 13 Sep 1998 17:20:03 PDT, you wrote:

>
>Great.  Now, Count doesn't lock up the calculator (whoo hoo!) but it 
>doesn't count past one, either. Here's my new code:
>#include "ti-85.h"
>
> .org 0
> .db "Count II: Test Prog",0
>
> ROM_CALL(CLEARLCD)
> ld hl,0
>StartLoop:
> ld d,h
> ld e,l
> ld hl,0
> ld (CURSOR_ROW),hl
> ld h,d
> ld l,e
> inc hl
> ld d,h
> ld e,l
> ROM_CALL(D_HL_DECI)
> ld h,d
> ld l,e
> ld a,h
> or l
> jr nz,StartLoop
>WaitKey:
> call GET_KEY
> cp K_EXIT
> jr nz,WaitKey
> ret
>
>.end
>
>Aiiieee!
>Scottish Bob
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>


References: