Jump to content
IGNORED

Assembler memory usage issue


Recommended Posts

I have a situation that is somwehat confusing in my program.

program is in mac 65 assembler.

So my main code starts at 35000 decimal memory location

going up to adress 36316 at the moment, And what happen is when i add more code after this point also the adress around 32886 gets filled in, here and upwards my sprite data are stored, so the atasm compiler will give me a warning about these adresses being overwritten, i can fix it by moving sprite data elsehwhere but it would be helpful to understand whats going on.

Btw my assembler program is run via TurboBasix XL with USR command. So theres no change to the Basic program itself in this issue, i only makes changes to the assembler parts at this time.

 

Maybe i bad choice for main program ?

 

 

Link to comment
Share on other sites

study the memory map, consider switching to hexadecimal - this way is easier , e.g. 35000 =$88B8 is not a neat round number at all and in atari different (video) data must start with neat addresses.

 

(example memory map is here http://ftp.pigwa.net/stuff/collections/Atari%20books/Turbo-BASIC%20XL%20-%20Expanded%20Documentation.pdf onpage 32).

 

It looks like maybe $88B8 is high, unless your Basic program is rather big. On the other hand you might want to squash everything below the end of memory ($C000 - graphics).

 

it's a bit hard to say anything more with the data you presented. Anyway, try to reorganise chunks around and it will get better.

Link to comment
Share on other sites

Issue seem to have go away at least for now.. my Basic porpotion of this program is not big and sits where it should be at decimal 13865. yes i moved some of the sprite data closer to the end of memory. Actually it was the adresses from decimal 32767 that where ovewritten in the beginning. atasm did give a warning of the adresses overwritten. adress 32767 is start of user program ram. Maybe Atasm need some space for some allocation stuff around these adresses ? I may also move the main program lower than 35000 when i see how big the Basic porpotion is gonna be, i seems its going to be pretty small afterall.

Edited by Grevle
Link to comment
Share on other sites

AtAsm is a PC-based cross-assembler and doesn't care where your program goes. And it assembles to a file anyway.

Possibly you're changing the location counter and it's overwriting object code already generated.

 

Mac-65 resident on the Atari can assemble to file and it doesn't matter about origin either. Same with most assemblers, so long as the assembly isn't to memory you can do all sorts of things.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...