Author Topic: UINT -> ASCII functionality  (Read 14981 times)

Offline TightCoderEx

  • Full Member
  • **
  • Posts: 103
UINT -> ASCII functionality
« on: June 05, 2012, 01:34:40 PM »
I'm going to design a sort of special purpose converter that will address the following criteria;

1: Input, condition flags depicting desired format and a pointer to a suitably large enough buffer for specified format

2: Output: Binary (Octal or Hex) meaning 3 bit or 4 bit nibbles
                 Octal
                   Hex
                   Dec

3: Left, centre or right justified
4: Leading Zeros or not
5: Sensitive to 64, 32, 16 & 8 bit widths, meaning if value is 4819 then output would be 12D3 not 00000000000012D3 or 1020 would be 03FC

Stack addresses will be skewed to either TOM (Top of memory 0x8000000000000000) or TOF (Top of procedure frame).

Anyone have any suggestions what other functionality might be handy in such an algo?