Page 2 of 2

Posted: Thu Apr 01, 2010 3:30 am
by Darendor
Braiiiins. :?

Posted: Thu Apr 01, 2010 9:00 am
by Quantum Reality
Darendor wrote:
<namsb, >namsb
What the hell do those mean?


Anyway, we should all get 64Copy.
Depends on the assembler convention. From what I vaguely recall, <whatever is the low-order byte and >whatever is the high-order byte, BUT CARE. One or two assemblers reverse this convention.

Posted: Thu Apr 01, 2010 7:17 pm
by ZeroZero
<label ; replace with low byte of the address represented by label
>label ; same for high byte

and it always works correct on any assembler,
because the assembler should know about its
platform and what is the low and what the high byte...

Posted: Thu Apr 01, 2010 9:42 pm
by Quantum Reality
You're assuming that all assemblers work the same in any world.

NO THEY DON'T

I know at least three different ways Apple-based 6502 assemblers indicate low-order bytes versus high-order bytes

KNOWING THE CONVENTIONAL USAGE MATTERS.

Look, I have the manual for the Apple-produced EDASM (Editor/Assembler), the convention as stated in the back of the book is:

< means the high order byte
> means the low order byte

This is exactly opposite to your assembler. Merlin Pro uses your assembler's convention, and the S-C assembler uses something totally out of outer space and I don't like it anyway so I'm not going to look it up.

Posted: Thu Apr 01, 2010 9:53 pm
by ZeroZero
lmao, that is only a matter of the assembler's syntax and in no
way a matter of the machine's endian type.

If one assembler defines it's syntax to have > as hi-byte, than it
still gets the high byte, while the other gets the high byte with the
< command.

< (smaller than) of course is very bad understatement for the high
byte and thus disqualifies the assembler. Such assemblers require
the user to manually change the source apart from any agreements.

95% of all assemblers will use the smaller symbol for low and the greater
symbol for high byte, which makes sorta sense, while the other is bs.

If you are damned to use such a poor assembler, you have of course
either to change your source, or hopefully can define in the assembler
to turn around the meaning (by macros or defines).

E D I T

< = low and > = hi is TASM syntax, the quasi-standard for most
compilers on 8-bit machines and even long time on DOS and early
windows machines

E D I T 2

I remember that even as well Borland's as also Microsoft's C inline assembler code used the same syntax. I admit, not to know the
standard for ANSI C inline assembler code.

Posted: Thu Apr 01, 2010 10:20 pm
by Quantum Reality
Point is, you need to define the syntax and be aware that there are syntactical differences. As for the oddballs, there are conversion programs that just flip all the > and < signs around, so it's not as huge an issue as you'd assume it to be.

Posted: Thu Apr 01, 2010 10:28 pm
by ZeroZero
True also

Posted: Fri Apr 02, 2010 6:09 am
by Darendor
...

Pizza's here. :?