ca65 overrides address size using z:, a:, and f: prefixes for direct, absolute, and absolute long respectively.
In addition to the .dpage, I guess you'd need a default data bank register for instructions that use absolute addressing mode.
asm6 + 65816 = asm16
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: asm6 + 65816 = asm16
Great to see 65816 finally coming to asm6!
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.
TAD is an alternate of the official TCD mnemonic I think. I guess the official mnemonics are supported too?
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.
TAD is an alternate of the official TCD mnemonic I think. I guess the official mnemonics are supported too?
Re: asm6 + 65816 = asm16
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.dougeff wrote:There should be a way to cast a value to direct-page, absolute, or absolute long.
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?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.
I always do that with lda #bla & $ffff. $ff to set to 8-bit.And, now that I think of it, how would you force a long address back to absolute ? With & operator, maybe ?
You mean to use on long addresses?tepples wrote:I guess you'd need a default data bank register for instructions that use absolute addressing mode.
Oh yeah, I wouldn't implement automatic DP if there wasn't a manual alternative.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.
Yep, all official opcodes and aliases should be supported.TAD is an alternate of the official TCD mnemonic I think. I guess the official mnemonics are supported too?
Re: asm6 + 65816 = asm16
With PRG bank set to $7E and direct page set to $2100, what should LDA $7E2100 do? Doing LDA $7E2100 & $FFFF would change it to $2100, which automatically gets recognized as zero page.nicklausw wrote:I always do that with lda #bla & $ffff. $ff to set to 8-bit.And, now that I think of it, how would you force a long address back to absolute ? With & operator, maybe ?
Yes.nicklausw wrote:You mean to use on long addresses?tepples wrote:I guess you'd need a default data bank register for instructions that use absolute addressing mode.
Re: asm6 + 65816 = asm16
That's a tricky situation. And just when I pushed the commit on my computer, too... Maybe automatic direct page shouldn't be a thing.
If I do end up putting it in anyway (probably not at this point) then the data bank will be handled by the assembler too. asm16 would solve the $7e2000 program fine if you put in the entire value. Using & $ffff makes it clueless.
If I do end up putting it in anyway (probably not at this point) then the data bank will be handled by the assembler too. asm16 would solve the $7e2000 program fine if you put in the entire value. Using & $ffff makes it clueless.