Re: HP-16C index register: definitely not 64 bits wide. Message #10 Posted by Vieira, L.C. (Brazil) on 16 Feb 2006, 1:31 p.m., in response to message #8 by Klaus
Hi, Klaus;
you are right in your concerns, I think I understand. Anyway, I guess that the main fact here is to be aware of these facts and the consequences of using the index register in some applications where its contents might cross 'zero' and they actually don't. If you write a program where it's expected that the [I] register has its contents crossing zero for a given number of bits, mainly the current word size, and you use ISZ or DSZ to detect such occurrence, it is a good idea to check if this is actually going to happen with the full extent of the [I] register.
If you have a device with an internal 32-bit register acting ass a counter and, at a certain point, its contents are FFFFFFFFh and you add one to it, its contents will be 00000000h and, if provided, a carry bit is set. If this register has its contents compared to zero at this point, test returns true. If you simulate the same circumstance in the HP16C and you decide to use the [I] register to do so, ISZ will cause the [I] register to go from FFFFFFFFh to 100000000h, so it returns false and the next step is missed. The same will happen if you are working with any other word size, no matter what.
So, ISZ and DSZ may be tricky in a few circumstances in the HP16C. I am not sure reading about such facts before, so maybe this is too rare to be considered a problem.
Hey, Valentim; thanks for your additional info. BTW, where can we download these masterpiecs of yours from? I remember trying some times when you announced they were available, but I got some error messages and did not succeed downloading. Now that I lost many important documents (every moment I remember something...), I am collecting good material again. Thanks.
Best regards.
Luiz (Brazil)
Edited: 16 Feb 2006, 1:37 p.m.
|