I sometimes use ca65 to write code in assembly language for an obscure CPU for which I do not want to write a whole assembler from scratch (example: #362). When I do this, I .setcpu "none" and implement every mnemonic as a ca65 macro.
However, I get Error: Range error when the assembler cannot statically prove that a particular value is less than $100. When I use .globalzp to assert that the value is less than $100, I get Warning: Symbol `memset_tiny' is absolute but exported zeropage. When I do .segment "LOWCODE0": zeropage to make a label not absolute, I get Error: Invalid address size specification for current CPU.
What would be the drawbacks of making all three address size specifications (zeropage, absolute, and far) valid for the none CPU?
The text was updated successfully, but these errors were encountered:
I think that the original idea is that the none CPU has no instructions; therefore, it has no addressing modes. But, that makes it useless! I agree with you; we should go in the opposite direction. none should have no limits -- even "long" addresses should be allowed.
I sometimes use ca65 to write code in assembly language for an obscure CPU for which I do not want to write a whole assembler from scratch (example: #362). When I do this, I
.setcpu "none"and implement every mnemonic as a ca65 macro.However, I get
Error: Range errorwhen the assembler cannot statically prove that a particular value is less than $100. When I use.globalzpto assert that the value is less than $100, I getWarning: Symbol `memset_tiny' is absolute but exported zeropage. When I do.segment "LOWCODE0": zeropageto make a label not absolute, I getError: Invalid address size specification for current CPU.What would be the drawbacks of making all three address size specifications (
zeropage,absolute, andfar) valid for thenoneCPU?The text was updated successfully, but these errors were encountered: