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, AtmaZ@aol.com (AtmaZ@aol.com) wrote:
>> 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!
>Hey, wow! It worked! Finally 2 + 2 = 4! Now on to implementing 8-bit
>multiplication routines and increment! (Wait a minute, that's going to suck
>even more than THIS...)
Increment: inc a
Multiplication might overflow, so you should use a combination of 16bit and
8bit there. But if you aren't afraid of overflows, this would do an a*b when
b>0:
ld c,a
ld a,0
loop: add a,c
djnz loop
This is by no means optimized, but it's a good example.
>> 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!
>Hell, I don't know...but the UDV term is sure in widespread use. Maybe we
>should call them "Programmer-Defined Storage Blocks"... :)
That's better! But if you asked me, you wouldn't call it anything! Or perhaps
you should use a mixture of the terms "writing to a byte of memory" and
"getting the address of a byte of memory that can be used". Sort of.
Linus
.--> ____
| \OO/ - -- --- ------ Linus Akesson -- http://fly.to/linus.world -.
`-OoO-\/-OoO---------------------------------------------------------------'
What do you get if you cross an agnostic, an insomniac and a dyslexic?
Someone who lies awake at night wondering if there really is a dog.
-----> MrCookie v1.1 by Linus Akesson (text/misc/MrCookie.lha) <------
References: