Jump to content
IGNORED

ASM - Load address


Recommended Posts

I'm learning assembly so be kind if this is dumb.

 

Whats the best way to determine the load address when writing a program? One thing I've read said to subtract 1.5K from highest ram location but that seems silly.. Wouldnt that limit the program size to 1.5k?

 

Enlighten me.

Link to comment
Share on other sites

Load address is up to you, but you need to consider the environment, e.g. whether it has to work with a Dos present, whether it works with Basic or a cartridge present.

 

The "top of memory - 1.5K" is more like the upper limit, the real figure is closer to 1K. On a >= 48K machine the Display List will start at $9C20 which is precisely 32 bytes less than 1K.

 

For something that's bootable, e.g. cassette or ATR image the lower limit is generally $480 - the first byte after the cassette buffer. Once a program is loaded it can use the cassette buffer as workspace if required.

 

For something that's to be loadable from Dos - that's a tricky one since there's so many Doses out there and the memory use varies. To be safe, probably $3800. Although Dos 2.x should tolerate partially overwriting the DUP since it's dynamically loaded and can be refetched.

 

For something that coexists with Basic it gets tricky because there might be a Basic program present also.

 

But since Atari is generally a single-tasking system, it's usual that a loaded program will have exclusive use of the system or at most only show consideration for Dos.

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...