dougeff wrote:
There should be a way to cast a value to direct-page, absolute, or absolute long.
Yeah, that would be a good addition...I'm thinking ending the opcodes with ".b",".w" or ".l"? ca65's way might be easier, just depends on how the colon would be handled by asm16.
Quote:
Please don't try to guess that the user wants a direct page (based on D values). I would rather that you use direct page if the address (or label) is < 0x100. Absolute if the address is between 0x100 and 0xffff. Long if the address is >= 0x10000.
Your preferred functionality is what the assembler does currently, since it doesn't really know what direct page is (it just guesses that everything below 0x100 is "zero page"). Why not let the assembler guess if the user wants direct page, though?
Quote:
And, now that I think of it, how would you force a long address back to absolute ? With & operator, maybe ?
I always do that with
lda #bla & $ffff. $ff to set to 8-bit.
tepples wrote:
I guess you'd need a default data bank register for instructions that use absolute addressing mode.
You mean to use on long addresses?
Pokun wrote:
Even if you can track DP, I think a directive for manually setting DP is good to have. That way, adding HuC6280 support would be easy too I guess.
Oh yeah, I wouldn't implement automatic DP if there wasn't a manual alternative.
Quote:
TAD is an alternate of the official TCD mnemonic I think. I guess the official mnemonics are supported too?
Yep, all official opcodes and aliases should be supported.