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

Status of the project? #120

Open
slaykachu opened this issue Oct 10, 2021 · 1 comment
Open

Status of the project? #120

slaykachu opened this issue Oct 10, 2021 · 1 comment

Comments

@slaykachu
Copy link

Fascinating project! I'd like to achieve something similar (more context)

I have seen some recent changes here, I'd love to know what is planed next.

@davidgiven
Copy link
Owner

Thanks!

The last change was to remove the requirement of passing subroutine parameters on the stack, to make it more friendly for non-stack-based architectures. I've recently been nerd sniped by a weird 8051 architecture with 16-bit extensions that'd be interesting to make a code generator before and that should be helpful there.

The next main thing which needs doing is to rewrite the assembler. The current version is a quick hack and it only supports absolute files, which means that generating code for e.g. 68000 architectures (Amiga and Atari ST) is difficult. As I already have a flex and lemon port to Cowgol used by the main compiler, the obvious thing is to reuse those and use a real parser. That should also, I hope, make it easier to make assemblers for new architectures (like my weird 8051).

For long term goals, generating better code is always good, but this is very much limited by the statement-at-a-time code generation. For example, keeping values in registers is hard because there's no way to know when they're going to be used next. This probably wants some thought...

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