I start storing my symbols in address 1024, supplied assembler uses address 16 -- confused!

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I start storing my symbols in address 1024, supplied assembler uses address 16 -- confused!

macmee
I created my assembler and it works (even with Pong and it's playable) however I always fail on comparison to what is generated by the supplied assembler.

My problem is this: in the book it suggests associating symbols in addresses from 1024 incrementing, but the built in assembler starts at the address 16.

I am confused. Should I not start at 1024 as the book suggests?
Reply | Threaded
Open this post in threaded view
|

Re: I start storing my symbols in address 1024, supplied assembler uses address 16 -- confused!

cadet1620
Administrator
macmee wrote
My problem is this: in the book it suggests associating symbols in addresses from 1024 incrementing, but the built in assembler starts at the address 16.

I am confused. Should I not start at 1024 as the book suggests?
Your Assembler should start allocating variables at address 16.  From section 6.2.3 in the book:
    Variable Symbols Any symbol Xxx appearing in an assembly
    program that is not predefined and is not defined elsewhere using
    the (Xxx) command is treated as a variable. Variables are mapped
    to consecutive memory locations as they are first encountered,
    starting at RAM address 16 (0x0010).

They reference to 1024 in section 6.1 is hypothetical. As that text says, "these rules depend on the specific target hardware platform."

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: I start storing my symbols in address 1024, supplied assembler uses address 16 -- confused!

macmee
Thanks, that makes perfect sense!