If you have a question about AS that you want answered, post it here. If I can't answer it myself, and I'm sufficiently piqued, I'll email Alfred Arnold about it. Any questions of the general form "yadda yadda yadda AS sucks yadda yadda" will be silently ignored.
Since several people have complained about AS emitting errors for indexed addressing modes, I've decided to explain it here. The problem is not in the instructions that give the errors. They are perfectly fine. The problem is in certain JMP statements, particuraly absolute jumps without a specified length. They take the form <tt>jmp someLabel</tt> When AS encounters this in the first pass, and <tt>someLabel</tt> hasn't been defined yet, it will reserve two extension words and move on. In the second pass, the extension words are filled in with the destination address, and if it's found to need only a single word, AS will size-optimize. This is precicely the problem. When that second word is removed, the entire ROM after that will be shifted down two bytes. This messes up all later references. Occasionally, the address space will be shifted such that AS will attempt to allocate extra space for other references - and if this isn't allowed for some addressing mode, it will emit an error. This is rather simple to fix. Simply specify the width of the destination address in absolute jumps. The above instruction becomes <tt>jmp (someLabel).[swl]</tt> You can choose any of s, w, or l for the length attribute depending on the expected address width. (s and w mean the same thing.) AS will emit an error if .[sw] isn't allowed because the destination address is too long. EDIT: s/path/pass
I get this when building my hack with AS. The same source code, with bincludes changed to incbins, and "align 2"s changed to evens, works perfectly. Anybody has any idea of the problem?
Attention, double posting: The previous problem was fixed by adding "padding off" to the very beginning of the code.
The reason I was asking was that Aurochs said he was going to use a data segment to define RAM variables in the 2007 release of his disassembly, and I was interested in seeing how that would have worked. Perhaps a PM would have been better, but meh.
You can define the RAM variables in the data segment like so: Code (Text): eqd macro x,{INTLABEL} __LABEL__ = x,DATA endm then use eqd instead of equ when defining the variables. This seems to do nothing besides put a D next to the symbol in the assembler listing. Using "segment DATA" generates an error that no such segment exists, so I suspect AS has no concept of a data segment in 68000 programs.