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

Allow MSXbin to write size of the imported data as a constant #16

Open
pvmm opened this issue Jun 10, 2022 · 2 comments
Open

Allow MSXbin to write size of the imported data as a constant #16

pvmm opened this issue Jun 10, 2022 · 2 comments

Comments

@pvmm
Copy link
Contributor

pvmm commented Jun 10, 2022

For instance:

const unsigned char data[] = {
        0x43, 0x33, 0x33, 0x34, 0x43, 0x33, 0x33, 0x34, 0x43, 0x33, 0x33, 0x34, 
        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF 
};
const unsigned int data_length = 24;
@aoineko-fr
Copy link
Owner

Why don't just use sizeof(data)?

@pvmm
Copy link
Contributor Author

pvmm commented Jun 10, 2022

Eh, I used the wrong example here. I think it would be useful for generated assembly code when you are generating code on the fly, so you are not expected to edit the file manually and add something like:
length equ $-data

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