Skara Brae Disk Events C64

Discussions and help for the Bard's Tale Construction Set
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

Braiiiins. :?
User avatar
Quantum Reality
Posts: 91
Joined: Mon Mar 15, 2010 8:34 pm

Post 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.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post 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...
User avatar
Quantum Reality
Posts: 91
Joined: Mon Mar 15, 2010 8:34 pm

Post 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.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post 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.
User avatar
Quantum Reality
Posts: 91
Joined: Mon Mar 15, 2010 8:34 pm

Post 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.
User avatar
ZeroZero
Posts: 286
Joined: Tue Mar 10, 2009 9:10 pm
Location: Germany

Post by ZeroZero »

True also
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Post by Darendor »

...

Pizza's here. :?
Post Reply