EasyManuals Logo

Tandy 1000 Programmer's Reference Guide

Default Icon
251 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #172 background imageLoading...
Page #172 background image
Chapter
4
I
MS-DOS
Disk
Albcation
How
to Use the File Allocation Table
To find the starting cluster
of
the file, use the directory entry.
Next,
to
locate each subsequent cluster
of
the file:
1.
2.
3.
4.
5.
Multiply the cluster number just used by 1.5 (each FAT en-
try
is
1.5
bytes
long).
The whole part of the product is an offset into the FAT,
pointing to the entry that maps the cluster just used. That
entry contains the cluster number
of
the next cluster
of
the
file.
Use
a
MOV
instruction
to
move the word at the calculated
FAT offset into a register.
If the last cluster used was an even number, keep the low-
order 12 bits
of
the register by ANDing it with FFF; other-
wise, keep the high-order 12 bits by shifting the register
right
4
bits with
a
SHR
instruction.
If the resultant 12 bits are FF8H-FFFH, the file contains
no more clusters. Otherwise, the 12 bits contain the cluster
number
of
the next cluster in the file.
To convert the cluster number
to
a logical sector number (rela-
tive sector, such as that used by Interrupts 25H and 26H and by
DEBUG):
1.
2.
3.
Subtract 2 from the cluster number.
Multiply the result by the number
of
sectors per cluster.
Add to this result the logical sector number
of
the begin-
ning
of
the data area.
170

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals