Jump to content
IGNORED

Binary object files on the Atari 8-bit


Recommended Posts

I missed the point a bit... what I meant is you should be able to have a start address of $FFFF and that it shouldn't just ignore successive occurrences of that.

 

e.g.

FF FF - indicate binary

FF FF - start

FF FF - end

nn - data

 

What I was going against is this sort of thing...

 

FF FF - indicate binary

FF FF - indicate binary again

FF FF - and again

A0 00 - start

FF FF - end, this time allowed since "valid" start is provided

nn nn ... etc. - data

Link to comment
Share on other sites

Yep: that's exactly the crux of it, but I'm among those who can't envisage why that would be useful. Moreover, few DOSes can handle such files. My loader only handles them by accident of its design, and therefore (to my surprise) exhibits the robust behaviour being advocated, albeit for no practical reason whatsoever.

Link to comment
Share on other sites

Yep, loading data into the hw IRQ vector is madness at best - regardless of how you implement a replacement OS you still need those valid interrupt vectors .

 

I suppose the other questions to ask might be, what to do if start address is greater than end. Attempt read and do wraparound, read just one byte, skip section altogether.

But I guess really, supporting "bad" binary file behaviour can just encourage more of it.

  • Like 2
Link to comment
Share on other sites

@flashjazzcat: even if it is not much useful don't say it's not binary file...

 

 

Yep, loading data into the hw IRQ vector is madness at best - regardless of how you implement a replacement OS you still need those valid interrupt vectors .

 

not true. if you use xB SIO you can switch off NMI, IRQ, ROM and still fine work with files.
Link to comment
Share on other sites

The problem with supporting $FFFF loads is that it's incompatible with files that are valid to DOS. If you're creating executables, then there's no reason to use $FFFF headers in the middle and it should be avoided for maximum compatibility. On the other hand, a loader can't support the $FFFF load without breaking an executable like this:

FF FF
FF FF
FF FF
40 40 42 40 4C 77 E4
E0 02 E1 02 40 40

Sure, it's bad practice, and not actually guaranteed to work according to Atari's docs either, but that doesn't rule it out from actually existing in a published executable somewhere. I've already seen a fair number of executables that have junk at the end and work because Atari DOS ignores certain I/O errors during exe loads. The executable format is defined by the executables and behavior of DOSes that have been published in the past thirty years, not what we would like the format to be.

 

It's similar to the situation with EXEs that have no run address. The official Atari spec says you can omit it and it will be equivalent to doing an RTS from the run address. The practical spec is that you always need a run address unless you're OK with crashing under SpartaDOS.

 

  • Like 4
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...