Skip to content
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

ideas to improve compiler support for romable code #149

Open
irmen opened this issue Aug 28, 2024 · 2 comments
Open

ideas to improve compiler support for romable code #149

irmen opened this issue Aug 28, 2024 · 2 comments

Comments

@irmen
Copy link
Owner

irmen commented Aug 28, 2024

To be able to build programs that can be put into ROM (for rom programs or stuff like a NES cartridge game, for instance), a couple of things are required.
Most notably:

  • no "inline" variables (only zeropage and bss)
  • no self-modifying code

Currently both are not achieved by the compiler.

An idea around better situation concerning self-modifying code is:

  • add a compiler flag to report self-modifying code issues
  • make sure that the compiler doesn't generate any self-modifying code in the codegen
  • or, alternatively, print a warning/error when it (still) does
  • introduce a tag for asmsub's that marks them as using self-modifying code. This requires a review of ALL of the library asmsub routines and mark them correctly.
  • this does leave all other included or inlined asm to do whatever it likes undetected.....
@tallLeRoy
Copy link

the tag should make it out the the listing file, so after compile the coder can search for the tag in the listing to find the areas not ready for ROM

@irmen
Copy link
Owner Author

irmen commented Aug 29, 2024

Probably should ignore the issues with the library code at first and concentrate on looking what needs to be done to get the code-generator in shape for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants