MacVAX XFC (system) Calls
String To Number Conversion
These calls provide "number to string" and "string to number" conversions.
- XFC #AHTOI (4)
- Convert a hexadecimal number string into the equivalent binary number. On
execution r0 must contain the address of the string to convert ( leading spaces in the
string are skipped until a hex digit is found). The conversion continues until either
eight hex digits have been found or a non hex digit is encountered. After execution the
binary value is returned in r1, and r0 points to the byte after the last digit converted.
- XFC #ADTOI (5)
- Convert a decimal number string into the equivalent binary number. On execution r0
must contain the address of the string to convert (leading spaces in the string are
skipped until a decimal digit is found). The conversion continues until either ten
decimal digits have been found or a non decimal digit is encountered. After execution
the binary value is returned in r1, and r0 points to the byte after the last digit converted.
- XFC #ITOAH (6)
- Convert a binary number into a hexadecimal string. On execution r0 contains the
address of a buffer where the string will be placed, and r1 contains the integer to be
converted. After execution r0 points to 1 byte past the end of the string.
- XFC #ITOAD (7)
- Convert a binary number into a decimal string. On execution r0 contains the address of
a buffer where the string will be placed, and r1 contains the integer to be converted.
After execution r0 points to 1 byte past the end of the string.