GARTHWILSON wrote:
Since WDC owns the 6502 intellectual property, I looked up what they have to say about it in their programming manual. Page 366 says,
Quote:
6502 assemblers have been wildly inconsistent in their syntax, and early 65802 assemblers have not set standards either. This book describes syntax recommended by the designers of the 65816, as implemented in the ORCA/M assembler. Others, however, do and will differ.
and it gives a couple of examples, but not about the star. Page 78 says,
Quote:
The assembly syntax used in this book is that recommended by the Western Design Center in their data sheet (see Appendix F [which I don't find --gw]). The assembler actually used is the ProDOS ORCA/M assembler for the Apple // computer, by Byteworks, Inc.. Before learning how to code the 65816, a few details about some of the assembler directives need to be explained.
What's interesting is that the ORCA/M assembler that the authors suggest was never fully compliant to the WDC standard. Also, as you noted, Appendix F doesn't exist in the book, or anywhere else that I've looked.
Quote:
One thing I am not fond of is when an assembler requires all labels to start in column 1.
Most assemblers don't impose that requirement in a physical sense (the old Commodore MADS assembler didn't, for example). Usually, leading blanks are stripped from a line of code and field parsing starts at the first non-blank character.
ptorric wrote:
ok, let me try to define some common syntax.
label are on the left and normally end with colon, but i also found the dot-label syntax and also nothing at all (positional column)
start:
Uh, labels normally don't end with a colon. That was an aberration introduced by a few assemblers whose authors hadn't bothered to read the old MOS Technology standard from which many 65xx assemblers have been derived. The only field that requires a specific delimiter is the comment field, since a comment can contain anything from the ASCII character set.
It's easy for a 65xx assembler parser to distinguish a label/symbol/pseudo-op/macro name from a mnemonic. If the first field is not 3 characters in length, it cannot possibly be a mnemonic. If it is 3 characters in length, initially treat it as a mnemonic and search the mnemonic table. If it isn't a mnemonic, does the field start with a period, the usual indicator to the assembler that what follows is a pseudo-op? If not, temporarily assume it's a macro and search the macro table. If it's not there, it's a label/symbol. Not rocket science.
Quote:
token commands are dot-somethings, not listed here
.org $4000
What you are referring to as "token commands" are properly called assembler pseudo-operations or pseudo-ops.
Quote:
usually * is the address compile memory, like the program counter.
Assemblers "assemble," not "compile." I try not to be pedantic about this, but when someone is trying to learn this stuff, terminology becomes important.