Goto 10 RetroComputing: Atari and more

Share this post

Disected! - A disk sector editor in BASIC

www.goto10retro.com

Disected! - A disk sector editor in BASIC

DIsk SECTor EDitor

Paul Lefebvre
Mar 10
4
Share this post

Disected! - A disk sector editor in BASIC

www.goto10retro.com

I wrote about Atari DOSes in this week’s Monday paid post and I continue that topic with a program I wrote back in 1985 called Disected!

It is a DIsk SECTor EDitor and I have to say, I’m kind of proud of that name. It is entirely based around a single machine language routine

1
that is built into the OS to read a sector of data from a disk. With this single routine you could build your own DOS if you wanted to, although certainly not in BASIC.

Disected BASIC source, page 1
Disected
4.77MB ∙ PDF File
Download
Download

As I typed the program in, a couple things jumped out at me. First is the FOR loop on line 160 that does not have a corresponding NEXT. Looking at the code, I don’t even think the FOR loop is even necessary since the string is cleared using the subsequent code.

I also incorrectly used “then” instead of “than” (line 700). I hate that.

Also, when reading a sector in the Atari CR is changed to an asterisk for display purposes. When writing the sector back out, the asterisk is changed to a CR. So if the sector actually had a valid asterisk in it, it would get changed to a CR, corrupting what was there.

If you like these posts, you may want to consider becoming a paid subscriber. You’ll get extra posts on Mondays plus perks. Even better, you can currently save 10% with the Anniversary Sale, ending next week.

Although this is less than 100 lines of code, there is a lot of jumping around and repeated code. Of course, Atari BASIC doesn’t make it easy to reuse code and it all line-based BASICs make it hard to refactor code once it’s written.

Disected Main Menu
Showing Contents of Sector 2

I seem to also have an even more advanced version of this, called 1050 Disk Ed (not as good a name). I have not yet typed this one in as it is much longer, but if memory serves it uses the joystick in some way.

Share

1050disked
6.27MB ∙ PDF File
Download
Download

Related Articles:

Goto 10 RetroComputing: Atari and more
Using DOS on the Atari
As I’ve been learning more about the Commodore 64, one big difference that keeps coming up is how the DOS for the C64 is built into the ROM of the 1541 disk drives. Atari 8-bit computers did not work like that. Instead DOS was loaded from disk. This meant that there could be a lot of different versions of DOS…
Read more
20 days ago · 1 like · Paul Lefebvre
Goto 10 RetroComputing: Atari and more
Improving the 1050 floppy drive with SpartaDOS and US Doubler
As I mentioned in the Wonderful Atari 800XL, we had upgraded our 1050 disk drives with a US Doubler chip. The purpose of this chip was to 1) bring it up from dual-density to true double density and 2) greatly increase the transfer speed. The US Doubler was from ICD, a popular maker of hardware peripherals and enhancements for Atari 8-bits. We also had t…
Read more
a year ago · 2 likes · Paul Lefebvre
1

I believe that the ML routine was from an issue of ANALOG computing.

Share this post

Disected! - A disk sector editor in BASIC

www.goto10retro.com
Previous
Next
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Paul Lefebvre
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing