At 06:05 PM 10/11/2001 -0400, Gregor N. Purdy wrote: >I'm guilty. > >I needed address arithmetic for Jako subroutine support. I also needed >a quick and easy way to detect it in the .pasm file. I use the square >brackes as a quotation device to make it easy to parse. Eventually >we will need an assembler with a syntax that is *designed* rather >than *evolved* (this is not intended as a disparaging comment), at >which point the syntax for various constructs would be up for grabs.
Are you sure it's not just stolen? Some of us do have extensive (if really, really old) experience with macro assemblers :) >For example, I think registers should start with '%' or some other >sigil, since I could very reasonably want to use a label that looked >like a register reference. Heh. Well, too bad--use S0 and get string register 0. I'm OK with that. >Anyway, we definitely should have address arithmetic documented in >the assembler docs, and I should have written it right at the outset, >but I forgot. While I think I'd prefer * as the PC indicator, @ is OK and it won't conflict with constant arithmetic someone might want to do. I think we need some opcode that'll fetch the current PC and stick it in a register. Maybe: getpc I0 to put the PC for the next instruction into I0. Having "fake" opcodes would be useful, like so: getlabelabs I0, FOO to put the absolute address of the label FOO into I0, which'd probably translate into: getPC I0 add I0, I0, FOO or something like that. Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk