Grevle Posted August 13, 2016 Share Posted August 13, 2016 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 locationgoing 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 ? Quote Link to comment Share on other sites More sharing options...
pirx Posted August 13, 2016 Share Posted August 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
Grevle Posted August 13, 2016 Author Share Posted August 13, 2016 (edited) 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 August 13, 2016 by Grevle Quote Link to comment Share on other sites More sharing options...
Rybags Posted August 13, 2016 Share Posted August 13, 2016 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. Quote Link to comment Share on other sites More sharing options...
GoodByteXL Posted August 19, 2016 Share Posted August 19, 2016 Actually it was the addresses from decimal 32767 that where overwritten in the beginning... Shouldn't it be 32768 ($8000) ? As 32767 ($7FFF) is the last address in bank 2 used for bank switching. Quote Link to comment Share on other sites More sharing options...
Grevle Posted August 21, 2016 Author Share Posted August 21, 2016 Shouldn't it be 32768 ($8000) ? As 32767 ($7FFF) is the last address in bank 2 used for bank switching. Your probably right, you know hex system is realy not that familiar to me yet... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.