New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing ca65 for 65816 jml and jmp opcodes #80
Conversation
added a missing addressing mode for jmp/jml : Absolute Indexed Long that opcode can be written like jmp[$1234] or jml[$1234] removed Absolute Inderect addressing mode for jml since it's not a long adressing mode
@@ -84,6 +84,7 @@ | |||
#define AM65_IMM_IMPLICIT 0x00800000UL | |||
#define AM65_BLOCKMOVE 0x01000000UL | |||
#define AM65_BLOCKXFER 0x02000000UL | |||
#define AM65_ABS_IND_LONG 0x04000000UL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the nit-picking but the cc65 source code isn't supposed to contain \t chars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sorry I will fix that for next pull requests ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to apologize!
I presume that you're aware that you can just push another commit to your branch to update this exsisting pull request. You should however drop a note in this discussion that you did so as I won't get automatically notified on new commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed !
Thanks for your interest in contributing to cc65 :-) As I'm having a hard time to assess its correctness I'll ask on cc65-devel@lists.sourceforge.net for additional input. |
There was no substantial feedback on cc65-devel@lists.sourceforge.net so I'm going to merge this. |
Fixing ca65 for 65816 jml and jmp opcodes
The W65C816S's datasheet shows that the opposite is true. That mode is the reason why the
Both instructions have 16-bit operands (they point to 2-byte or 3-byte data in memory bank zero). (All other addressing modes are the same for both mnemonics.) Therefore, that mode needs to be put back into ca65. |
After studying http://westerndesigncenter.com/wdc/documentation/w65c816s.pdf longer, and after reading this request's description again, I think that I was confused by a mode-name typo.
|
This is a listing from the patched ca65:
The first Also, the fourth |
Ok I will double check that ... |
See #83 ... |
First I would like to apologize for the adressing mode typo. The adressing mode that I added is "Absolute Indirect Long" wich syntax is At first I didn't agree when you say that I didn't based myself on the http://westerndesigncenter.com/wdc/documentation/w65c816s.pdf document but from older reference ("Programming the 65816" from WDC). The pdf in the link is the only reference that indicate that the When you look to wdc reference doc it's quite clear that JML alias is only for long adressing modes, now in ca65 code when you specify an adress it will pad her with 0 like The fix for this is in #83 |
Fix for pull request #80 bad JML opcode and adding syntax for Absolute Indirect Long
Added a missing addressing mode for jmp/jml : Absolute Indexed Long
that opcode can be written like jmp[$1234] or jml[$1234]
Removed Absolute Indirect addressing mode for jml since it's not a long adressing mode