Jump to content

Photo

DOS 3.3 Question


14 replies to this topic

#1 polyex OFFLINE  

polyex

    Chopper Commander

  • 169 posts
  • Location:32068

Posted Fri May 11, 2018 2:23 PM

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?

 

 



#2 thorr OFFLINE  

thorr

    Chopper Commander

  • 163 posts

Posted Fri May 11, 2018 2:27 PM

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.



#3 polyex OFFLINE  

polyex

    Chopper Commander

  • Topic Starter
  • 169 posts
  • Location:32068

Posted Fri May 11, 2018 2:42 PM

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? 



#4 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • 1,949 posts
  • Also called "Licca"

Posted Fri May 11, 2018 5:49 PM

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



#5 polyex OFFLINE  

polyex

    Chopper Commander

  • Topic Starter
  • 169 posts
  • Location:32068

Posted Fri May 11, 2018 6:16 PM

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.



#6 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • 1,949 posts
  • Also called "Licca"

Posted Fri May 11, 2018 7:07 PM

Try looking with a disk editor.

 

In ProDOS-8, it's filesystem metadata.



#7 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • 5,221 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon May 14, 2018 11:43 PM

 

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.



#8 youxia OFFLINE  

youxia

    Star Raider

  • 70 posts

Posted Thu May 17, 2018 7:38 AM

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?



#9 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • 1,949 posts
  • Also called "Licca"

Posted Thu May 17, 2018 11:12 AM

Same difference.



#10 polyex OFFLINE  

polyex

    Chopper Commander

  • Topic Starter
  • 169 posts
  • Location:32068

Posted Thu May 17, 2018 1:08 PM

Same difference.

 

.DO and .DSK are the same?



#11 david__schmidt OFFLINE  

david__schmidt

    Chopper Commander

  • 152 posts
  • Location:Southeastern US

Posted Thu May 17, 2018 1:12 PM

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, Thu May 17, 2018 1:21 PM.


#12 youxia OFFLINE  

youxia

    Star Raider

  • 70 posts

Posted Fri May 18, 2018 9:29 PM

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



#13 david__schmidt OFFLINE  

david__schmidt

    Chopper Commander

  • 152 posts
  • Location:Southeastern US

Posted Fri May 18, 2018 11:02 PM

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.



#14 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • 1,949 posts
  • Also called "Licca"

Posted Sat May 19, 2018 1:08 PM

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



#15 youxia OFFLINE  

youxia

    Star Raider

  • 70 posts

Posted Sun May 20, 2018 8:21 PM

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.





Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users