Hi Darrel,
Result Var Word
... and later...
Result = Result * Result ' create 1,000,000 for Div32

a 32 bit word?
I must look at how the decimal value of 1 million is handled.


A $5 calculator from the shop is beginning to look like a great deal
more than $5 worth of programming. Consider the value you get
when you pay $5 for a calculator with 8 decimal places and a
decimal point thrown in.

My calculator program can add decimal integers so far.
When a key is pressed, the value is shifted into an array that is
rotated.. leading zero blanking makes it look like a calculator too.

The bytes of the work array are limited 0-9, and I have created
my own carry flag for decimal math. Then I can write routines
that do integer math as we do it on paper.

Is that a stupid way to do it?
I assume a real calculator works on the hex array, and converts
the result to decimal only for the silly human to read, as is done
in the example you posted above.
Cheers, Art.