It is currently Wed Sep 20, 2017 8:24 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: asm6 + 65816 = asm16
PostPosted: Sun Apr 23, 2017 6:30 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18989
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
 Post subject: Re: asm6 + 65816 = asm16
PostPosted: Sun Apr 23, 2017 8:19 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 750
Location: Sweden
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?


Top
 Profile  
 
 Post subject: Re: asm6 + 65816 = asm16
PostPosted: Sun Apr 23, 2017 8:37 am 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 366
Location: ...
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.


Top
 Profile  
 
 Post subject: Re: asm6 + 65816 = asm16
PostPosted: Sun Apr 23, 2017 9:52 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18989
Location: NE Indiana, USA (NTSC)
nicklausw wrote:
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.

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:
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?

Yes.


Top
 Profile  
 
 Post subject: Re: asm6 + 65816 = asm16
PostPosted: Sun Apr 23, 2017 10:08 am 
Offline
User avatar

Joined: Sat Jan 03, 2015 5:58 pm
Posts: 366
Location: ...
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group