Re: Is hex an ascii thing?



"Mike Gonta" <email@xxxxxxxxxxxxx> wrote in message
news:1176308203.985443.326460@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"[Jongware]" <sorry@xxxxxxxxxxx> wrote:

Besides, if it was used in (for example) an assembly source, they would need
a "localized" version of atoi to correctly convert it to (binary) decimal in
their assembler.

How about Unicode support?

How about that? The string "0x1A" in Unicode is still recognizable by an
extended atoi() function. Replace the character 'A' with any other first
character in another alphabet and it is not.
Though for variable names, it should be no problem -- mov eax,[?????????] should
work just fine.

A minor note is that the order of characters is a bit different. In Greek,
the first 5 characters are alpha,beta, gamma, delta, epsilon, theta, so 0x1G
would equal 19 (decimal).

There is no "G" in the Greek alphabet.

I guessed my email client would not accept it -- I meant 0x1? (which would be
18, BTW). But a true 'meta-language' assembler should ALSO be prepared to
accept, for example, Chinese numerals.

Maybe we should stick to the de facto definition of a hex number as "consisting
of 0 to 9 and A to F".

[Jongware]


.