TIP: Click on subject to list as thread! ANSI
echo: cis.tandy.coco
to: William Phelps 75100,265
from: Mark Griffith 76070,41
date: 1990-06-05 06:19:17
subject: #4119-#Reading disk tracks

#: 4123 S10/Tandy CoCo
    05-Jun-90  06:19:17
Sb: #4119-#Reading disk tracks
Fm: Mark Griffith 76070,41
To: William Phelps 75100,265

William,

Shouldn't be too hard to read a track.  All you need to do is open the entire
disk as a file, and then seek to the track you want and read it.  You'll need
to calculate the size of each track in bytes and use that figure for seeking
and reading.  For example; a CoCo OS9 360K floppy has 18 256 byte sectors per
track for 4608 bytes per track.  Open the disk as /d0@ and then seek to the
beginning of the file (the first sector), then seek out 4608 bytes.  This
should put you at the start of the second track.  Then read in 4608 bytes.

If you want to make your program smarter, then have it read the data from LSN0
on the size of things.  Look in the Level II manual page 5-2.  The number of
bytes per sector is not there, but I believe all OS9 systems use 256 bytes per
sector.

Mark

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.