number.f
This source file contains words to perform what Forth traditionally calls 'pictured' number output. The words herein allow the outputting of a number in almost any radix in any format.
The code is logically split into two sections. The first section contains primatives to extract each digit from the source number one at a time and construct the output string. These primatives work only on positive integers and expect the source number to be a double (64 bits in IsForth).
The second section contains words which use the above primatives to convert and display any signed or unsigned value. These words contain versions to convert and display both 32 bit and 64 bit values.
As conversion is taking place on a value, the lowest digit of the value is extracted, converted to an ascii character and stored in the scratch pad (a temporary buffer that is traditionally located 80 bytes above 'here'). When the source number contains no more digits (i.e. it has been reduced to zero) the the conversion is complete.