Classic Computer Magazine Archive ANTIC VOL. 2, NO. 12 / MARCH 1984

DISKREAD

Check those mysterious disk sectors

by MARTIN REX

SYNOPSIS

This BASIC program allows you to view and edit the contents of any disk sector, and requires a disk drive and at least 16K RAM. A printer is optional. To use this program on an XL series computer, run Translator first (see page 85 this issue). Martin Rex lives in West Germany.

Atari's Disk Operating System (OS) facilitates the loading and storing of information on a disk drive. With DOS, a disk contains 720 sectors, each of which holds 128 bytes of data. If you've ever wondered what is contained in the sectors on a disk, this program will help satisfy your curiosity. However, due to space limitations, we can't go into detail about the meaning of the data on the disk.

H0W TO USE THE PROGRAM

First type in the listing and SAVE a copy for safekeeping. Use TYPO to check for typing errors.

Before using Diskread for the first time, select a disk to examine. Back it up, and use Diskread on the copy only! If there are any typing errors in your version of Diskread, there's a slight possibiIity that it could destroy valuable data on your disk.

Now RUN the program. You will be asked for a sector to be listed; they are numbered from 1 to 720. Try 361 -- this is where the disk directory starts. The disk drive will run for a few seconds, and the contents of the sector will appear on your screen. The left side of the screen represents the data in hexadecimal form. On the right side, the data appears as ASCII characters in inverse video. A menu of choices is listed at the bottom of the screen. Select the desired function by pressing the indicated letter key. (It's not necessary to press [RETURN] after making a selection.)

PROGRAM OPTIONS

F = following sector

This reads and displays the next absolute sector. If you're readind sctor 450, you'll see 451.

N = next sector

If a sector is part of a file that was created by DOS, it contains information that indicates the location of the next consecutive sector (if any) in the file. This function uses this pointer to find the next sector in a file, if applicable.

S = new sector

Use this to skip to another sector. Remember, sectors are numbered from 1 to 720.

B = BASIC

This ends the program.

E = edit

If you choose this mode, the cursor will be placed on the first hexadecimal byte in the sector. You can type in new values for any byte, using the cursor keys to position yourself. To exit this mode, press [RETURN].

W = write new sector

If you edit a sector, you can write the same location on the disk. You are first asked for a confirmation of the write command. Do not use this feature unless you understand all of the implications of your actions. Otherwise, you can lose all of the data on your disk.

H = hardcopy

Make sure a printer is on-line and ready. This function lists the current sector's contents to your printer. The short machine-languag routine at the end of the program permits the rapid listing of the sector's contents to the Screen.

Listing: DISKREAD.BAS Download