kc5tja wrote:
This just reaks of "HOMEWORK."
I had to suppose that someone will think about reaks.
No, honestly 6502 programming is just my hobby since childhood.
I am probably not a master in it, but I definitely can write working code and know all 6502 instructions and part of corresponding hexadecimal numbers by heart.
What I do not understand (or what seems somewhat hard to understand) is assemblers.
I am used to write in assembly language directly coding in hexadecimal instructions.
But I am still fail to understand howto use modern assemblers.
When I am writing 6502 code then I decide where to put all variables and/or pointers.
For instance I am often using zero page when do not want to return to host machine os.
I decide how to deal with procedures, functions, howto use records, I am using something like my own calling conventions.
Besides I better understand x86 assembly for gas rather than xa65 because there are for instance .comm directive which is used to allocate variables in the memory.
How to do the same with xa65 without .comm and without defining its address myself to have relocatable .o file?
How to pass variable by reference to function residing in another object?
I am not sure is it possible on the level of modern assemblers di\efine read only variable in .data segment and where is that data segment allocated anyway.
Please, forget about translation, just give me understandable examples.
Thanks