Hey guys, I decided to take up trying to understand the low levels of NesDev, and although I know a good majority of the users use ASM6, I decided to take a stab at CA65 just to see if I can get an understanding of it.
In my project, I decided to break up all of my segments into separate files.
My segment looks like this:
where reset, nmi, and irq are labels in separate files.
This is causing the error that my Vectors segment is 6 bytes over.
Now Vectors is only suppose to be 6 bytes, since all it does is store the address to 3 different parts of the program.
I think I know the why, because import increasing the size of vectors by 6? I am assuming it is because the addresses are being stored twice in the file.
Which brings me to my question. How do I get the compiler to import labels from other files without adding to the file size?
I would like to do this throughout all my work, so it will not be isolated to this incident, and reserving bytes for the labels is just not ideal.
Any help in trying to understand this would be appreciated, thank you in advance.
In my project, I decided to break up all of my segments into separate files.
My segment looks like this:
Code:
.import reset ,nmi ,irq
.segment "VECTORS"
.word nmi
.word reset
.word irq
.segment "VECTORS"
.word nmi
.word reset
.word irq
where reset, nmi, and irq are labels in separate files.
This is causing the error that my Vectors segment is 6 bytes over.
Now Vectors is only suppose to be 6 bytes, since all it does is store the address to 3 different parts of the program.
I think I know the why, because import increasing the size of vectors by 6? I am assuming it is because the addresses are being stored twice in the file.
Which brings me to my question. How do I get the compiler to import labels from other files without adding to the file size?
I would like to do this throughout all my work, so it will not be isolated to this incident, and reserving bytes for the labels is just not ideal.
Any help in trying to understand this would be appreciated, thank you in advance.