[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cross-platform programming question...
Roger Johnstone (roger@ihug.invalid) writes:
> In <KRHmb.34474$Rd4.15280@fed1read07> Scott Alfter wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> In article <bnesff$b90$1@acme.gcfn.org>,
>> Dave Althoff Jr <dalloff@gcfn.org> wrote:
>>>Just a simple one...
>>>
>>>When we refer to a hexadecimal number, we designate it like this:
>>>
>>>$FB6F
>>>
>>>When anybody else does it, they do it like this:
>>>
>>>0xFB6F
>>
>> That's C notation, which started on UN*X and spread elsewhere from
>> there... anybody who's written stuff in C or C++ will be familiar with
>> that. The TI-99/4(A) folks have yet another notation they use...">"
>> instead of "$" or "0x", IIRC. I wouldn't be surprised if there are
>> other forms used by Atari, Commodore, and other 8-bit machines.
>
> Some other systems used the dollar sign, probably copied from Apple or
> from the same source Apple adopted their convention from. IIRC, BBC
> Micro and MS QBasic use an ampersand prefix for hexadecimal e.g. &FB6F.
>
I'm pretty sure Apple was not the source of the dollar sign.
If you looked at any 6502 assembly language, it was almost always
using a dollar sign to denote hex. I didn't have an Apple back then,
but I did have a KIM-1 in 1979, and I never noticed anything but
dollar signs. I did read Byte from the first issue, and I know I
looked through the back issues as soon as I got that KIM-1, and
I don't remember any code for the 6502, at the very least, that did
not use the dollar sign.
Michael