Jmstein7 wrote:
Great idea! There are thousands of lines of code, so it would be hard to debug. The other item I'm having trouble with is this:
Code:
.macro MNEM(P,Q,R)
.dword ((((P-'@')<<5)|(Q-'@'))<<5)|(R-'@')
.endmacro
It is telling me that this is an "Unsupported format of parameters" with regards to
.dword ((((P-'@')<<5)|(Q-'@'))<<5)|(R-'@')Argh!
It's compressing 3 characters into 2 bytes. Woz did this in his disassembler and one-line assembler. If this is failing for you, then your assembler doesn't support those actions, so short of changing assembler, you might need to work it out the hard way.
Although checking now - .dword - that might imply a double word and maybe 4 bytes, so compressing 3 characters into 4 bytes is odd, so I guess it really means a 16-bit word. I checked it in ca65 and it seems OK, but the syntax is different, so:
Code:
.macro MNEM P,Q,R
.word ((((P-'@')<<5)|(Q-'@'))<<5)|(R-'@')
.endmacro
MNEM 'L','D','A'
works with the output:
Code:
00C006 1 81 30 MNEM 'L','D','A'
So, L,D,A -> $81, $30.
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/