Re: LZ: Stupid Newbie Question: Why doesn't this work?
[Prev][Next][Index][Thread]
Re: LZ: Stupid Newbie Question: Why doesn't this work?
In a message dated 97-07-18 00:32:38 EDT, you write:
<< Nick Zitzmann wrote:
>
> OK. So I've done the generic Hello World style of program, and now am
> trying something else...
>
> I'm having a little trouble putting a number into HL, and trying to figure
> out how to display this number on the screen. I've tried this:
>
> #include "ti-85.h"
>
> .org 0
> .db "Numbers",0
>
> ROM_CALL(CLEARLCD)
> ld de,0
> ld hl,1000
> ld (CURSOR_ROW),de
> dec hl
> ROM_CALL(D_HL_DECI)
>
> Loop:
> call GET_KEY
> cp K_EXIT
> jr z,Loop
Shouldn't this be jr nz,Loop. If two numbers are equal the zero flag is set,
but since they are not equal until you press the exit key it will exit before
you see the program.
> ret
>
> .end
>
> For some reason, this program won't run, and I (being new to assembly
> programming in general) don't see what's wrong with it. Does anyone?
>
> Nick Zitzmann No WWW page at this time.
> (Resident Macintosh Tweaker)
> Windows 95:
> From the people who brought you
> EDLIN! >>