Jump to content
polyex

DOS 3.3 Question

Recommended Posts

I have started playing with assembling programs in DOS 3.3 using the built in monitor program and had what I assume is a couple of newbie questions.

 

1) I BSAVE a program at a starting address and end it with a the length. When I BRUN a program how does the command know what address to start at? Where is that stored?

 

 

Share this post


Link to post
Share on other sites

I think it is an attribute of the saved file. You can BLOAD it to a different address if I remember correctly, but the default would be wherever it was saved at originally.

Share this post


Link to post
Share on other sites

I think it is an attribute of the saved file. You can BLOAD it to a different address if I remember correctly, but the default would be wherever it was saved at originally.

 

 

I figured it had to be an attribute saved somewhere, but where?

Share this post


Link to post
Share on other sites

First 4 bytes of the B file on disk are the address and length.

 

Interesting. When I examine the file with a hex editor the first few bytes are my instructions , not an address/length. The whole file looks to be just instructions.

Share this post


Link to post
Share on other sites

 

Interesting. When I examine the file with a hex editor the first few bytes are my instructions , not an address/length. The whole file looks to be just instructions.

 

The hex editor may only be looking at the contents of the file and ignoring the extra bytes. According to "Beneath Apple DOS" page 4-13 figure 4.8, the four byte header is correct: Address L/H and Length L/H. As @The Usotsuki says, you probably need a disk editor to see the raw underlying DOS information in the file rather than just the data of the file.

Share this post


Link to post
Share on other sites

Is there any (easy) way to convert DO to .DSK file format? I'm forced to use Linapple (Retropie) and it only takes .DSK.

 

Pardon if this is not the right place to ask. But I know zilch about Apple II and the above formats apparently relate to DOS 3.3?

Share this post


Link to post
Share on other sites

Is there any (easy) way to convert DO to .DSK file format? I'm forced to use Linapple (Retropie) and it only takes .DSK.

 

"DO" suggests that your image is (already) using DOS sector ordering. There no change besides renaming to whatever.DSK to make Linapple happy. By way of background... DOS sector ordering is the original mapping of physical to logical sectors; sectors 1, 2, 3, etc. are laid out using a skew factor so that they come flying by the read head not in numerical order, but in the order in which DOS is ready to read them. ProDOS changed this order since it always reads two sectors at once, so they're clustered together differently (and due to some code speedups in the core OS, they're skewed differently as well). If a disk was captured in native ProDOS sector order, it would be correctly suffixed with .PO. The naming scheme of "DSK" is ambiguous - it could be either ProDOS or DOS sector ordered. You won't really know unless you inspect it closely and know what to look for; tools like CiderPress and AppleCommander use heuristics to determine which order an image is likely to be. Most newer emulators automatically make the switch to whatever they need as well.

Edited by david__schmidt
  • Like 2

Share this post


Link to post
Share on other sites

That swap trick worked, thanks. But I also have a bunch of files with .PO and .NIB extensions, would it work with these too?

Share this post


Link to post
Share on other sites

That swap trick worked, thanks. But I also have a bunch of files with .PO and .NIB extensions, would it work with these too?

 

.PO - maybe. .NIB - no. Nibble images are their own thing; either an emulator supports them as-is, or it doesn't.

Share this post


Link to post
Share on other sites

If it doesn't Just Work®™©, 143360 byte PO can be converted fairly trivially to DO (just requires switching the sector order around, I have a tool but it's for DOS and I lost the source years ago).

Share this post


Link to post
Share on other sites

Tried it yesterday (po >> dsk) with mixed results: couple of games have worked, couple didn't. May come back to this if I ever find a must-play title that's only .po.

Share this post


Link to post
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.

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