polyex Posted May 11, 2018 Share Posted May 11, 2018 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? Quote Link to comment Share on other sites More sharing options...
thorr Posted May 11, 2018 Share Posted May 11, 2018 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. Quote Link to comment Share on other sites More sharing options...
polyex Posted May 11, 2018 Author Share Posted May 11, 2018 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? Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted May 11, 2018 Share Posted May 11, 2018 First 4 bytes of the B file on disk are the address and length. Quote Link to comment Share on other sites More sharing options...
polyex Posted May 12, 2018 Author Share Posted May 12, 2018 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. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted May 12, 2018 Share Posted May 12, 2018 Try looking with a disk editor. In ProDOS-8, it's filesystem metadata. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted May 15, 2018 Share Posted May 15, 2018 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. Quote Link to comment Share on other sites More sharing options...
youxia Posted May 17, 2018 Share Posted May 17, 2018 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? Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted May 17, 2018 Share Posted May 17, 2018 Same difference. Quote Link to comment Share on other sites More sharing options...
polyex Posted May 17, 2018 Author Share Posted May 17, 2018 Same difference. .DO and .DSK are the same? Quote Link to comment Share on other sites More sharing options...
david__schmidt Posted May 17, 2018 Share Posted May 17, 2018 (edited) 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 May 17, 2018 by david__schmidt 2 Quote Link to comment Share on other sites More sharing options...
youxia Posted May 19, 2018 Share Posted May 19, 2018 That swap trick worked, thanks. But I also have a bunch of files with .PO and .NIB extensions, would it work with these too? Quote Link to comment Share on other sites More sharing options...
david__schmidt Posted May 19, 2018 Share Posted May 19, 2018 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. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted May 19, 2018 Share Posted May 19, 2018 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). Quote Link to comment Share on other sites More sharing options...
youxia Posted May 21, 2018 Share Posted May 21, 2018 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. 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.