Subject: Re: [stella] DASM wish list From: "B. Watson" <atari@xxxxxxxxxxxxxx> Date: Tue, 16 Aug 2005 09:55:06 -0400 |
On Mon, 15 Aug 2005, C. Bond wrote: > ...especially if your opcode list includes all > the unofficial opcodes. In some cases you may have to rewrite your source code > to change labels such as SAX, DCP, etc. so they don't conflict with opcodes. > It might be better to simply separate labels from opcodes by a formatting rule. > (Maybe not, just a thought!) Illegal opcode support ought to be something you can turn off, either from the command line or with a directive in your source. At one time there was talk of doing this in DASM, but I can't remember whether it actually happened... > Another issue has to do with using opcode syntax such as LSR A and > ROL A. If your assembler simply requires LSR or ROL, you can free > up 'A' for use as a label, otherwise it becomes a reserved symbol. I don't think anyone who codes for the VCS also smokes crack, so we don't have to worry about that: non-crackheads know better than to use a label that conflicts with a register name! Just because something's allowed doesn't mean it's a good idea, and I'm willing to bet we won't run into any old code that has labels called A, X, or Y... In fact, I have bet that: I unconditionally treat A, X, Y, S, and PC as registers in the Stella debugger. I thought about it a lot, and decided that the inconvenience of having to type a "sigil" character (maybe ".A" or "%A" for accumulator, as opposed to just plain "A") doesn't outweigh the possible compatibility problems dealing with a drug-influenced label called "A"... Everyone's going to have to refer to the accumulator a zillion times, but only the insane people are going to have a label called "A". I won't punish the many for the crimes of the few. Besides... In the debugger, if you've got a symbol file to load, that means you almost certainly have the source, so you can change it to something meaningful (or something like "A1" if you insist on it). Even if you don't have the source, you can define new labels from within the debugger and save the current label set as a DASM-compatible symbol file. ...for what it's worth: I prefer the "ROL" syntax instead of "ROL A". The "A" doesn't tell me anything I don't know already, and there are plenty of places in 6502 asm where there's an implied A. You don't have to say "CMP A #123" to know you're comparing the A reg, or "ADC A #123" to know you're adding to the A reg... -- B. Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://stella.biglist.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] DASM wish list, C. Bond | Thread | Re: [stella] DASM wish list, Glenn Saunders |
RE: [stella] Maximum baud rate for , Fred Quimby | Date | Re: [stella] DASM wish list, C. Bond |
Month |