The format used by the calculator to store values.
The Alpha_GetData() function returns parts of its data in this format;
Floating point values are BCD encoded; 3 digits for exponent (100-biased), and 15 digits for the mantissa. Three byte seem to be used as some status bytes.
The structure consists of two 12-byte-values (real and imaginary, as the case may be).
You have to subtract 100 from the exponent, if you want to yield the real value. F. i. 100 = 0; 098 = -2 a.s.o..
If the mantissa is negative, 500 is added to the exponent.
600123000000000000xxxxxx = -1.23
100230400000000000xxxxxx = 2.304
098456000000000000xxxxxx = 0.0456
597786000000000000xxxxxx = -0.00786
Fractions are stored using another format.
It starts with the sign-nibble (1=positive;6=negative), followed by the digit "A".
The next digit represents the length of the number minus one.
The number has the form a b/c, irrespective of Setup(0x57).
The parts a, b and c are BCD-coded and separated by the digit "A".
6A62A33A5000000000xxxxxx = -2 33/50
1A62A33A5000000000xxxxxx = 2 33/50
Can be used to convert the data retrieved by
Alpha_GetData(), into a string.
The meaning of unknown is.. unknown.
The function heeds for setup-entries 0x2B (number display format) and 0x17 (dec/hex/oct/bin). Hence it can be used as a syscall-based formatting function to replace the code consuming standard-library routines.
syscall-based BCD/double converters are not yet found. So this has to be provided for.
Can be used to convert a standard BCD-value into a
special internal format, which helps saving code when
converting a BCD-value to C-double.
Returns -1 on error, else returns 0.