Re: A83: Re: Registers and UDVs on the TI-83


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

Re: A83: Re: Registers and UDVs on the TI-83




On 19-Jan-99, James Matthews wrote:

>>  ld a,atempl ; the problem! 


>  ld a,(atempl)

>>  push af
>>  ld a,btempl ; again...

>  ld a,(btempl)

>>  ld b,a 
>>  pop af
>> 

>There you go.

Nope. He just said that doing that would result in the wrong answer. The
problem is that this guy doesn't seem to know if he wants 16bit or 8bit
variables. My tip to the newbie would be to stick to 8bit vars all the time;
that means that when initializing the variables to 0, don't use hl but a!

ld a,0   ;can be optimized, I know. =)
ld (atempl),a
ld (btempl),a

And by the way, who made up this stupid "User Defined Variables" term!? I
mean - it's just some bytes of data in an allocated/safe area of ram! The
term 'variable' on the ti-83 refers to something that you can find in the
symbol table! And the 'user' is NOT the programmer, so it just doesn't make
any sense!

Linus

.--> ____
|    \OO/     -  -- --- ------ Linus Akesson -- http://fly.to/linus.world -.
`-OoO-\/-OoO---------------------------------------------------------------'
                      Demons are a Ghouls best Friend.
                      -------> MrCookie v1.1 <--------



References: