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

lcc: add 0x81-0xbf to zero page segment #68

Open
kervinck opened this issue May 9, 2019 · 3 comments
Open

lcc: add 0x81-0xbf to zero page segment #68

kervinck opened this issue May 9, 2019 · 3 comments

Comments

@kervinck
Copy link
Owner

kervinck commented May 9, 2019

Globals, and static variables in functions, are (much) faster when they can be placed in the zero page rather than main memory. We can give this zero page real estate to as many as such variables as possible. The call stack doesn't need much space after all.

Perhaps let the programmer hint which variables are candidate for such preferential treatment. ("static register" comes to mind, but that's not a fully developed idea, because we can have pointers to such variables.)

@kervinck
Copy link
Owner Author

Low priority

@kervinck kervinck added the low label Jun 4, 2019
@lb3361
Copy link
Contributor

lb3361 commented Aug 25, 2022

This issue is still relevant to glcc since it does not place globals in page zero.

This would require decorating the global declaration with attributes requesting a page zero placement for a global. Since the code generator already supports such variables, and since glink already tracks the page zero usage, the main difficulties are (1) adding an attribute syntax for lcc declarations, and (2) making sure that the linker does not mix zp globals and normal globals.

@lb3361
Copy link
Contributor

lb3361 commented Jul 18, 2023

glcc can now place globals in page zero using the __near type qualifier.

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

No branches or pull requests

2 participants