Open Sakrac opened 5 years ago
more details: http://datasheets.chipdb.org/Western%20Design/w65c816s.pdf (starting on page 50)
This has been updated, I hopefully caught all address mode indications with >, |, ! and <
I can confirm >, |, and < appear to work, but ! seems to evaluate to address 0, lst output from the assembler below
$0017 a5 30 lda $30 3+2 lda <$101030 $0019 a5 30 lda $30 3+2 lda <$1030 $001b ad 00 00 lda $0000 4+ lda !$1010 $001e ad 00 00 lda $0000 4+ lda !$101030 $0021 ad 30 10 lda $1030 4+ lda |$101030 asm/waitkey.s(58): $0024 8f 10 c0 e0 sta $e0c010 5+ sta >$e0c010
I had to disable ! because it caused a greater syntax conflict. I have some ideas to check the value for other operators to disambiguate but not quite done thinking yet.
Could you use the fact that it will always be the first character of the expression?
That is valid for both use cases, but I think in this case it would not be the end character or followed by an operator (+, -, etc.).
Support WDC addressing mode syntax modifiers: < for Direct (.z) | for Absolute (.a)