Remove trailing whitespace, normalize dot commands
This commit is contained in:
parent
d9046beb1d
commit
b773fd6d8c
|
@ -7,8 +7,5 @@ insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
max_line_length=80
|
max_line_length=80
|
||||||
|
|
||||||
[*.txt]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
.ec ^
|
.ec^
|
||||||
.na
|
.na
|
||||||
.ll60
|
.ll60
|
||||||
.m11
|
.m11
|
||||||
.m22
|
.m22
|
||||||
.m48
|
.m48
|
||||||
.fo ''-%-
|
.fo ''-%-
|
||||||
.pn 5
|
.pn5
|
||||||
.pi0
|
.pi0
|
||||||
.br
|
.br
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
CHAPTER 1 - INTRODUCTION
|
CHAPTER 1 - INTRODUCTION
|
||||||
.sp 2
|
.sp2
|
||||||
|
|
||||||
Beneath Apple DOS is intended
|
Beneath Apple DOS is intended
|
||||||
to serve as a companion to Apple's
|
to serve as a companion to Apple's
|
||||||
DOS Manual, providing additional
|
DOS Manual, providing additional
|
||||||
information for the advanced
|
information for the advanced
|
||||||
programmer or
|
programmer or
|
||||||
the novice Apple user who wants to
|
the novice Apple user who wants to
|
||||||
know more about the structure of
|
know more about the structure of
|
||||||
diskettes.
|
diskettes.
|
||||||
It is not the intent of this manual
|
It is not the intent of this manual
|
||||||
to replace the documentation provided
|
to replace the documentation provided
|
||||||
by Apple Computer Inc.
|
by Apple Computer Inc.
|
||||||
Although, for the
|
Although, for the
|
||||||
sake of
|
sake of
|
||||||
continuity, some of the material
|
continuity, some of the material
|
||||||
covered in the Apple manual is also
|
covered in the Apple manual is also
|
||||||
covered here, it will be assumed that
|
covered here, it will be assumed that
|
||||||
the reader is reasonably familiar
|
the reader is reasonably familiar
|
||||||
with the
|
with the
|
||||||
contents of the DOS Manual. Since
|
contents of the DOS Manual. Since
|
||||||
all chapters presented here may not
|
all chapters presented here may not
|
||||||
|
@ -45,7 +45,7 @@ It also draws from application notes,
|
||||||
articles, and discussions with
|
articles, and discussions with
|
||||||
knowledgeable people. This
|
knowledgeable people. This
|
||||||
manual was not prepared with the
|
manual was not prepared with the
|
||||||
assistance of Apple Computer Inc.
|
assistance of Apple Computer Inc.
|
||||||
Although no
|
Although no
|
||||||
guarantee can be made concerning the
|
guarantee can be made concerning the
|
||||||
accuracy of the information
|
accuracy of the information
|
||||||
|
@ -56,7 +56,7 @@ tested.
|
||||||
|
|
||||||
There were several reasons
|
There were several reasons
|
||||||
for writing Beneath Apple DOS:
|
for writing Beneath Apple DOS:
|
||||||
.SP1
|
.sp1
|
||||||
.nf
|
.nf
|
||||||
To show direct assembly language access to DOS.
|
To show direct assembly language access to DOS.
|
||||||
.br
|
.br
|
||||||
|
@ -83,15 +83,15 @@ internal workings of DOS. With the
|
||||||
advent of DOS 3.3, the old 3.2 manual
|
advent of DOS 3.3, the old 3.2 manual
|
||||||
was updated but the body of
|
was updated but the body of
|
||||||
information in it remained
|
information in it remained
|
||||||
essentially intact. Beyond these
|
essentially intact. Beyond these
|
||||||
Apple manuals,
|
Apple manuals,
|
||||||
there have been no significant
|
there have been no significant
|
||||||
additions to the documentation on
|
additions to the documentation on
|
||||||
DOS,
|
DOS,
|
||||||
apart from a few articles in APPLE
|
apart from a few articles in APPLE
|
||||||
user group magazines and newsletters.
|
user group magazines and newsletters.
|
||||||
This manual takes up
|
This manual takes up
|
||||||
where the
|
where the
|
||||||
Disk Operating System
|
Disk Operating System
|
||||||
Manual leaves off.
|
Manual leaves off.
|
||||||
.bp
|
.bp
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
CHAPTER 2 - THE EVOLUTION OF DOS
|
CHAPTER 2 - THE EVOLUTION OF DOS
|
||||||
.sp 2
|
.sp2
|
||||||
|
|
||||||
Since its introduction, Apple DOS has
|
Since its introduction, Apple DOS has
|
||||||
gone through three major versions.
|
gone through three major versions.
|
||||||
|
@ -30,10 +30,10 @@ such, it had a number of bugs. With the
|
||||||
movement towards the APPLE II PLUS
|
movement towards the APPLE II PLUS
|
||||||
and the introduction of the AUTOSTART
|
and the introduction of the AUTOSTART
|
||||||
ROM, a new release was needed.
|
ROM, a new release was needed.
|
||||||
.SP1
|
.sp1
|
||||||
DOS 3.2 - 16 February 1979
|
DOS 3.2 - 16 February 1979
|
||||||
|
|
||||||
Although DOS 3.2 embodied more
|
Although DOS 3.2 embodied more
|
||||||
changes from its
|
changes from its
|
||||||
predecessor than any other release of
|
predecessor than any other release of
|
||||||
DOS, 90% of the basic structure of DOS 3.1
|
DOS, 90% of the basic structure of DOS 3.1
|
||||||
|
@ -77,7 +77,7 @@ can.
|
||||||
|
|
||||||
.bp
|
.bp
|
||||||
- Some DOS commands are allowed to
|
- Some DOS commands are allowed to
|
||||||
create a new file, others will not.
|
create a new file, others will not.
|
||||||
Under DOS 3.1, any reference to a
|
Under DOS 3.1, any reference to a
|
||||||
file that didn't exist, caused it to
|
file that didn't exist, caused it to
|
||||||
be created. This forced DOS 3.1 to
|
be created. This forced DOS 3.1 to
|
||||||
|
@ -140,7 +140,7 @@ creating master diskettes. UPDATE
|
||||||
and allows the HELLO file to be
|
and allows the HELLO file to be
|
||||||
renamed.
|
renamed.
|
||||||
.br
|
.br
|
||||||
.pi0
|
.pi0
|
||||||
.in0
|
.in0
|
||||||
.ps1
|
.ps1
|
||||||
.sp1
|
.sp1
|
||||||
|
@ -163,14 +163,14 @@ new bootstrap and state ROM chips for
|
||||||
the disk controller card which
|
the disk controller card which
|
||||||
provide the capability to
|
provide the capability to
|
||||||
format, read, and write a
|
format, read, and write a
|
||||||
diskette with 16 sectors.
|
diskette with 16 sectors.
|
||||||
(These ROMs are the
|
(These ROMs are the
|
||||||
same ones used with the LANGUAGE
|
same ones used with the LANGUAGE
|
||||||
SYSTEM.)
|
SYSTEM.)
|
||||||
This improvement
|
This improvement
|
||||||
represents almost a 25% increase in
|
represents almost a 25% increase in
|
||||||
available disk space over the old
|
available disk space over the old
|
||||||
13 sector format.
|
13 sector format.
|
||||||
Also included in the 3.3
|
Also included in the 3.3
|
||||||
package is an updated version of the
|
package is an updated version of the
|
||||||
DOS manual, a BASICS diskette (for 13
|
DOS manual, a BASICS diskette (for 13
|
||||||
|
@ -242,7 +242,7 @@ Because the COPY program was rewritten
|
||||||
under 3.3, that restriction no longer
|
under 3.3, that restriction no longer
|
||||||
applies.
|
applies.
|
||||||
.br
|
.br
|
||||||
.pi0
|
.pi0
|
||||||
.in0
|
.in0
|
||||||
.ps1
|
.ps1
|
||||||
.nx ch3.1
|
.nx ch3.1
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
|
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
|
||||||
.sp 2
|
.sp2
|
||||||
|
|
||||||
Apple Computer's excellent manual on
|
Apple Computer's excellent manual on
|
||||||
the Disk Operating System (DOS)
|
the Disk Operating System (DOS)
|
||||||
provides only very basic information
|
provides only very basic information
|
||||||
about how diskettes are formatted.
|
about how diskettes are formatted.
|
||||||
This chapter will explain in detail
|
This chapter will explain in detail
|
||||||
how information is structured on a
|
how information is structured on a
|
||||||
diskette. The first section will
|
diskette. The first section will
|
||||||
|
@ -16,7 +16,7 @@ hardware, and may be skipped by those
|
||||||
already familiar with the DOS manual.
|
already familiar with the DOS manual.
|
||||||
|
|
||||||
For system housekeeping, DOS divides
|
For system housekeeping, DOS divides
|
||||||
diskettes into tracks and sectors.
|
diskettes into tracks and sectors.
|
||||||
This is done during the
|
This is done during the
|
||||||
initialization process. A track is a
|
initialization process. A track is a
|
||||||
physically defined circular path
|
physically defined circular path
|
||||||
|
@ -26,14 +26,14 @@ track is identified by its distance
|
||||||
from the center of the disk. Similar
|
from the center of the disk. Similar
|
||||||
to a phonograph stylus, the
|
to a phonograph stylus, the
|
||||||
read/write head of the disk drive may
|
read/write head of the disk drive may
|
||||||
be positioned over any given track.
|
be positioned over any given track.
|
||||||
The tracks are similar to the grooves
|
The tracks are similar to the grooves
|
||||||
in a record, but they are not
|
in a record, but they are not
|
||||||
connected in a spiral. Much like
|
connected in a spiral. Much like
|
||||||
playing a record, the diskette is
|
playing a record, the diskette is
|
||||||
spun at a constant speed while the
|
spun at a constant speed while the
|
||||||
data is read from or written to its
|
data is read from or written to its
|
||||||
surface with the read/write head.
|
surface with the read/write head.
|
||||||
Apple formats its diskettes into 35
|
Apple formats its diskettes into 35
|
||||||
tracks. They are numbered from 0 to
|
tracks. They are numbered from 0 to
|
||||||
34, track 0 being the outermost track
|
34, track 0 being the outermost track
|
||||||
|
@ -70,7 +70,7 @@ protection schemes.
|
||||||
|
|
||||||
A sector is a subdivision of a track.
|
A sector is a subdivision of a track.
|
||||||
It is the smallest unit of
|
It is the smallest unit of
|
||||||
"updatable" data on the diskette.
|
"updatable" data on the diskette.
|
||||||
DOS generally reads or writes data a
|
DOS generally reads or writes data a
|
||||||
sector at a time. This is to avoid
|
sector at a time. This is to avoid
|
||||||
using a large chunk of memory as a
|
using a large chunk of memory as a
|
||||||
|
@ -86,7 +86,7 @@ locate the first sector of the track.
|
||||||
The implication is that
|
The implication is that
|
||||||
the software must be able
|
the software must be able
|
||||||
to locate any given track and sector
|
to locate any given track and sector
|
||||||
with no help from the hardware.
|
with no help from the hardware.
|
||||||
This scheme, known as "soft sectoring",
|
This scheme, known as "soft sectoring",
|
||||||
takes a little more space
|
takes a little more space
|
||||||
for storage but allows flexibility,
|
for storage but allows flexibility,
|
||||||
|
@ -100,14 +100,14 @@ sector formats.
|
||||||
.ne10
|
.ne10
|
||||||
.nf
|
.nf
|
||||||
DISK ORGANIZATION
|
DISK ORGANIZATION
|
||||||
.SP1
|
.sp1
|
||||||
TRACKS
|
TRACKS
|
||||||
All DOS versions................35
|
All DOS versions................35
|
||||||
.SP1
|
.sp1
|
||||||
SECTORS PER TRACK
|
SECTORS PER TRACK
|
||||||
DOS 3.2.1 and earlier...........13
|
DOS 3.2.1 and earlier...........13
|
||||||
DOS 3.3.........................16
|
DOS 3.3.........................16
|
||||||
.SP1
|
.sp1
|
||||||
SECTORS PER DISKETTE
|
SECTORS PER DISKETTE
|
||||||
DOS 3.2.1 and earlier..........455
|
DOS 3.2.1 and earlier..........455
|
||||||
DOS 3.3........................560
|
DOS 3.3........................560
|
||||||
|
@ -118,15 +118,15 @@ BYTES PER SECTOR
|
||||||
BYTES PER DISKETTE
|
BYTES PER DISKETTE
|
||||||
DOS 3.2.1 and earlier.......116480
|
DOS 3.2.1 and earlier.......116480
|
||||||
DOS 3.3.....................143360
|
DOS 3.3.....................143360
|
||||||
.SP1
|
.sp1
|
||||||
USABLE* SECTORS FOR DATA STORAGE
|
USABLE* SECTORS FOR DATA STORAGE
|
||||||
DOS 3.2.1 and earlier..........403
|
DOS 3.2.1 and earlier..........403
|
||||||
DOS 3.3........................496
|
DOS 3.3........................496
|
||||||
.SP1
|
.sp1
|
||||||
USABLE* BYTES PER DISKETTE
|
USABLE* BYTES PER DISKETTE
|
||||||
DOS 3.2.1 and earlier.......103168
|
DOS 3.2.1 and earlier.......103168
|
||||||
DOS 3.3.....................126976
|
DOS 3.3.....................126976
|
||||||
.SP2
|
.sp2
|
||||||
* Excludes DOS, VTOC, and CATALOG
|
* Excludes DOS, VTOC, and CATALOG
|
||||||
.bp
|
.bp
|
||||||
TRACK FORMATTING
|
TRACK FORMATTING
|
||||||
|
@ -186,12 +186,12 @@ least significant bit cell would be
|
||||||
bit cell 0. When reference is made
|
bit cell 0. When reference is made
|
||||||
to a specific data bit (i.e. data bit
|
to a specific data bit (i.e. data bit
|
||||||
5), it is with respect to the
|
5), it is with respect to the
|
||||||
corresponding bit cell (bit cell 5).
|
corresponding bit cell (bit cell 5).
|
||||||
Data is written and read serially,
|
Data is written and read serially,
|
||||||
one bit at a time. Thus, during a
|
one bit at a time. Thus, during a
|
||||||
write operation, bit cell 7 of each
|
write operation, bit cell 7 of each
|
||||||
byte would be written first, with bit
|
byte would be written first, with bit
|
||||||
cell 0 being written last.
|
cell 0 being written last.
|
||||||
Correspondingly, when data is being
|
Correspondingly, when data is being
|
||||||
read back from the diskette, bit cell
|
read back from the diskette, bit cell
|
||||||
7 is read first and bit cell 0 is
|
7 is read first and bit cell 0 is
|
||||||
|
@ -245,19 +245,19 @@ instructed to write in 32
|
||||||
cycle intervals. If not, zero bits
|
cycle intervals. If not, zero bits
|
||||||
will continue to be written every four
|
will continue to be written every four
|
||||||
cycles, which is, in fact, exactly
|
cycles, which is, in fact, exactly
|
||||||
how self-sync bytes are created.
|
how self-sync bytes are created.
|
||||||
Self-sync bytes will be covered in
|
Self-sync bytes will be covered in
|
||||||
detail shortly.
|
detail shortly.
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.6 HERE ***
|
*** INSERT FIGURE 3.6 HERE ***
|
||||||
|
|
||||||
A "field" is made up of a group of
|
A "field" is made up of a group of
|
||||||
consecutive
|
consecutive
|
||||||
bytes. The number of bytes varies,
|
bytes. The number of bytes varies,
|
||||||
depending upon the nature of the
|
depending upon the nature of the
|
||||||
field. The two types of fields
|
field. The two types of fields
|
||||||
present on a diskette are the Address
|
present on a diskette are the Address
|
||||||
Field and the Data Field. They are
|
Field and the Data Field. They are
|
||||||
similar in that they both contain a
|
similar in that they both contain a
|
||||||
prologue, a data area, a checksum, and
|
prologue, a data area, a checksum, and
|
||||||
an epilogue. Each field on a track is
|
an epilogue. Each field on a track is
|
||||||
|
@ -277,7 +277,7 @@ beneath the read/write head.
|
||||||
All gaps are primarily alike in
|
All gaps are primarily alike in
|
||||||
content, consisting of self-sync
|
content, consisting of self-sync
|
||||||
hexadecimal FF's, and vary only in
|
hexadecimal FF's, and vary only in
|
||||||
the number of bytes they contain.
|
the number of bytes they contain.
|
||||||
Figure 3.7 is a diagram of a portion
|
Figure 3.7 is a diagram of a portion
|
||||||
of a typical track, broken into its
|
of a typical track, broken into its
|
||||||
major components.
|
major components.
|
||||||
|
@ -286,7 +286,7 @@ major components.
|
||||||
|
|
||||||
Self-sync or auto-sync bytes are
|
Self-sync or auto-sync bytes are
|
||||||
special bytes that make up the three
|
special bytes that make up the three
|
||||||
different types of gaps on a track.
|
different types of gaps on a track.
|
||||||
They are so named because of their
|
They are so named because of their
|
||||||
ability to automatically bring the
|
ability to automatically bring the
|
||||||
hardware into synchronization with
|
hardware into synchronization with
|
||||||
|
@ -311,14 +311,14 @@ clock bits from data bits,
|
||||||
the hardware finds
|
the hardware finds
|
||||||
the first bit cell with data in it
|
the first bit cell with data in it
|
||||||
and proceeds to read the following
|
and proceeds to read the following
|
||||||
seven data
|
seven data
|
||||||
bits into the eight bit latch. In
|
bits into the eight bit latch. In
|
||||||
effect, it assumes that it had
|
effect, it assumes that it had
|
||||||
started at the beginning of a data
|
started at the beginning of a data
|
||||||
byte. Of course, in reality, the
|
byte. Of course, in reality, the
|
||||||
odds of its having started at the
|
odds of its having started at the
|
||||||
beginning of a byte are only one in
|
beginning of a byte are only one in
|
||||||
eight.
|
eight.
|
||||||
Pictured in Figure 3.8 is a small
|
Pictured in Figure 3.8 is a small
|
||||||
portion of a track. The clock bits
|
portion of a track. The clock bits
|
||||||
have been stripped out and 0's and
|
have been stripped out and 0's and
|
||||||
|
@ -381,7 +381,7 @@ the track.
|
||||||
|
|
||||||
We can now discuss the particular
|
We can now discuss the particular
|
||||||
portions of a track in detail. The
|
portions of a track in detail. The
|
||||||
three gaps will be covered first.
|
three gaps will be covered first.
|
||||||
Unlike some other disk formats, the
|
Unlike some other disk formats, the
|
||||||
size of the three gap types will vary
|
size of the three gap types will vary
|
||||||
from drive to drive and even from
|
from drive to drive and even from
|
||||||
|
@ -424,13 +424,13 @@ clarity).
|
||||||
.bp
|
.bp
|
||||||
|
|
||||||
Gap 2 appears after each Address
|
Gap 2 appears after each Address
|
||||||
Field and before each Data Field.
|
Field and before each Data Field.
|
||||||
Its length varies from five to ten bytes
|
Its length varies from five to ten bytes
|
||||||
on a normal drive. The primary
|
on a normal drive. The primary
|
||||||
purpose of Gap 2 is to provide time
|
purpose of Gap 2 is to provide time
|
||||||
for the information in an Address
|
for the information in an Address
|
||||||
Field to be decoded by the computer
|
Field to be decoded by the computer
|
||||||
before a read or write takes place.
|
before a read or write takes place.
|
||||||
If the gap were too short, the
|
If the gap were too short, the
|
||||||
beginning of the Data Field might
|
beginning of the Data Field might
|
||||||
spin past while DOS was still
|
spin past while DOS was still
|
||||||
|
@ -444,7 +444,7 @@ will occur in exactly the same spot
|
||||||
each time. This is due to the fact
|
each time. This is due to the fact
|
||||||
that the drive which is rewriting
|
that the drive which is rewriting
|
||||||
the Data Field may not be the one
|
the Data Field may not be the one
|
||||||
which originally INITed or wrote it.
|
which originally INITed or wrote it.
|
||||||
Since the speed of the drives can
|
Since the speed of the drives can
|
||||||
vary, it is possible that the write
|
vary, it is possible that the write
|
||||||
could start in mid-byte. (See Figure
|
could start in mid-byte. (See Figure
|
||||||
|
@ -472,7 +472,7 @@ boundary, thus altering an existing
|
||||||
byte. Figure 3.12 illustrates this.
|
byte. Figure 3.12 illustrates this.
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.11 HERE ***
|
*** INSERT FIGURE 3.11 HERE ***
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 3.12 HERE ***
|
*** INSERT FIGURE 3.12 HERE ***
|
||||||
|
|
||||||
Gap 3 appears after each
|
Gap 3 appears after each
|
||||||
|
@ -485,7 +485,7 @@ additional time needed to manipulate
|
||||||
the data that has been read before
|
the data that has been read before
|
||||||
the next sector is to be read. The
|
the next sector is to be read. The
|
||||||
length of Gap 3 is not as critical as
|
length of Gap 3 is not as critical as
|
||||||
that of Gap 2. If the
|
that of Gap 2. If the
|
||||||
following Address
|
following Address
|
||||||
Field is missed, DOS can always wait
|
Field is missed, DOS can always wait
|
||||||
for the next time it spins around
|
for the next time it spins around
|
||||||
|
@ -503,7 +503,7 @@ An examination of the contents of the
|
||||||
two types of fields is in order.
|
two types of fields is in order.
|
||||||
The Address Field contains
|
The Address Field contains
|
||||||
the "address" or identifying
|
the "address" or identifying
|
||||||
information about the Data Field
|
information about the Data Field
|
||||||
which follows it. The volume, track,
|
which follows it. The volume, track,
|
||||||
and sector number of any given sector
|
and sector number of any given sector
|
||||||
can be thought of as its "address",
|
can be thought of as its "address",
|
||||||
|
@ -519,7 +519,7 @@ Figure 3.13.
|
||||||
|
|
||||||
The prologue consists of three bytes
|
The prologue consists of three bytes
|
||||||
which form a unique sequence, found
|
which form a unique sequence, found
|
||||||
in no other component of the track.
|
in no other component of the track.
|
||||||
This fact enables DOS to locate an
|
This fact enables DOS to locate an
|
||||||
Address Field with almost no
|
Address Field with almost no
|
||||||
possibility of error. The three
|
possibility of error. The three
|
||||||
|
@ -539,7 +539,7 @@ where it is positioned on a
|
||||||
particular diskette. The checksum is
|
particular diskette. The checksum is
|
||||||
computed by exclusive-ORing the first
|
computed by exclusive-ORing the first
|
||||||
three pieces of information, and is
|
three pieces of information, and is
|
||||||
used to verify its integrity.
|
used to verify its integrity.
|
||||||
Lastly follows the epilogue, which
|
Lastly follows the epilogue, which
|
||||||
contains the three bytes $DE, $AA and
|
contains the three bytes $DE, $AA and
|
||||||
$EB. Oddly, the $EB is always written
|
$EB. Oddly, the $EB is always written
|
||||||
|
@ -558,14 +558,14 @@ Field. Much like the Address Field,
|
||||||
it consists of a prologue, data,
|
it consists of a prologue, data,
|
||||||
checksum, and an epilogue. (Refer to
|
checksum, and an epilogue. (Refer to
|
||||||
Figure 3.14) The prologue is
|
Figure 3.14) The prologue is
|
||||||
different only in the third byte.
|
different only in the third byte.
|
||||||
The bytes are $D5, $AA, and $AD,
|
The bytes are $D5, $AA, and $AD,
|
||||||
which again form a unique sequence,
|
which again form a unique sequence,
|
||||||
enabling DOS to locate the beginning
|
enabling DOS to locate the beginning
|
||||||
of the sector data. The data
|
of the sector data. The data
|
||||||
consists of 342 bytes of encoded
|
consists of 342 bytes of encoded
|
||||||
data. The encoding scheme used will
|
data. The encoding scheme used will
|
||||||
be discussed in the next section.
|
be discussed in the next section.
|
||||||
The data is followed by a checksum
|
The data is followed by a checksum
|
||||||
byte, used to verify the integrity of
|
byte, used to verify the integrity of
|
||||||
the data just read. The epilogue
|
the data just read. The epilogue
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
|
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
|
||||||
.sp 2
|
.sp2
|
||||||
|
|
||||||
Apple Computer's excellent manual on
|
Apple Computer's excellent manual on
|
||||||
the Disk Operating System (DOS)
|
the Disk Operating System (DOS)
|
||||||
provides only very basic information
|
provides only very basic information
|
||||||
about how diskettes are formatted.
|
about how diskettes are formatted.
|
||||||
This chapter will explain in detail
|
This chapter will explain in detail
|
||||||
how information is structured on a
|
how information is structured on a
|
||||||
diskette. The first section will
|
diskette. The first section will
|
||||||
|
@ -16,7 +16,7 @@ hardware, and may be skipped by those
|
||||||
already familiar with the DOS manual.
|
already familiar with the DOS manual.
|
||||||
|
|
||||||
For system housekeeping, DOS divides
|
For system housekeeping, DOS divides
|
||||||
diskettes into tracks and sectors.
|
diskettes into tracks and sectors.
|
||||||
This is done during the
|
This is done during the
|
||||||
initialization process. A track is a
|
initialization process. A track is a
|
||||||
physically defined circular path
|
physically defined circular path
|
||||||
|
@ -26,14 +26,14 @@ track is identified by its distance
|
||||||
from the center of the disk. Similar
|
from the center of the disk. Similar
|
||||||
to a phonograph stylus, the
|
to a phonograph stylus, the
|
||||||
read/write head of the disk drive may
|
read/write head of the disk drive may
|
||||||
be positioned over any given track.
|
be positioned over any given track.
|
||||||
The tracks are similar to the grooves
|
The tracks are similar to the grooves
|
||||||
in a record, but they are not
|
in a record, but they are not
|
||||||
connected in a spiral. Much like
|
connected in a spiral. Much like
|
||||||
playing a record, the diskette is
|
playing a record, the diskette is
|
||||||
spun at a constant speed while the
|
spun at a constant speed while the
|
||||||
data is read from or written to its
|
data is read from or written to its
|
||||||
surface with the read/write head.
|
surface with the read/write head.
|
||||||
Apple formats its diskettes into 35
|
Apple formats its diskettes into 35
|
||||||
tracks. They are numbered from 0 to
|
tracks. They are numbered from 0 to
|
||||||
34, track 0 being the outermost track
|
34, track 0 being the outermost track
|
||||||
|
@ -70,7 +70,7 @@ protection schemes.
|
||||||
|
|
||||||
A sector is a subdivision of a track.
|
A sector is a subdivision of a track.
|
||||||
It is the smallest unit of
|
It is the smallest unit of
|
||||||
"updatable" data on the diskette.
|
"updatable" data on the diskette.
|
||||||
DOS generally reads or writes data a
|
DOS generally reads or writes data a
|
||||||
sector at a time. This is to avoid
|
sector at a time. This is to avoid
|
||||||
using a large chunk of memory as a
|
using a large chunk of memory as a
|
||||||
|
@ -86,7 +86,7 @@ locate the first sector of the track.
|
||||||
The implication is that
|
The implication is that
|
||||||
the software must be able
|
the software must be able
|
||||||
to locate any given track and sector
|
to locate any given track and sector
|
||||||
with no help from the hardware.
|
with no help from the hardware.
|
||||||
This scheme, known as "soft sectoring",
|
This scheme, known as "soft sectoring",
|
||||||
takes a little more space
|
takes a little more space
|
||||||
for storage but allows flexibility,
|
for storage but allows flexibility,
|
||||||
|
@ -100,14 +100,14 @@ sector formats.
|
||||||
.ne10
|
.ne10
|
||||||
.nf
|
.nf
|
||||||
DISK ORGANIZATION
|
DISK ORGANIZATION
|
||||||
.SP1
|
.sp1
|
||||||
TRACKS
|
TRACKS
|
||||||
All DOS versions................35
|
All DOS versions................35
|
||||||
.SP1
|
.sp1
|
||||||
SECTORS PER TRACK
|
SECTORS PER TRACK
|
||||||
DOS 3.2.1 and earlier...........13
|
DOS 3.2.1 and earlier...........13
|
||||||
DOS 3.3.........................16
|
DOS 3.3.........................16
|
||||||
.SP1
|
.sp1
|
||||||
SECTORS PER DISKETTE
|
SECTORS PER DISKETTE
|
||||||
DOS 3.2.1 and earlier..........455
|
DOS 3.2.1 and earlier..........455
|
||||||
DOS 3.3........................560
|
DOS 3.3........................560
|
||||||
|
@ -118,15 +118,15 @@ BYTES PER SECTOR
|
||||||
BYTES PER DISKETTE
|
BYTES PER DISKETTE
|
||||||
DOS 3.2.1 and earlier.......116480
|
DOS 3.2.1 and earlier.......116480
|
||||||
DOS 3.3.....................143360
|
DOS 3.3.....................143360
|
||||||
.SP1
|
.sp1
|
||||||
USABLE* SECTORS FOR DATA STORAGE
|
USABLE* SECTORS FOR DATA STORAGE
|
||||||
DOS 3.2.1 and earlier..........403
|
DOS 3.2.1 and earlier..........403
|
||||||
DOS 3.3........................496
|
DOS 3.3........................496
|
||||||
.SP1
|
.sp1
|
||||||
USABLE* BYTES PER DISKETTE
|
USABLE* BYTES PER DISKETTE
|
||||||
DOS 3.2.1 and earlier.......103168
|
DOS 3.2.1 and earlier.......103168
|
||||||
DOS 3.3.....................126976
|
DOS 3.3.....................126976
|
||||||
.SP2
|
.sp2
|
||||||
* Excludes DOS, VTOC, and CATALOG
|
* Excludes DOS, VTOC, and CATALOG
|
||||||
.bp
|
.bp
|
||||||
TRACK FORMATTING
|
TRACK FORMATTING
|
||||||
|
@ -186,12 +186,12 @@ least significant bit cell would be
|
||||||
bit cell 0. When reference is made
|
bit cell 0. When reference is made
|
||||||
to a specific data bit (i.e. data bit
|
to a specific data bit (i.e. data bit
|
||||||
5), it is with respect to the
|
5), it is with respect to the
|
||||||
corresponding bit cell (bit cell 5).
|
corresponding bit cell (bit cell 5).
|
||||||
Data is written and read serially,
|
Data is written and read serially,
|
||||||
one bit at a time. Thus, during a
|
one bit at a time. Thus, during a
|
||||||
write operation, bit cell 7 of each
|
write operation, bit cell 7 of each
|
||||||
byte would be written first, with bit
|
byte would be written first, with bit
|
||||||
cell 0 being written last.
|
cell 0 being written last.
|
||||||
Correspondingly, when data is being
|
Correspondingly, when data is being
|
||||||
read back from the diskette, bit cell
|
read back from the diskette, bit cell
|
||||||
7 is read first and bit cell 0 is
|
7 is read first and bit cell 0 is
|
||||||
|
@ -245,19 +245,19 @@ instructed to write in 32
|
||||||
cycle intervals. If not, zero bits
|
cycle intervals. If not, zero bits
|
||||||
will continue to be written every four
|
will continue to be written every four
|
||||||
cycles, which is, in fact, exactly
|
cycles, which is, in fact, exactly
|
||||||
how self-sync bytes are created.
|
how self-sync bytes are created.
|
||||||
Self-sync bytes will be covered in
|
Self-sync bytes will be covered in
|
||||||
detail shortly.
|
detail shortly.
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.6 HERE ***
|
*** INSERT FIGURE 3.6 HERE ***
|
||||||
|
|
||||||
A "field" is made up of a group of
|
A "field" is made up of a group of
|
||||||
consecutive
|
consecutive
|
||||||
bytes. The number of bytes varies,
|
bytes. The number of bytes varies,
|
||||||
depending upon the nature of the
|
depending upon the nature of the
|
||||||
field. The two types of fields
|
field. The two types of fields
|
||||||
present on a diskette are the Address
|
present on a diskette are the Address
|
||||||
Field and the Data Field. They are
|
Field and the Data Field. They are
|
||||||
similar in that they both contain a
|
similar in that they both contain a
|
||||||
prologue, a data area, a checksum, and
|
prologue, a data area, a checksum, and
|
||||||
an epilogue. Each field on a track is
|
an epilogue. Each field on a track is
|
||||||
|
@ -277,7 +277,7 @@ beneath the read/write head.
|
||||||
All gaps are primarily alike in
|
All gaps are primarily alike in
|
||||||
content, consisting of self-sync
|
content, consisting of self-sync
|
||||||
hexadecimal FF's, and vary only in
|
hexadecimal FF's, and vary only in
|
||||||
the number of bytes they contain.
|
the number of bytes they contain.
|
||||||
Figure 3.7 is a diagram of a portion
|
Figure 3.7 is a diagram of a portion
|
||||||
of a typical track, broken into its
|
of a typical track, broken into its
|
||||||
major components.
|
major components.
|
||||||
|
@ -286,7 +286,7 @@ major components.
|
||||||
|
|
||||||
Self-sync or auto-sync bytes are
|
Self-sync or auto-sync bytes are
|
||||||
special bytes that make up the three
|
special bytes that make up the three
|
||||||
different types of gaps on a track.
|
different types of gaps on a track.
|
||||||
They are so named because of their
|
They are so named because of their
|
||||||
ability to automatically bring the
|
ability to automatically bring the
|
||||||
hardware into synchronization with
|
hardware into synchronization with
|
||||||
|
@ -311,14 +311,14 @@ clock bits from data bits,
|
||||||
the hardware finds
|
the hardware finds
|
||||||
the first bit cell with data in it
|
the first bit cell with data in it
|
||||||
and proceeds to read the following
|
and proceeds to read the following
|
||||||
seven data
|
seven data
|
||||||
bits into the eight bit latch. In
|
bits into the eight bit latch. In
|
||||||
effect, it assumes that it had
|
effect, it assumes that it had
|
||||||
started at the beginning of a data
|
started at the beginning of a data
|
||||||
byte. Of course, in reality, the
|
byte. Of course, in reality, the
|
||||||
odds of its having started at the
|
odds of its having started at the
|
||||||
beginning of a byte are only one in
|
beginning of a byte are only one in
|
||||||
eight.
|
eight.
|
||||||
Pictured in Figure 3.8 is a small
|
Pictured in Figure 3.8 is a small
|
||||||
portion of a track. The clock bits
|
portion of a track. The clock bits
|
||||||
have been stripped out and 0's and
|
have been stripped out and 0's and
|
||||||
|
@ -381,7 +381,7 @@ the track.
|
||||||
|
|
||||||
We can now discuss the particular
|
We can now discuss the particular
|
||||||
portions of a track in detail. The
|
portions of a track in detail. The
|
||||||
three gaps will be covered first.
|
three gaps will be covered first.
|
||||||
Unlike some other disk formats, the
|
Unlike some other disk formats, the
|
||||||
size of the three gap types will vary
|
size of the three gap types will vary
|
||||||
from drive to drive and even from
|
from drive to drive and even from
|
||||||
|
@ -424,13 +424,13 @@ clarity).
|
||||||
.bp
|
.bp
|
||||||
|
|
||||||
Gap 2 appears after each Address
|
Gap 2 appears after each Address
|
||||||
Field and before each Data Field.
|
Field and before each Data Field.
|
||||||
Its length varies from five to ten bytes
|
Its length varies from five to ten bytes
|
||||||
on a normal drive. The primary
|
on a normal drive. The primary
|
||||||
purpose of Gap 2 is to provide time
|
purpose of Gap 2 is to provide time
|
||||||
for the information in an Address
|
for the information in an Address
|
||||||
Field to be decoded by the computer
|
Field to be decoded by the computer
|
||||||
before a read or write takes place.
|
before a read or write takes place.
|
||||||
If the gap were too short, the
|
If the gap were too short, the
|
||||||
beginning of the Data Field might
|
beginning of the Data Field might
|
||||||
spin past while DOS was still
|
spin past while DOS was still
|
||||||
|
@ -444,7 +444,7 @@ will occur in exactly the same spot
|
||||||
each time. This is due to the fact
|
each time. This is due to the fact
|
||||||
that the drive which is rewriting
|
that the drive which is rewriting
|
||||||
the Data Field may not be the one
|
the Data Field may not be the one
|
||||||
which originally INITed or wrote it.
|
which originally INITed or wrote it.
|
||||||
Since the speed of the drives can
|
Since the speed of the drives can
|
||||||
vary, it is possible that the write
|
vary, it is possible that the write
|
||||||
could start in mid-byte. (See Figure
|
could start in mid-byte. (See Figure
|
||||||
|
@ -472,7 +472,7 @@ boundary, thus altering an existing
|
||||||
byte. Figure 3.12 illustrates this.
|
byte. Figure 3.12 illustrates this.
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.11 HERE ***
|
*** INSERT FIGURE 3.11 HERE ***
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 3.12 HERE ***
|
*** INSERT FIGURE 3.12 HERE ***
|
||||||
|
|
||||||
Gap 3 appears after each
|
Gap 3 appears after each
|
||||||
|
@ -485,7 +485,7 @@ additional time needed to manipulate
|
||||||
the data that has been read before
|
the data that has been read before
|
||||||
the next sector is to be read. The
|
the next sector is to be read. The
|
||||||
length of Gap 3 is not as critical as
|
length of Gap 3 is not as critical as
|
||||||
that of Gap 2. If the
|
that of Gap 2. If the
|
||||||
following Address
|
following Address
|
||||||
Field is missed, DOS can always wait
|
Field is missed, DOS can always wait
|
||||||
for the next time it spins around
|
for the next time it spins around
|
||||||
|
@ -503,7 +503,7 @@ An examination of the contents of the
|
||||||
two types of fields is in order.
|
two types of fields is in order.
|
||||||
The Address Field contains
|
The Address Field contains
|
||||||
the "address" or identifying
|
the "address" or identifying
|
||||||
information about the Data Field
|
information about the Data Field
|
||||||
which follows it. The volume, track,
|
which follows it. The volume, track,
|
||||||
and sector number of any given sector
|
and sector number of any given sector
|
||||||
can be thought of as its "address",
|
can be thought of as its "address",
|
||||||
|
@ -519,7 +519,7 @@ Figure 3.13.
|
||||||
|
|
||||||
The prologue consists of three bytes
|
The prologue consists of three bytes
|
||||||
which form a unique sequence, found
|
which form a unique sequence, found
|
||||||
in no other component of the track.
|
in no other component of the track.
|
||||||
This fact enables DOS to locate an
|
This fact enables DOS to locate an
|
||||||
Address Field with almost no
|
Address Field with almost no
|
||||||
possibility of error. The three
|
possibility of error. The three
|
||||||
|
@ -539,7 +539,7 @@ where it is positioned on a
|
||||||
particular diskette. The checksum is
|
particular diskette. The checksum is
|
||||||
computed by exclusive-ORing the first
|
computed by exclusive-ORing the first
|
||||||
three pieces of information, and is
|
three pieces of information, and is
|
||||||
used to verify its integrity.
|
used to verify its integrity.
|
||||||
Lastly follows the epilogue, which
|
Lastly follows the epilogue, which
|
||||||
contains the three bytes $DE, $AA and
|
contains the three bytes $DE, $AA and
|
||||||
$EB. Oddly, the $EB is always written
|
$EB. Oddly, the $EB is always written
|
||||||
|
@ -558,6 +558,6 @@ Field. Much like the Address Field,
|
||||||
it consists of a prologue, data,
|
it consists of a prologue, data,
|
||||||
checksum, and an epilogue. (Refer to
|
checksum, and an epilogue. (Refer to
|
||||||
Figure 3.14) The prologue is
|
Figure 3.14) The prologue is
|
||||||
different only in the third byte.
|
different only in the third byte.
|
||||||
The bytes are $D5, $AA, and $AD,
|
The bytes are $D5, $AA, and $AD,
|
||||||
which again form a
|
which again form a
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
.SP2
|
.sp2
|
||||||
DATA FIELD ENCODING
|
DATA FIELD ENCODING
|
||||||
|
|
||||||
Due to Apple's hardware, it is not
|
Due to Apple's hardware, it is not
|
||||||
possible to read all 256 possible
|
possible to read all 256 possible
|
||||||
byte values from a diskette.
|
byte values from a diskette.
|
||||||
This is not a great problem, but it
|
This is not a great problem, but it
|
||||||
does require that the data written to
|
does require that the data written to
|
||||||
the disk be encoded. Three different
|
the disk be encoded. Three different
|
||||||
|
@ -17,7 +17,7 @@ bits. It would thus require 512
|
||||||
"disk" bytes for each 256 byte sector
|
"disk" bytes for each 256 byte sector
|
||||||
of data. Had this technique been used
|
of data. Had this technique been used
|
||||||
for sector data, no more than 10
|
for sector data, no more than 10
|
||||||
sectors would have fit on a track.
|
sectors would have fit on a track.
|
||||||
This amounts to about 88K of data per
|
This amounts to about 88K of data per
|
||||||
diskette, or roughly 72K of space
|
diskette, or roughly 72K of space
|
||||||
available to the user; typical for 5
|
available to the user; typical for 5
|
||||||
|
@ -43,7 +43,7 @@ comparable drives of the day.
|
||||||
Currently, of course, DOS 3.3
|
Currently, of course, DOS 3.3
|
||||||
features 16 sectors per track and
|
features 16 sectors per track and
|
||||||
provides a 23% increase in disk
|
provides a 23% increase in disk
|
||||||
storage over the 13 sector format.
|
storage over the 13 sector format.
|
||||||
This was made possible by a hardware
|
This was made possible by a hardware
|
||||||
modification (the P6 PROM on the disk
|
modification (the P6 PROM on the disk
|
||||||
controller card) which allowed a "6
|
controller card) which allowed a "6
|
||||||
|
@ -55,7 +55,7 @@ bytes.
|
||||||
|
|
||||||
These three different encoding
|
These three different encoding
|
||||||
techniques
|
techniques
|
||||||
will now be covered in some detail.
|
will now be covered in some detail.
|
||||||
The hardware for DOS 3.2.1 (and
|
The hardware for DOS 3.2.1 (and
|
||||||
earlier versions of DOS) imposed a
|
earlier versions of DOS) imposed a
|
||||||
number of restrictions upon how data
|
number of restrictions upon how data
|
||||||
|
@ -86,7 +86,7 @@ contained in the Address Field. It
|
||||||
is quite easy to decode the data, since the
|
is quite easy to decode the data, since the
|
||||||
byte with the odd bits is simply
|
byte with the odd bits is simply
|
||||||
shifted left and logically ANDed with
|
shifted left and logically ANDed with
|
||||||
the byte containing the even bits.
|
the byte containing the even bits.
|
||||||
This is illustrated in Figure 3.16.
|
This is illustrated in Figure 3.16.
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.16 HERE ***
|
*** INSERT FIGURE 3.16 HERE ***
|
||||||
|
@ -121,7 +121,7 @@ bytes, thus leaving an exact mapping
|
||||||
between five bit data bytes and eight bit
|
between five bit data bytes and eight bit
|
||||||
"disk" bytes. The process of
|
"disk" bytes. The process of
|
||||||
converting eight bit data bytes to eight bit
|
converting eight bit data bytes to eight bit
|
||||||
"disk" bytes, then, is twofold.
|
"disk" bytes, then, is twofold.
|
||||||
An overview is diagrammed in Figure
|
An overview is diagrammed in Figure
|
||||||
3.17.
|
3.17.
|
||||||
.sp1
|
.sp1
|
||||||
|
@ -132,7 +132,7 @@ up a sector must be translated to
|
||||||
five bit bytes. This is done by the
|
five bit bytes. This is done by the
|
||||||
"prenibble" routine at $B800. It is
|
"prenibble" routine at $B800. It is
|
||||||
a fairly involved process, involving
|
a fairly involved process, involving
|
||||||
a good deal of bit rearrangement.
|
a good deal of bit rearrangement.
|
||||||
Figure 3.18 shows the before and
|
Figure 3.18 shows the before and
|
||||||
after of prenibbilizing. On the left
|
after of prenibbilizing. On the left
|
||||||
is a buffer of eight bit data bytes, as
|
is a buffer of eight bit data bytes, as
|
||||||
|
@ -141,7 +141,7 @@ package by DOS. Each byte in this
|
||||||
buffer is represented by a letter (A,
|
buffer is represented by a letter (A,
|
||||||
B, C, etc.) and each bit by a number
|
B, C, etc.) and each bit by a number
|
||||||
(7 through 0). On the right side are
|
(7 through 0). On the right side are
|
||||||
the results of the transformation.
|
the results of the transformation.
|
||||||
The primary buffer contains five
|
The primary buffer contains five
|
||||||
distinct areas of five bit bytes (the
|
distinct areas of five bit bytes (the
|
||||||
top three bits of the eight bit bytes
|
top three bits of the eight bit bytes
|
||||||
|
@ -194,7 +194,7 @@ the checksum computation to decode
|
||||||
data, the
|
data, the
|
||||||
transformation shown in Figure 3.20
|
transformation shown in Figure 3.20
|
||||||
greatly facilitates the time
|
greatly facilitates the time
|
||||||
constraint. As the data is being
|
constraint. As the data is being
|
||||||
read from a sector the accumulator
|
read from a sector the accumulator
|
||||||
contains the cumulative result of
|
contains the cumulative result of
|
||||||
all previous bytes, exclusive-ORed
|
all previous bytes, exclusive-ORed
|
||||||
|
@ -230,7 +230,7 @@ with only 64 needed. An additional
|
||||||
requirement was introduced to force
|
requirement was introduced to force
|
||||||
the mapping to be one to one, namely,
|
the mapping to be one to one, namely,
|
||||||
that there must be at least two
|
that there must be at least two
|
||||||
adjacent bits set, excluding bit 7.
|
adjacent bits set, excluding bit 7.
|
||||||
This produces exactly 64 valid "disk"
|
This produces exactly 64 valid "disk"
|
||||||
values. The initial transformation
|
values. The initial transformation
|
||||||
is done by the prenibble routine
|
is done by the prenibble routine
|
||||||
|
@ -301,7 +301,7 @@ into a "pseudo" or soft sector number
|
||||||
used by DOS. For example, if the
|
used by DOS. For example, if the
|
||||||
sector number found on the disk were a
|
sector number found on the disk were a
|
||||||
2, this is used as an offset into a
|
2, this is used as an offset into a
|
||||||
table where the number $0B is found.
|
table where the number $0B is found.
|
||||||
Thus, DOS treats the physical sector
|
Thus, DOS treats the physical sector
|
||||||
2 as sector 11 ($0B) for all intents
|
2 as sector 11 ($0B) for all intents
|
||||||
and purposes. This presents no
|
and purposes. This presents no
|
||||||
|
@ -322,7 +322,7 @@ access time.
|
||||||
|
|
||||||
It is interesting to point out that
|
It is interesting to point out that
|
||||||
Pascal, Fortran, and CP/M diskettes
|
Pascal, Fortran, and CP/M diskettes
|
||||||
all use software interleaving also.
|
all use software interleaving also.
|
||||||
However, each uses a different
|
However, each uses a different
|
||||||
sector order. A comparison of these
|
sector order. A comparison of these
|
||||||
differences is presented in Figure
|
differences is presented in Figure
|
||||||
|
@ -330,4 +330,4 @@ differences is presented in Figure
|
||||||
.sp1
|
.sp1
|
||||||
*** INSERT FIGURE 3.24 (22) HERE ***
|
*** INSERT FIGURE 3.24 (22) HERE ***
|
||||||
.br
|
.br
|
||||||
.nxch4
|
.nx ch4
|
||||||
|
|
|
@ -38,7 +38,7 @@ with new files or expansions of
|
||||||
existing files. An example of the way
|
existing files. An example of the way
|
||||||
DOS uses sectors is given in Figure
|
DOS uses sectors is given in Figure
|
||||||
4.1.
|
4.1.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.1 ***
|
*** INSERT FIGURE 4.1 ***
|
||||||
.sp1
|
.sp1
|
||||||
DISKETTE SPACE ALLOCATION
|
DISKETTE SPACE ALLOCATION
|
||||||
|
@ -96,7 +96,7 @@ following format (all byte offsets are
|
||||||
given in base 16, hexadecimal):
|
given in base 16, hexadecimal):
|
||||||
.np
|
.np
|
||||||
VOLUME TABLE OF CONTENTS (VTOC) FORMAT
|
VOLUME TABLE OF CONTENTS (VTOC) FORMAT
|
||||||
.SP1
|
.sp1
|
||||||
.un
|
.un
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Not used
|
00 Not used
|
||||||
|
@ -126,14 +126,14 @@ C4-FF Bit maps for additional tracks if there are more
|
||||||
than 35 tracks per diskette
|
than 35 tracks per diskette
|
||||||
.bp
|
.bp
|
||||||
BIT MAPS OF FREE SECTORS ON A GIVEN TRACK
|
BIT MAPS OF FREE SECTORS ON A GIVEN TRACK
|
||||||
.SP1
|
.sp1
|
||||||
A four byte binary string of ones and zeros,
|
A four byte binary string of ones and zeros,
|
||||||
representing free and allocated sectors respectively.
|
representing free and allocated sectors respectively.
|
||||||
Hexadecimal sector numbers are assigned to bit
|
Hexadecimal sector numbers are assigned to bit
|
||||||
positions as follows:
|
positions as follows:
|
||||||
.sp1
|
.sp1
|
||||||
BYTE SECTORS
|
BYTE SECTORS
|
||||||
+0 FEDC BA98
|
+0 FEDC BA98
|
||||||
+1 7654 3210
|
+1 7654 3210
|
||||||
+2 .... .... (not used)
|
+2 .... .... (not used)
|
||||||
+3 .... .... (not used)
|
+3 .... .... (not used)
|
||||||
|
@ -151,7 +151,7 @@ An example of a VTOC sector is given
|
||||||
in Figure 4.2. This VTOC corresponds
|
in Figure 4.2. This VTOC corresponds
|
||||||
to the map of the diskette given in
|
to the map of the diskette given in
|
||||||
Figure 4.1.
|
Figure 4.1.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.2 ***
|
*** INSERT FIGURE 4.2 ***
|
||||||
.bp
|
.bp
|
||||||
THE CATALOG
|
THE CATALOG
|
||||||
|
@ -187,7 +187,7 @@ sector (sector 1)
|
||||||
has a zero pointer to indicate
|
has a zero pointer to indicate
|
||||||
that there are no more catalog
|
that there are no more catalog
|
||||||
sectors in the chain.
|
sectors in the chain.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.3 ***
|
*** INSERT FIGURE 4.3 ***
|
||||||
|
|
||||||
In each catalog
|
In each catalog
|
||||||
|
@ -203,8 +203,8 @@ described on the following page.
|
||||||
.sp1
|
.sp1
|
||||||
.np
|
.np
|
||||||
CATALOG SECTOR FORMAT
|
CATALOG SECTOR FORMAT
|
||||||
.SP1
|
.sp1
|
||||||
.UN
|
.un
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Not used
|
00 Not used
|
||||||
01 Track number of next catalog sector (usually 11 hex)
|
01 Track number of next catalog sector (usually 11 hex)
|
||||||
|
@ -219,9 +219,9 @@ BA-DC Sixth file descriptive entry
|
||||||
DD-FF Seventh file descriptive entry
|
DD-FF Seventh file descriptive entry
|
||||||
.bp
|
.bp
|
||||||
FILE DESCRIPTIVE ENTRY FORMAT
|
FILE DESCRIPTIVE ENTRY FORMAT
|
||||||
.SP1
|
.sp1
|
||||||
RELATIVE
|
RELATIVE
|
||||||
.UN
|
.un
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Track of first track/sector list sector.
|
00 Track of first track/sector list sector.
|
||||||
If this is a deleted file, this byte contains a hex
|
If this is a deleted file, this byte contains a hex
|
||||||
|
@ -260,9 +260,9 @@ was needed to describe them. There
|
||||||
are four entries in use and three
|
are four entries in use and three
|
||||||
entries which have never been used
|
entries which have never been used
|
||||||
and contain zeros.
|
and contain zeros.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.4 ***
|
*** INSERT FIGURE 4.4 ***
|
||||||
.SP1
|
.sp1
|
||||||
THE TRACK/SECTOR LIST
|
THE TRACK/SECTOR LIST
|
||||||
|
|
||||||
Each file has
|
Each file has
|
||||||
|
@ -276,7 +276,7 @@ sector points to this T/S List sector
|
||||||
which, in turn, points to each sector
|
which, in turn, points to each sector
|
||||||
in the file. This concept is
|
in the file. This concept is
|
||||||
diagramed in Figure 4.5.
|
diagramed in Figure 4.5.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.5 ***
|
*** INSERT FIGURE 4.5 ***
|
||||||
.bp
|
.bp
|
||||||
The format of a Track/Sector List
|
The format of a Track/Sector List
|
||||||
|
@ -317,9 +317,9 @@ have no data sectors allocated
|
||||||
in the T/S List. This distinction is not always handled
|
in the T/S List. This distinction is not always handled
|
||||||
correctly by DOS. The VERIFY command, for instance, stops when
|
correctly by DOS. The VERIFY command, for instance, stops when
|
||||||
it gets to the first zero T/S List entry and can not be used
|
it gets to the first zero T/S List entry and can not be used
|
||||||
to verify some random organization text files.
|
to verify some random organization text files.
|
||||||
|
|
||||||
An example T/S List sector is given in Figure 4.6.
|
An example T/S List sector is given in Figure 4.6.
|
||||||
The example file (HELLO, from our
|
The example file (HELLO, from our
|
||||||
previous examples) has only one data
|
previous examples) has only one data
|
||||||
sector, since it is less than 256
|
sector, since it is less than 256
|
||||||
|
@ -328,7 +328,7 @@ sector and the T/S List sector, HELLO
|
||||||
is 2 sectors long, and this will be
|
is 2 sectors long, and this will be
|
||||||
the value shown when a CATALOG
|
the value shown when a CATALOG
|
||||||
command is done.
|
command is done.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.6 ***
|
*** INSERT FIGURE 4.6 ***
|
||||||
.bp
|
.bp
|
||||||
Following the Track/Sector pointer in
|
Following the Track/Sector pointer in
|
||||||
|
@ -349,8 +349,8 @@ the Track/Sector List, DOS can read
|
||||||
each sector of the file in the correct order so
|
each sector of the file in the correct order so
|
||||||
that the programmer need never know
|
that the programmer need never know
|
||||||
that the data was broken up into
|
that the data was broken up into
|
||||||
sectors at all.
|
sectors at all.
|
||||||
.SP1
|
.sp1
|
||||||
TEXT FILES
|
TEXT FILES
|
||||||
|
|
||||||
The TEXT data type is the least
|
The TEXT data type is the least
|
||||||
|
@ -389,7 +389,7 @@ less efficient in the use of disk space than
|
||||||
with a BINARY type file, since each
|
with a BINARY type file, since each
|
||||||
digit must occupy a full byte in the
|
digit must occupy a full byte in the
|
||||||
file.
|
file.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.7 ***
|
*** INSERT FIGURE 4.7 ***
|
||||||
.bp
|
.bp
|
||||||
BINARY FILES
|
BINARY FILES
|
||||||
|
@ -399,7 +399,7 @@ shown in Figure 4.8. An exact copy of
|
||||||
the memory involved is written to the
|
the memory involved is written to the
|
||||||
disk sector(s), preceded by the
|
disk sector(s), preceded by the
|
||||||
memory address where it was found and
|
memory address where it was found and
|
||||||
the length (a total of four bytes).
|
the length (a total of four bytes).
|
||||||
The address and length (in low order,
|
The address and length (in low order,
|
||||||
high order format) are those given in
|
high order format) are those given in
|
||||||
the A and L keywords from the BSAVE
|
the A and L keywords from the BSAVE
|
||||||
|
@ -419,9 +419,9 @@ address either by providing the A
|
||||||
entered, or by changing the address
|
entered, or by changing the address
|
||||||
in the first two bytes of the file on
|
in the first two bytes of the file on
|
||||||
the diskette.
|
the diskette.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 4.8 ***
|
*** INSERT FIGURE 4.8 ***
|
||||||
.SP1
|
.sp1
|
||||||
APPLESOFT AND INTEGER FILES
|
APPLESOFT AND INTEGER FILES
|
||||||
|
|
||||||
A BASIC program, be it APPLESOFT or
|
A BASIC program, be it APPLESOFT or
|
||||||
|
@ -431,7 +431,7 @@ format of an APPLESOFT file type is
|
||||||
given in Figure 4.9 and that of
|
given in Figure 4.9 and that of
|
||||||
INTEGER BASIC in 4.10. When the SAVE
|
INTEGER BASIC in 4.10. When the SAVE
|
||||||
command is typed, DOS determines the
|
command is typed, DOS determines the
|
||||||
location of the BASIC program image
|
location of the BASIC program image
|
||||||
in memory and its length. Since a
|
in memory and its length. Since a
|
||||||
BASIC program is always loaded at a
|
BASIC program is always loaded at a
|
||||||
location known to the BASIC
|
location known to the BASIC
|
||||||
|
@ -453,7 +453,7 @@ scope of this manual, but a
|
||||||
breakdown of the example INTEGER
|
breakdown of the example INTEGER
|
||||||
BASIC program is given in Figure
|
BASIC program is given in Figure
|
||||||
4.10.
|
4.10.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURES 4.9 AND 4.10 ***
|
*** INSERT FIGURES 4.9 AND 4.10 ***
|
||||||
.bp
|
.bp
|
||||||
OTHER FILE TYPES (S,R,A,B)
|
OTHER FILE TYPES (S,R,A,B)
|
||||||
|
@ -478,7 +478,7 @@ based on additional information
|
||||||
stored with the image itself. The
|
stored with the image itself. The
|
||||||
format for this type of file is given
|
format for this type of file is given
|
||||||
in the documentation accompanying the
|
in the documentation accompanying the
|
||||||
DOS TOOLKIT.
|
DOS TOOLKIT.
|
||||||
It is recommended that if the
|
It is recommended that if the
|
||||||
reader requires more information
|
reader requires more information
|
||||||
about R files he should refer to that
|
about R files he should refer to that
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
CHAPTER 5 - THE STRUCTURE OF DOS
|
CHAPTER 5 - THE STRUCTURE OF DOS
|
||||||
.sp 2
|
.sp2
|
||||||
DOS MEMORY USE
|
DOS MEMORY USE
|
||||||
|
|
||||||
DOS is an assembly language program
|
DOS is an assembly language program
|
||||||
|
@ -37,7 +37,7 @@ on a 48K system, it will not boot on
|
||||||
less than 48K since the RAM DOS
|
less than 48K since the RAM DOS
|
||||||
occupied does not exist on a smaller
|
occupied does not exist on a smaller
|
||||||
machine.
|
machine.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 5.1 ***
|
*** INSERT FIGURE 5.1 ***
|
||||||
|
|
||||||
A diagram of DOS's memory for a 48K
|
A diagram of DOS's memory for a 48K
|
||||||
|
@ -57,7 +57,7 @@ changed from 3, the space occupied by
|
||||||
the file buffers also changes. This
|
the file buffers also changes. This
|
||||||
affects the placement of HIMEM,
|
affects the placement of HIMEM,
|
||||||
moving it up or down with fewer or
|
moving it up or down with fewer or
|
||||||
more buffers respectively.
|
more buffers respectively.
|
||||||
|
|
||||||
The 3.5K
|
The 3.5K
|
||||||
above the file buffers is occupied by
|
above the file buffers is occupied by
|
||||||
|
@ -69,7 +69,7 @@ interfacing to BASIC, interpreting
|
||||||
commands, and managing the file
|
commands, and managing the file
|
||||||
buffers. All disk functions are
|
buffers. All disk functions are
|
||||||
passed on via subroutine calls to the
|
passed on via subroutine calls to the
|
||||||
file manager.
|
file manager.
|
||||||
.bp
|
.bp
|
||||||
The file manager,
|
The file manager,
|
||||||
occupying about 4.3K, is a collection
|
occupying about 4.3K, is a collection
|
||||||
|
@ -85,7 +85,7 @@ lanaguage program which is not part
|
||||||
of DOS. This interface is generalized
|
of DOS. This interface is generalized
|
||||||
through a group of vectors in page 3
|
through a group of vectors in page 3
|
||||||
of RAM and is documented in the next
|
of RAM and is documented in the next
|
||||||
chapter.
|
chapter.
|
||||||
|
|
||||||
The last 2.5K of DOS is the
|
The last 2.5K of DOS is the
|
||||||
Read/Write Track/Sector (RWTS)
|
Read/Write Track/Sector (RWTS)
|
||||||
|
@ -147,19 +147,19 @@ table itself starts at $3D0.
|
||||||
.ll60
|
.ll60
|
||||||
.bp
|
.bp
|
||||||
DOS VECTOR TABLE ($3D0-$3FF)
|
DOS VECTOR TABLE ($3D0-$3FF)
|
||||||
.NP
|
.np
|
||||||
ADDR USAGE
|
ADDR USAGE
|
||||||
3D0 A JMP (jump or GOTO) instruction to the DOS warmstart
|
3D0 A JMP (jump or GOTO) instruction to the DOS warmstart
|
||||||
routine. This routine reenters DOS but does not
|
routine. This routine reenters DOS but does not
|
||||||
discard the current BASIC program and does not reset
|
discard the current BASIC program and does not reset
|
||||||
MAXFILES or other DOS environmental variables.
|
MAXFILES or other DOS environmental variables.
|
||||||
3D3 A JMP to the DOS coldstart routine. This routine
|
3D3 A JMP to the DOS coldstart routine. This routine
|
||||||
reinitializes DOS as if it was rebooted, clearing the
|
reinitializes DOS as if it was rebooted, clearing the
|
||||||
current BASIC file and resetting HIMEM.
|
current BASIC file and resetting HIMEM.
|
||||||
3D6 A JMP to the DOS file manager subroutine to allow a
|
3D6 A JMP to the DOS file manager subroutine to allow a
|
||||||
user written assembly language program to call it.
|
user written assembly language program to call it.
|
||||||
3D9 A JMP to the DOS Read/Write Track/Sector (RWTS)
|
3D9 A JMP to the DOS Read/Write Track/Sector (RWTS)
|
||||||
routine to allow user written assembly language
|
routine to allow user written assembly language
|
||||||
programs to call it.
|
programs to call it.
|
||||||
3DC A short subroutine which locates the input parameter
|
3DC A short subroutine which locates the input parameter
|
||||||
list for the file manager to allow a user written
|
list for the file manager to allow a user written
|
||||||
|
@ -170,9 +170,9 @@ ADDR USAGE
|
||||||
up input parameters before calling RWTS.
|
up input parameters before calling RWTS.
|
||||||
3EA A JMP to the DOS subroutine which "reconnects" the DOS
|
3EA A JMP to the DOS subroutine which "reconnects" the DOS
|
||||||
intercepts to the keyboard and screen data streams.
|
intercepts to the keyboard and screen data streams.
|
||||||
3EF A JMP to the routine which will handle a BRK machine
|
3EF A JMP to the routine which will handle a BRK machine
|
||||||
language instruction. This vector is only supported by
|
language instruction. This vector is only supported by
|
||||||
the AUTOSTART ROM. Normally the vector contains the
|
the AUTOSTART ROM. Normally the vector contains the
|
||||||
address of the monitor ROM subroutine which displays
|
address of the monitor ROM subroutine which displays
|
||||||
the registers.
|
the registers.
|
||||||
3F2 LO/HI address of routine which will handle RESET for
|
3F2 LO/HI address of routine which will handle RESET for
|
||||||
|
@ -185,7 +185,7 @@ ADDR USAGE
|
||||||
RESET was pressed. If a power-up occured, the
|
RESET was pressed. If a power-up occured, the
|
||||||
AUTOSTART ROM ignores the address at 3F2 (since it has
|
AUTOSTART ROM ignores the address at 3F2 (since it has
|
||||||
never been initialized) and attempts to boot a
|
never been initialized) and attempts to boot a
|
||||||
diskette. To prevent this from happening when you
|
diskette. To prevent this from happening when you
|
||||||
change $3F2 to handle your own RESETs, EOR (exclusive
|
change $3F2 to handle your own RESETs, EOR (exclusive
|
||||||
OR) the new value at $3F2 with a $A5 and store the
|
OR) the new value at $3F2 with a $A5 and store the
|
||||||
result in the power-up byte.
|
result in the power-up byte.
|
||||||
|
@ -216,7 +216,7 @@ The location of these stages on the
|
||||||
diskette and a memory map are given
|
diskette and a memory map are given
|
||||||
in Figure 5.2 and a description of
|
in Figure 5.2 and a description of
|
||||||
the bootstrap process follows.
|
the bootstrap process follows.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 5.2 ***
|
*** INSERT FIGURE 5.2 ***
|
||||||
|
|
||||||
The first boot stage (let's call it
|
The first boot stage (let's call it
|
||||||
|
@ -368,7 +368,7 @@ The various stages of the bootstrap
|
||||||
process will be covered again in greater
|
process will be covered again in greater
|
||||||
detail in Chapter 8, DOS PROGRAM
|
detail in Chapter 8, DOS PROGRAM
|
||||||
LOGIC.
|
LOGIC.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 5.3 HERE ***
|
*** INSERT FIGURE 5.3 HERE ***
|
||||||
.BR
|
.br
|
||||||
.NX CH6.1
|
.nx CH6.1
|
||||||
|
|
|
@ -29,7 +29,7 @@ eight two byte toggles that essentially
|
||||||
represent pulling a TTL line high or
|
represent pulling a TTL line high or
|
||||||
low. Applications which could use
|
low. Applications which could use
|
||||||
direct disk access range from a
|
direct disk access range from a
|
||||||
user written operating system to DOS-independent
|
user written operating system to DOS-independent
|
||||||
utility programs. The
|
utility programs. The
|
||||||
device address assignments are given
|
device address assignments are given
|
||||||
in Figure 6.1.
|
in Figure 6.1.
|
||||||
|
@ -64,7 +64,7 @@ ADDRESS LABEL DESCRIPTION
|
||||||
.bp
|
.bp
|
||||||
The addresses are slot dependent and
|
The addresses are slot dependent and
|
||||||
the offsets are computed by
|
the offsets are computed by
|
||||||
multiplying the slot number by 16.
|
multiplying the slot number by 16.
|
||||||
In hexadecimal this works out nicely
|
In hexadecimal this works out nicely
|
||||||
and we can add the value $s0 (where s
|
and we can add the value $s0 (where s
|
||||||
is the slot number) to the base
|
is the slot number) to the base
|
||||||
|
@ -106,7 +106,7 @@ Basically, each of the four phases
|
||||||
(0-3) must be turned on and then off
|
(0-3) must be turned on and then off
|
||||||
again. Done in ascending order, this
|
again. Done in ascending order, this
|
||||||
moves the arm inward. In descending
|
moves the arm inward. In descending
|
||||||
order, this moves the arm outward.
|
order, this moves the arm outward.
|
||||||
The timing between accesses to these
|
The timing between accesses to these
|
||||||
locations is critical, making this a
|
locations is critical, making this a
|
||||||
non-trivial exercise. It is
|
non-trivial exercise. It is
|
||||||
|
@ -119,10 +119,10 @@ MOTOR OFF/ON:
|
||||||
.sp1
|
.sp1
|
||||||
.nf
|
.nf
|
||||||
LDA $C088,X Turn motor off.
|
LDA $C088,X Turn motor off.
|
||||||
.SP1
|
.sp1
|
||||||
LDA $C089,X Turn motor on.
|
LDA $C089,X Turn motor on.
|
||||||
.SP1
|
.sp1
|
||||||
.FI
|
.fi
|
||||||
NOTE: A sufficient delay should be
|
NOTE: A sufficient delay should be
|
||||||
provided to allow the motor time to
|
provided to allow the motor time to
|
||||||
come up to speed. Shugart recommends
|
come up to speed. Shugart recommends
|
||||||
|
@ -132,39 +132,39 @@ until data starts to change.
|
||||||
.bp
|
.bp
|
||||||
.nf
|
.nf
|
||||||
ENGAGE DRIVE 1/2:
|
ENGAGE DRIVE 1/2:
|
||||||
.SP1
|
.sp1
|
||||||
LDA $C08A,X Engage drive 1.
|
LDA $C08A,X Engage drive 1.
|
||||||
.sp1
|
.sp1
|
||||||
LDA $C08B,X Engage drive 2.
|
LDA $C08B,X Engage drive 2.
|
||||||
.sp1
|
.sp1
|
||||||
READ A BYTE:
|
READ A BYTE:
|
||||||
.SP1
|
.sp1
|
||||||
READ LDA $C08C,X
|
READ LDA $C08C,X
|
||||||
BPL READ
|
BPL READ
|
||||||
.SP1
|
.sp1
|
||||||
.FI
|
.fi
|
||||||
NOTE: $C08E,X must already have been
|
NOTE: $C08E,X must already have been
|
||||||
accessed to assure Read mode. The
|
accessed to assure Read mode. The
|
||||||
loop is necessary to assure that the
|
loop is necessary to assure that the
|
||||||
accumulator will contain valid data.
|
accumulator will contain valid data.
|
||||||
If the data latch does not yet
|
If the data latch does not yet
|
||||||
contain valid data the high bit will
|
contain valid data the high bit will
|
||||||
be zero.
|
be zero.
|
||||||
.sp1
|
.sp1
|
||||||
.nf
|
.nf
|
||||||
SENSE WRITE PROTECT:
|
SENSE WRITE PROTECT:
|
||||||
.SP1
|
.sp1
|
||||||
LDA $C08D,X
|
LDA $C08D,X
|
||||||
LDA $C08E,X Sense write protect.
|
LDA $C08E,X Sense write protect.
|
||||||
BMI ERROR If high bit set, protected.
|
BMI ERROR If high bit set, protected.
|
||||||
.sp1
|
.sp1
|
||||||
WRITE LOAD AND WRITE A BYTE
|
WRITE LOAD AND WRITE A BYTE
|
||||||
.SP1
|
.sp1
|
||||||
LDA DATA
|
LDA DATA
|
||||||
STA $C08D,X Write load.
|
STA $C08D,X Write load.
|
||||||
ORA $C08C,X Write byte.
|
ORA $C08C,X Write byte.
|
||||||
.sp1
|
.sp1
|
||||||
.FI
|
.fi
|
||||||
NOTE: $C08F,X must already have been
|
NOTE: $C08F,X must already have been
|
||||||
accessed to insure Write mode and a
|
accessed to insure Write mode and a
|
||||||
100 microsecond delay should be
|
100 microsecond delay should be
|
||||||
|
@ -195,7 +195,7 @@ without an adjustment.
|
||||||
WRITE STA $C08D,X (5)
|
WRITE STA $C08D,X (5)
|
||||||
ORA $C08C,X (4)
|
ORA $C08C,X (4)
|
||||||
RTS (6)
|
RTS (6)
|
||||||
.SP2
|
.sp2
|
||||||
CALLING READ/WRITE TRACK/SECTOR (RWTS)
|
CALLING READ/WRITE TRACK/SECTOR (RWTS)
|
||||||
|
|
||||||
Read/Write Track/Sector (RWTS) exists
|
Read/Write Track/Sector (RWTS) exists
|
||||||
|
@ -205,7 +205,7 @@ roughly the top third of the DOS
|
||||||
program. The interface to RWTS is
|
program. The interface to RWTS is
|
||||||
standardized and thoroughly documented by Apple
|
standardized and thoroughly documented by Apple
|
||||||
and may be called by a
|
and may be called by a
|
||||||
program running outside of DOS.
|
program running outside of DOS.
|
||||||
|
|
||||||
There are two subroutines which must
|
There are two subroutines which must
|
||||||
be called or whose function must be
|
be called or whose function must be
|
||||||
|
@ -241,7 +241,7 @@ on the facing page (offsets are given in hexadecimal):
|
||||||
.bp
|
.bp
|
||||||
.nf
|
.nf
|
||||||
INPUT/OUTPUT CONTROL BLOCK - GENERAL FORMAT
|
INPUT/OUTPUT CONTROL BLOCK - GENERAL FORMAT
|
||||||
.SP1
|
.sp1
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Table type, must be $01
|
00 Table type, must be $01
|
||||||
01 Slot number times 16 (s0: s=slot. Example: $60)
|
01 Slot number times 16 (s0: s=slot. Example: $60)
|
||||||
|
@ -272,14 +272,14 @@ BYTE DESCRIPTION
|
||||||
10 Drive number of last access (must be initialized)
|
10 Drive number of last access (must be initialized)
|
||||||
.sp1
|
.sp1
|
||||||
DEVICE CHARACTERISTICS TABLE
|
DEVICE CHARACTERISTICS TABLE
|
||||||
.SP1
|
.sp1
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Device type (should be $00 for DISK II)
|
00 Device type (should be $00 for DISK II)
|
||||||
01 Phases per track (should be $01 for DISK II)
|
01 Phases per track (should be $01 for DISK II)
|
||||||
02-03 Motor on time count (should be $EFD8 for DISK II)
|
02-03 Motor on time count (should be $EFD8 for DISK II)
|
||||||
.bp
|
.bp
|
||||||
RWTS IOB BY CALL TYPE
|
RWTS IOB BY CALL TYPE
|
||||||
.SP1
|
.sp1
|
||||||
SEEK Move disk arm to desired track
|
SEEK Move disk arm to desired track
|
||||||
.sp1
|
.sp1
|
||||||
Input: Byte 00 - Table type ($01)
|
Input: Byte 00 - Table type ($01)
|
||||||
|
@ -293,7 +293,7 @@ Input: Byte 00 - Table type ($01)
|
||||||
.sp1
|
.sp1
|
||||||
Output: Byte 0D - Return code (See previous definition)
|
Output: Byte 0D - Return code (See previous definition)
|
||||||
0F - Current Slot number * 16
|
0F - Current Slot number * 16
|
||||||
10 - Current Drive number
|
10 - Current Drive number
|
||||||
.sp1
|
.sp1
|
||||||
READ Read a sector into a specified buffer
|
READ Read a sector into a specified buffer
|
||||||
.sp1
|
.sp1
|
||||||
|
@ -314,7 +314,7 @@ Input: Byte 00 - Table type ($01)
|
||||||
Output: Byte 0D - Return code (See previous definition)
|
Output: Byte 0D - Return code (See previous definition)
|
||||||
0E - Current Volume number
|
0E - Current Volume number
|
||||||
0F - Current Slot number * 16
|
0F - Current Slot number * 16
|
||||||
10 - Current Drive number
|
10 - Current Drive number
|
||||||
.bp
|
.bp
|
||||||
WRITE Write a sector from a specified buffer
|
WRITE Write a sector from a specified buffer
|
||||||
.sp1
|
.sp1
|
||||||
|
@ -335,7 +335,7 @@ Input: Byte 00 - Table type ($01)
|
||||||
Output: Byte 0D - Return code (See previous definition)
|
Output: Byte 0D - Return code (See previous definition)
|
||||||
0E - Current Volume number
|
0E - Current Volume number
|
||||||
0F - Current Slot number * 16
|
0F - Current Slot number * 16
|
||||||
10 - Current Drive number
|
10 - Current Drive number
|
||||||
.sp1
|
.sp1
|
||||||
FORMAT Initialize the diskette (does not put DOS on disk,
|
FORMAT Initialize the diskette (does not put DOS on disk,
|
||||||
create a VTOC/CATALOG, or store HELLO program)
|
create a VTOC/CATALOG, or store HELLO program)
|
||||||
|
@ -353,6 +353,6 @@ Input: Byte 00 - Table type ($01)
|
||||||
Output: Byte 0D - Return code (See previous definition)
|
Output: Byte 0D - Return code (See previous definition)
|
||||||
0E - Current Volume number
|
0E - Current Volume number
|
||||||
0F - Current Slot number * 16
|
0F - Current Slot number * 16
|
||||||
10 - Current Drive number
|
10 - Current Drive number
|
||||||
.bp
|
.bp
|
||||||
.nx ch6.2
|
.nx ch6.2
|
||||||
|
|
|
@ -7,7 +7,7 @@ the central third of the DOS program.
|
||||||
The interface to these routines is
|
The interface to these routines is
|
||||||
generalized in such a way that they
|
generalized in such a way that they
|
||||||
may be called by a program running
|
may be called by a program running
|
||||||
outside of DOS. The definition of
|
outside of DOS. The definition of
|
||||||
this interface has
|
this interface has
|
||||||
never been published by APPLE (or
|
never been published by APPLE (or
|
||||||
anyone else, for that manner) but
|
anyone else, for that manner) but
|
||||||
|
@ -19,7 +19,7 @@ these routines may be relied upon as
|
||||||
"safe". Indeed, the new FID utility
|
"safe". Indeed, the new FID utility
|
||||||
program
|
program
|
||||||
uses these routines to process files
|
uses these routines to process files
|
||||||
on the diskette.
|
on the diskette.
|
||||||
|
|
||||||
There are
|
There are
|
||||||
two subroutines which must be called
|
two subroutines which must be called
|
||||||
|
@ -81,7 +81,7 @@ The general format of the file
|
||||||
manager parameter list is as follows:
|
manager parameter list is as follows:
|
||||||
.bp
|
.bp
|
||||||
FILE MANAGER PARAMETER LIST - GENERAL FORMAT
|
FILE MANAGER PARAMETER LIST - GENERAL FORMAT
|
||||||
.NP
|
.np
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
00 Call type: 01=OPEN 05=DELETE 09=RENAME
|
00 Call type: 01=OPEN 05=DELETE 09=RENAME
|
||||||
02=CLOSE 06=CATALOG 0A=POSITION
|
02=CLOSE 06=CATALOG 0A=POSITION
|
||||||
|
@ -97,7 +97,7 @@ BYTE DESCRIPTION
|
||||||
FILE MANAGER PARAMETER LIST BY CALL TYPE below.
|
FILE MANAGER PARAMETER LIST BY CALL TYPE below.
|
||||||
0A Return code (note: not all return codes can occur
|
0A Return code (note: not all return codes can occur
|
||||||
for any call type). The processor CARRY
|
for any call type). The processor CARRY
|
||||||
flag is set upon return from the file
|
flag is set upon return from the file
|
||||||
manager if there is a non-zero return code:
|
manager if there is a non-zero return code:
|
||||||
00=No errors
|
00=No errors
|
||||||
01=Not used ("LANGUAGE NOT AVAILABLE")
|
01=Not used ("LANGUAGE NOT AVAILABLE")
|
||||||
|
@ -114,7 +114,7 @@ BYTE DESCRIPTION
|
||||||
0C-0D Address of a 45 byte buffer which will be used by the
|
0C-0D Address of a 45 byte buffer which will be used by the
|
||||||
file manager to save its status between calls. This
|
file manager to save its status between calls. This
|
||||||
area is called the file manager workarea and need not
|
area is called the file manager workarea and need not
|
||||||
be initialized by the caller but the space must be
|
be initialized by the caller but the space must be
|
||||||
provided and this two byte address field initialized.
|
provided and this two byte address field initialized.
|
||||||
(addresses are in low/high order format)
|
(addresses are in low/high order format)
|
||||||
0E-0F Address of a 256 byte buffer which will be used by the
|
0E-0F Address of a 256 byte buffer which will be used by the
|
||||||
|
@ -124,15 +124,15 @@ BYTE DESCRIPTION
|
||||||
10-11 Address of a 256 byte buffer which will be used by the
|
10-11 Address of a 256 byte buffer which will be used by the
|
||||||
file manager to maintain the data sector buffer.
|
file manager to maintain the data sector buffer.
|
||||||
Buffer need not be initialized by the caller.
|
Buffer need not be initialized by the caller.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 6.2 ***
|
*** INSERT FIGURE 6.2 ***
|
||||||
.bp
|
.bp
|
||||||
FILE MANAGER PARAMETER LIST BY CALL TYPE
|
FILE MANAGER PARAMETER LIST BY CALL TYPE
|
||||||
.NP
|
.np
|
||||||
OPEN Locates or creates a file. A call to POSITION should
|
OPEN Locates or creates a file. A call to POSITION should
|
||||||
follow every OPEN.
|
follow every OPEN.
|
||||||
.sp1
|
.sp1
|
||||||
Input: Byte 00 - 01
|
Input: Byte 00 - 01
|
||||||
02/03 - Fixed record length or 0000 if variable
|
02/03 - Fixed record length or 0000 if variable
|
||||||
04 - Volume number or 00 for any volume
|
04 - Volume number or 00 for any volume
|
||||||
05 - Drive number to be used (01 or 02)
|
05 - Drive number to be used (01 or 02)
|
||||||
|
@ -280,7 +280,7 @@ Input: Byte 00 - 0B
|
||||||
.sp1
|
.sp1
|
||||||
Output: Byte 0A - Return code
|
Output: Byte 0A - Return code
|
||||||
.sp2
|
.sp2
|
||||||
VERIFY Verify that there are no bad sectors in a file by
|
VERIFY Verify that there are no bad sectors in a file by
|
||||||
reading every sector.
|
reading every sector.
|
||||||
.sp1
|
.sp1
|
||||||
Input: Byte 00 - 0C
|
Input: Byte 00 - 0C
|
||||||
|
@ -292,7 +292,7 @@ DOS BUFFERS
|
||||||
|
|
||||||
Usually it is desirable to use one of DOS's buffers when
|
Usually it is desirable to use one of DOS's buffers when
|
||||||
calling the file manager to save memory. DOS buffers consist of
|
calling the file manager to save memory. DOS buffers consist of
|
||||||
each of the three buffers used by the file manager (file
|
each of the three buffers used by the file manager (file
|
||||||
manager workarea, T/S List sector, and data sector) as well as
|
manager workarea, T/S List sector, and data sector) as well as
|
||||||
a 30 byte file name buffer and some link pointers. All together
|
a 30 byte file name buffer and some link pointers. All together
|
||||||
a DOS buffer occupies 595 bytes of memory. The address of the
|
a DOS buffer occupies 595 bytes of memory. The address of the
|
||||||
|
@ -300,7 +300,7 @@ first DOS buffer is stored in the first two bytes of DOS ($9D00
|
||||||
on a 48K APPLE II). The address of the next buffer is stored in
|
on a 48K APPLE II). The address of the next buffer is stored in
|
||||||
the first and so on in a chain of linked elements. The link
|
the first and so on in a chain of linked elements. The link
|
||||||
address to the next buffer in the last buffer is zeros. If the
|
address to the next buffer in the last buffer is zeros. If the
|
||||||
buffer is not being used by DOS, the first byte of the file
|
buffer is not being used by DOS, the first byte of the file
|
||||||
name field is a hex 00. Otherwise, it contains the first
|
name field is a hex 00. Otherwise, it contains the first
|
||||||
character of the name of the open file. The assembly language
|
character of the name of the open file. The assembly language
|
||||||
programmer should follow these conventions to avoid having DOS
|
programmer should follow these conventions to avoid having DOS
|
||||||
|
@ -309,18 +309,18 @@ name of the file should be stored in the buffer to reserve it
|
||||||
for exclusive use (or at least a non-zero byte stored on the
|
for exclusive use (or at least a non-zero byte stored on the
|
||||||
first character) and later, when the user is through with the
|
first character) and later, when the user is through with the
|
||||||
buffer, a 00 should be stored on the file name to return it
|
buffer, a 00 should be stored on the file name to return it
|
||||||
to DOS's use. If the later is not done, DOS will eventually
|
to DOS's use. If the later is not done, DOS will eventually
|
||||||
run out of available buffers and will refuse even to do a
|
run out of available buffers and will refuse even to do a
|
||||||
CATALOG command. A diagram of the DOS
|
CATALOG command. A diagram of the DOS
|
||||||
buffers for MAXFILES 3 is given in
|
buffers for MAXFILES 3 is given in
|
||||||
Figure 6.3 and
|
Figure 6.3 and
|
||||||
the format of a DOS buffer is given below.
|
the format of a DOS buffer is given below.
|
||||||
.SP1
|
.sp1
|
||||||
*** INSERT FIGURE 6.3 ***
|
*** INSERT FIGURE 6.3 ***
|
||||||
.sp1
|
.sp1
|
||||||
.ne10
|
.ne10
|
||||||
DOS BUFFER FORMAT
|
DOS BUFFER FORMAT
|
||||||
.NP
|
.np
|
||||||
BYTE DESCRIPTION
|
BYTE DESCRIPTION
|
||||||
000/0FF Data sector buffer (256 bytes in length)
|
000/0FF Data sector buffer (256 bytes in length)
|
||||||
100/1FF T/S List sector buffer (256 bytes in length)
|
100/1FF T/S List sector buffer (256 bytes in length)
|
||||||
|
@ -401,15 +401,15 @@ COMMON ALGORITHMS
|
||||||
|
|
||||||
Given below are several pieces of code
|
Given below are several pieces of code
|
||||||
which are used when working with DOS:
|
which are used when working with DOS:
|
||||||
.SP1
|
.sp1
|
||||||
.ne5
|
.ne5
|
||||||
LOCATE A FREE DOS BUFFER
|
LOCATE A FREE DOS BUFFER
|
||||||
|
|
||||||
The following subroutine may be used
|
The following subroutine may be used
|
||||||
to locate an unallocated DOS buffer
|
to locate an unallocated DOS buffer
|
||||||
for use with the DOS file manager.
|
for use with the DOS file manager.
|
||||||
.SP1
|
.sp1
|
||||||
.NP
|
.np
|
||||||
FBUFF LDA $3D2 LOCATE DOS LOAD POINT
|
FBUFF LDA $3D2 LOCATE DOS LOAD POINT
|
||||||
STA $1
|
STA $1
|
||||||
LDY #0
|
LDY #0
|
||||||
|
@ -445,11 +445,11 @@ call RWTS or the file manager to
|
||||||
insure that DOS is present on this
|
insure that DOS is present on this
|
||||||
machine.
|
machine.
|
||||||
.sp1
|
.sp1
|
||||||
.NP
|
.np
|
||||||
LDA $3D0 GET VECTOR JMP
|
LDA $3D0 GET VECTOR JMP
|
||||||
CMP #$4C IS IT A JUMP?
|
CMP #$4C IS IT A JUMP?
|
||||||
BNE NODOS NO, DOS NOT LOADED
|
BNE NODOS NO, DOS NOT LOADED
|
||||||
.SP2
|
.sp2
|
||||||
.ne5
|
.ne5
|
||||||
WHICH VERSION OF DOS IS ACTIVE?
|
WHICH VERSION OF DOS IS ACTIVE?
|
||||||
|
|
||||||
|
@ -469,7 +469,7 @@ the DOS version may be required:
|
||||||
.sp2
|
.sp2
|
||||||
.ne5
|
.ne5
|
||||||
WHICH BASIC IS SELECTED?
|
WHICH BASIC IS SELECTED?
|
||||||
.PP
|
|
||||||
Some programs depend upon either the
|
Some programs depend upon either the
|
||||||
INTEGER BASIC ROM or the APPLESOFT
|
INTEGER BASIC ROM or the APPLESOFT
|
||||||
ROM. To find out which is active and
|
ROM. To find out which is active and
|
||||||
|
@ -481,7 +481,7 @@ is used for INTEGER BASIC and $4C is
|
||||||
used for APPLESOFT. To set up for
|
used for APPLESOFT. To set up for
|
||||||
APPLESOFT, for example:
|
APPLESOFT, for example:
|
||||||
.sp1
|
.sp1
|
||||||
.NP
|
.np
|
||||||
LDA #$4C CODE FOR APPLESOFT
|
LDA #$4C CODE FOR APPLESOFT
|
||||||
JSR SETBSC CALL SUBROUTINE
|
JSR SETBSC CALL SUBROUTINE
|
||||||
BNE ERROR LANGUAGE NOT AVAILABLE
|
BNE ERROR LANGUAGE NOT AVAILABLE
|
||||||
|
|
|
@ -64,18 +64,18 @@ be followed to do this:
|
||||||
Execute MASTER CREATE (800G)
|
Execute MASTER CREATE (800G)
|
||||||
When MASTER CREATE finishes loading the DOS image
|
When MASTER CREATE finishes loading the DOS image
|
||||||
it will exit. You may use the monitor to make
|
it will exit. You may use the monitor to make
|
||||||
changes in the image. MASTER CREATE loads DOS
|
changes in the image. MASTER CREATE loads DOS
|
||||||
into memory at $1200 such that Boot 2 (RWTS) is
|
into memory at $1200 such that Boot 2 (RWTS) is
|
||||||
loaded first, followed by the main part of DOS
|
loaded first, followed by the main part of DOS
|
||||||
starting at $1C00.
|
starting at $1C00.
|
||||||
When all patches have been made, reenter MASTER CREATE
|
When all patches have been made, reenter MASTER CREATE
|
||||||
at location $82D (82DG).
|
at location $82D (82DG).
|
||||||
Complete the MASTER CREATE update normally. The
|
Complete the MASTER CREATE update normally. The
|
||||||
resulting diskette will have the patches applied.
|
resulting diskette will have the patches applied.
|
||||||
.br
|
.br
|
||||||
This procedure will work for versions 3.2, 3.2.1, and 3.3 of
|
This procedure will work for versions 3.2, 3.2.1, and 3.3 of
|
||||||
DOS.
|
DOS.
|
||||||
.SP1
|
.sp1
|
||||||
.ne5
|
.ne5
|
||||||
AVOIDING RELOAD OF LANGUAGE CARD
|
AVOIDING RELOAD OF LANGUAGE CARD
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
.m22
|
.m22
|
||||||
.m48
|
.m48
|
||||||
.fo ''-%-
|
.fo ''-%-
|
||||||
.pn 5
|
.pn5
|
||||||
.pi 0
|
.pi0
|
||||||
.br
|
.br
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
|
@ -34,7 +34,7 @@ are given in decimal, addresses in
|
||||||
hexadecimal (base 16).
|
hexadecimal (base 16).
|
||||||
.sp1
|
.sp1
|
||||||
DISK II CONTROLLER CARD ROM - BOOT 0
|
DISK II CONTROLLER CARD ROM - BOOT 0
|
||||||
.SP1
|
.sp1
|
||||||
.pi0
|
.pi0
|
||||||
.ul
|
.ul
|
||||||
ADDRESS
|
ADDRESS
|
||||||
|
@ -44,9 +44,9 @@ C600-C65B This routine is the first code executed when a disk
|
||||||
C600G or 6 control-P.
|
C600G or 6 control-P.
|
||||||
Dynamically build a translate table for converting
|
Dynamically build a translate table for converting
|
||||||
disk codes to six bit hex at location $356-$3FF.
|
disk codes to six bit hex at location $356-$3FF.
|
||||||
Call an RTS instruction in the monitor ROM and
|
Call an RTS instruction in the monitor ROM and
|
||||||
extract the return address from the stack to find out
|
extract the return address from the stack to find out
|
||||||
the address of this controller card ROM.
|
the address of this controller card ROM.
|
||||||
Use this address to determine the slot number of this
|
Use this address to determine the slot number of this
|
||||||
drive by shifting $Csxx.
|
drive by shifting $Csxx.
|
||||||
Save the slot number times 16 ($s0)
|
Save the slot number times 16 ($s0)
|
||||||
|
@ -92,9 +92,9 @@ C65C-C6FA This subroutine reads the sector number stored at
|
||||||
Otherwise, go to $801 to begin executing the second
|
Otherwise, go to $801 to begin executing the second
|
||||||
stage of the bootstrap.
|
stage of the bootstrap.
|
||||||
.sp1
|
.sp1
|
||||||
FIRST RAM BOOTSTRAP LOADER - BOOT 1
|
FIRST RAM BOOTSTRAP LOADER - BOOT 1
|
||||||
.sp1
|
.sp1
|
||||||
.Ul
|
.ul
|
||||||
ADDRESS
|
ADDRESS
|
||||||
.np
|
.np
|
||||||
0801-084C This routine loads the second RAM loader, Boot 2,
|
0801-084C This routine loads the second RAM loader, Boot 2,
|
||||||
|
@ -104,7 +104,7 @@ ADDRESS
|
||||||
Create the address of the ROM sector read subroutine
|
Create the address of the ROM sector read subroutine
|
||||||
(C65C in our case) and store it at $3E,$3F.
|
(C65C in our case) and store it at $3E,$3F.
|
||||||
Pick up the first memory page in which to read Boot 2
|
Pick up the first memory page in which to read Boot 2
|
||||||
from location $8FE, add the length of Boot 2 in
|
from location $8FE, add the length of Boot 2 in
|
||||||
sectors from $8FF, and set that value as the first
|
sectors from $8FF, and set that value as the first
|
||||||
address to which to read (read last page first).
|
address to which to read (read last page first).
|
||||||
081F Get sector to read, if zero, go to $839.
|
081F Get sector to read, if zero, go to $839.
|
||||||
|
@ -124,8 +124,8 @@ ADDRESS
|
||||||
master disk, $B700 in its final relocated location).
|
master disk, $B700 in its final relocated location).
|
||||||
.sp1
|
.sp1
|
||||||
DOS 3.3 MAIN ROUTINES
|
DOS 3.3 MAIN ROUTINES
|
||||||
.SP1
|
.sp1
|
||||||
.Ul
|
.ul
|
||||||
ADDRESS
|
ADDRESS
|
||||||
.np
|
.np
|
||||||
9D00-9D0F Relocatable address constants
|
9D00-9D0F Relocatable address constants
|
||||||
|
@ -144,7 +144,7 @@ ADDRESS
|
||||||
and this table contains the address of the routine
|
and this table contains the address of the routine
|
||||||
which handles each state from state 0 to state 6.
|
which handles each state from state 0 to state 6.
|
||||||
.np
|
.np
|
||||||
9D1E-9D55 Command handler entry point table. This table
|
9D1E-9D55 Command handler entry point table. This table
|
||||||
contains the address of a command handler subroutine
|
contains the address of a command handler subroutine
|
||||||
for each DOS command in the following standard order:
|
for each DOS command in the following standard order:
|
||||||
INIT A54F
|
INIT A54F
|
||||||
|
@ -186,7 +186,7 @@ ADDRESS
|
||||||
9D5E Address of BASIC warmstart.
|
9D5E Address of BASIC warmstart.
|
||||||
9D60 Address of BASIC relocate (APPLESOFT only).
|
9D60 Address of BASIC relocate (APPLESOFT only).
|
||||||
.np
|
.np
|
||||||
9D62-9D6B Image of the entry point vector for INTEGER BASIC.
|
9D62-9D6B Image of the entry point vector for INTEGER BASIC.
|
||||||
This image is copied to 9D56 if INTEGER BASIC is made
|
This image is copied to 9D56 if INTEGER BASIC is made
|
||||||
active.
|
active.
|
||||||
.np
|
.np
|
||||||
|
@ -213,7 +213,7 @@ ADDRESS
|
||||||
Set NOMON C,I,O.
|
Set NOMON C,I,O.
|
||||||
Set video intercept handler state to 0.
|
Set video intercept handler state to 0.
|
||||||
Coldstart or warmstart the current BASIC (exit DOS).
|
Coldstart or warmstart the current BASIC (exit DOS).
|
||||||
(DOS will next gain control when BASIC prints its
|
(DOS will next gain control when BASIC prints its
|
||||||
input prompt character)
|
input prompt character)
|
||||||
.np
|
.np
|
||||||
9DEA-9E50 First entry processing for DOS. This routine is
|
9DEA-9E50 First entry processing for DOS. This routine is
|
||||||
|
@ -227,7 +227,7 @@ ADDRESS
|
||||||
Set MAXFILES to 3 by default.
|
Set MAXFILES to 3 by default.
|
||||||
Call A7D4 to build the DOS file buffers.
|
Call A7D4 to build the DOS file buffers.
|
||||||
If an EXEC was active, close the EXEC file
|
If an EXEC was active, close the EXEC file
|
||||||
Set the video intercept state to 0 and indicate
|
Set the video intercept state to 0 and indicate
|
||||||
warmstart status by calling A75B.
|
warmstart status by calling A75B.
|
||||||
If the last command executed was not INIT (this DOS
|
If the last command executed was not INIT (this DOS
|
||||||
was not just booted), go to 9E45.
|
was not just booted), go to 9E45.
|
||||||
|
@ -242,7 +242,7 @@ ADDRESS
|
||||||
If so, go to A180 to execute it. Otherwise, return
|
If so, go to A180 to execute it. Otherwise, return
|
||||||
to caller.
|
to caller.
|
||||||
.np
|
.np
|
||||||
9E51-9E7F An image of the DOS 3-page jump vector which the
|
9E51-9E7F An image of the DOS 3-page jump vector which the
|
||||||
above routine copies to $3D0-$3FF. See Chapter 5 for
|
above routine copies to $3D0-$3FF. See Chapter 5 for
|
||||||
a description of its contents.
|
a description of its contents.
|
||||||
.np
|
.np
|
||||||
|
@ -252,7 +252,7 @@ ADDRESS
|
||||||
go to 9E9E.
|
go to 9E9E.
|
||||||
Get value in A register at entry and echo it on the
|
Get value in A register at entry and echo it on the
|
||||||
screen (erases flashing cursor).
|
screen (erases flashing cursor).
|
||||||
If in read state (reading a file) go to A626 to get
|
If in read state (reading a file) go to A626 to get
|
||||||
next byte from disk file.
|
next byte from disk file.
|
||||||
Otherwise, call 9DEA to do first entry processing.
|
Otherwise, call 9DEA to do first entry processing.
|
||||||
Put cursor on screen in next position.
|
Put cursor on screen in next position.
|
||||||
|
@ -287,7 +287,7 @@ ADDRESS
|
||||||
If read flag is on (file being read) and output is a
|
If read flag is on (file being read) and output is a
|
||||||
"?" character (BASIC INPUT), go to state 6 to skip
|
"?" character (BASIC INPUT), go to state 6 to skip
|
||||||
it.
|
it.
|
||||||
If read flag is on and output is prompt character
|
If read flag is on and output is prompt character
|
||||||
($33) go to state 2 to ignore the line.
|
($33) go to state 2 to ignore the line.
|
||||||
Set state to 2 (ignore non-DOS command) just in case.
|
Set state to 2 (ignore non-DOS command) just in case.
|
||||||
If output character is not a control-D, go to
|
If output character is not a control-D, go to
|
||||||
|
@ -329,7 +329,7 @@ ADDRESS
|
||||||
Exit DOS with echo on screen if MON O.
|
Exit DOS with echo on screen if MON O.
|
||||||
.np
|
.np
|
||||||
9F61-9F70 State 5 output handler. --Start of WRITE data line--
|
9F61-9F70 State 5 output handler. --Start of WRITE data line--
|
||||||
If the character is a control-D, go to state 0 to
|
If the character is a control-D, go to state 0 to
|
||||||
immediately exit write mode.
|
immediately exit write mode.
|
||||||
If the character is a line feed, write it and exit,
|
If the character is a line feed, write it and exit,
|
||||||
staying in state 5.
|
staying in state 5.
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
If it doesn't match and if there are more entries
|
If it doesn't match and if there are more entries
|
||||||
left to check, go back to 9FD6.
|
left to check, go back to 9FD6.
|
||||||
If it does match, go to A01B.
|
If it does match, go to A01B.
|
||||||
Otherwise, if command was not found in the table,
|
Otherwise, if command was not found in the table,
|
||||||
check to see if the first character was a control-D.
|
check to see if the first character was a control-D.
|
||||||
If so, go to A6C4 to print "SYNTAX ERROR".
|
If so, go to A6C4 to print "SYNTAX ERROR".
|
||||||
Otherwise, call A75B to reset the state and warmstart
|
Otherwise, call A75B to reset the state and warmstart
|
||||||
flag and go to 9F95 to echo the command and exit.
|
flag and go to 9F95 to echo the command and exit.
|
||||||
(the command must be for BASIC, not DOS)
|
(the command must be for BASIC, not DOS)
|
||||||
A01B Compute an index into the operand table for the
|
A01B Compute an index into the operand table for the
|
||||||
command which was entered.
|
command which was entered.
|
||||||
Call A65E to see if a BASIC program is executing.
|
Call A65E to see if a BASIC program is executing.
|
||||||
If not, and the command is not a direct type command,
|
If not, and the command is not a direct type command,
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
is a legal operand for this command.
|
is a legal operand for this command.
|
||||||
If not, go to A0A0.
|
If not, go to A0A0.
|
||||||
Otherwise, clear the filename buffer (call A095).
|
Otherwise, clear the filename buffer (call A095).
|
||||||
Flush to the next non-blank (call A1A4) and copy
|
Flush to the next non-blank (call A1A4) and copy
|
||||||
the filename operand to the first filename buffer.
|
the filename operand to the first filename buffer.
|
||||||
Skip forward to a comma if one was not found yet.
|
Skip forward to a comma if one was not found yet.
|
||||||
If a second filename is legal for this command, use
|
If a second filename is legal for this command, use
|
||||||
|
@ -82,7 +82,7 @@ A17A-A17F Call A180 to process the command, then exit via echo
|
||||||
A180-A192 Do command.
|
A180-A192 Do command.
|
||||||
Reset the video intercept state to zero.
|
Reset the video intercept state to zero.
|
||||||
Clear the file manager parameter list.
|
Clear the file manager parameter list.
|
||||||
Using the command index, get the address of the
|
Using the command index, get the address of the
|
||||||
command handling routine from the command handler
|
command handling routine from the command handler
|
||||||
routine table at 9D1E and go to it.
|
routine table at 9D1E and go to it.
|
||||||
Command handler will exit to caller of this routine.
|
Command handler will exit to caller of this routine.
|
||||||
|
@ -93,12 +93,12 @@ A193-A1A3 Get next character on command line and check to see
|
||||||
A1A4-A1AD Flush command line characters until a non-blank is
|
A1A4-A1AD Flush command line characters until a non-blank is
|
||||||
found.
|
found.
|
||||||
.np
|
.np
|
||||||
A1AE-A1B8 Clear the file manager parameter list at B5BA to
|
A1AE-A1B8 Clear the file manager parameter list at B5BA to
|
||||||
zeros.
|
zeros.
|
||||||
.np
|
.np
|
||||||
A1B9-A1D5 Convert numeric operand from command line. Call
|
A1B9-A1D5 Convert numeric operand from command line. Call
|
||||||
either A1D6 (decimal convert) or A203 (hex convert)
|
either A1D6 (decimal convert) or A203 (hex convert)
|
||||||
depending upon the presence or lack thereof of a
|
depending upon the presence or lack thereof of a
|
||||||
dollar sign ($).
|
dollar sign ($).
|
||||||
.np
|
.np
|
||||||
A1D6-A202 Decimal convert subroutine.
|
A1D6-A202 Decimal convert subroutine.
|
||||||
|
|
|
@ -57,7 +57,7 @@ A331-A35C BSAVE command handler.
|
||||||
Open and verify a B type file (A3D5).
|
Open and verify a B type file (A3D5).
|
||||||
Write the A keyword value as the first two bytes of
|
Write the A keyword value as the first two bytes of
|
||||||
the file.
|
the file.
|
||||||
Write the L keyword value as the next two bytes of
|
Write the L keyword value as the next two bytes of
|
||||||
the file.
|
the file.
|
||||||
Use the A value to exit by writing a range of bytes
|
Use the A value to exit by writing a range of bytes
|
||||||
from memory to the file.
|
from memory to the file.
|
||||||
|
@ -92,7 +92,7 @@ A397-A3D4 SAVE command handler.
|
||||||
A3BC Open and test for I type file (A3D5).
|
A3BC Open and test for I type file (A3D5).
|
||||||
Compute program length (HIMEM-PGMSTART).
|
Compute program length (HIMEM-PGMSTART).
|
||||||
Write this two byte length to file.
|
Write this two byte length to file.
|
||||||
Exit by writing program image from PGMSTART as a
|
Exit by writing program image from PGMSTART as a
|
||||||
range of bytes (A3FF).
|
range of bytes (A3FF).
|
||||||
.np
|
.np
|
||||||
A3D5-A3DF Open and test file type.
|
A3D5-A3DF Open and test file type.
|
||||||
|
@ -124,7 +124,7 @@ A413-A479 LOAD command handler.
|
||||||
Which BASIC is active?
|
Which BASIC is active?
|
||||||
If INTEGER, go to A450.
|
If INTEGER, go to A450.
|
||||||
Select APPLESOFT BASIC (A4B1). This call could result
|
Select APPLESOFT BASIC (A4B1). This call could result
|
||||||
in DOS losing control if the RAM version must be
|
in DOS losing control if the RAM version must be
|
||||||
run.
|
run.
|
||||||
Read first two bytes of file as length of program.
|
Read first two bytes of file as length of program.
|
||||||
Add length to LOMEM (program start) to compute
|
Add length to LOMEM (program start) to compute
|
||||||
|
@ -159,7 +159,7 @@ A4B1-A4D0 Select desired BASIC.
|
||||||
Save current command index in case we must RUN
|
Save current command index in case we must RUN
|
||||||
APPLESOFT.
|
APPLESOFT.
|
||||||
If INTEGER, go to A59E to select it.
|
If INTEGER, go to A59E to select it.
|
||||||
Otherwise, copy primary file name to secondary
|
Otherwise, copy primary file name to secondary
|
||||||
buffer to save it in case RAM APPLESOFT is needed.
|
buffer to save it in case RAM APPLESOFT is needed.
|
||||||
Go to A57A to set APPLESOFT.
|
Go to A57A to set APPLESOFT.
|
||||||
.np
|
.np
|
||||||
|
|
|
@ -20,7 +20,7 @@ A59E-A5B1 INT command handler.
|
||||||
A5B2-A5C5 Set ROM to desired BASIC.
|
A5B2-A5C5 Set ROM to desired BASIC.
|
||||||
(This routine is passed a $4C for APPLESOFT or a $20
|
(This routine is passed a $4C for APPLESOFT or a $20
|
||||||
for INTEGER, since these bytes appear at $E000 in
|
for INTEGER, since these bytes appear at $E000 in
|
||||||
these BASICs. It will work regardless of which
|
these BASICs. It will work regardless of which
|
||||||
BASIC is onboard)
|
BASIC is onboard)
|
||||||
If desired BASIC is already available, exit.
|
If desired BASIC is already available, exit.
|
||||||
Try selecting ROM card.
|
Try selecting ROM card.
|
||||||
|
@ -76,7 +76,7 @@ A65E-A678 Test to see if BASIC is running a program or is in
|
||||||
immediate command mode.
|
immediate command mode.
|
||||||
If active BASIC is INTEGER, go to A672.
|
If active BASIC is INTEGER, go to A672.
|
||||||
If line number is greater than 65280 and prompt is
|
If line number is greater than 65280 and prompt is
|
||||||
"]" then APPLESOFT is in immediate mode.
|
"]" then APPLESOFT is in immediate mode.
|
||||||
Otherwise, it is executing a program.
|
Otherwise, it is executing a program.
|
||||||
Exit to caller with appropriate return code.
|
Exit to caller with appropriate return code.
|
||||||
A672 Check $D9 to determine whether BASIC is executing a
|
A672 Check $D9 to determine whether BASIC is executing a
|
||||||
|
|
|
@ -14,7 +14,7 @@ A909-A940 Command valid keywords table.
|
||||||
This table is used to determine which keywords are
|
This table is used to determine which keywords are
|
||||||
required or may be given for any DOS command.
|
required or may be given for any DOS command.
|
||||||
Each command has a two byte entry with 16 flags,
|
Each command has a two byte entry with 16 flags,
|
||||||
indicating which keywords may be given. The flag
|
indicating which keywords may be given. The flag
|
||||||
bit settings are as follows:
|
bit settings are as follows:
|
||||||
.ul
|
.ul
|
||||||
BIT MEANING
|
BIT MEANING
|
||||||
|
@ -71,7 +71,7 @@ A909-A940 Command valid keywords table.
|
||||||
.np
|
.np
|
||||||
A941-A94A Keyword name table.
|
A941-A94A Keyword name table.
|
||||||
This table contains all the ASCII names of the DOS
|
This table contains all the ASCII names of the DOS
|
||||||
keywords in standard order. Each keyword name
|
keywords in standard order. Each keyword name
|
||||||
occupies one byte:
|
occupies one byte:
|
||||||
V,D,S,L,R,B,A,C,I,O
|
V,D,S,L,R,B,A,C,I,O
|
||||||
.np
|
.np
|
||||||
|
@ -133,13 +133,13 @@ A971-AA3E Error message text table.
|
||||||
.np
|
.np
|
||||||
AA3F-AA4F Error message text offset index table.
|
AA3F-AA4F Error message text offset index table.
|
||||||
This table contains the offset in bytes to the text
|
This table contains the offset in bytes to the text
|
||||||
of any given error message in the table above.
|
of any given error message in the table above.
|
||||||
Entries are one byte each for each error code number.
|
Entries are one byte each for each error code number.
|
||||||
.np
|
.np
|
||||||
AA4F-AA65 DOS main routines variables.
|
AA4F-AA65 DOS main routines variables.
|
||||||
AA4F Current file buffer address (2 bytes).
|
AA4F Current file buffer address (2 bytes).
|
||||||
AA51 Status flags: $01=READ state, $00=Warmstart,
|
AA51 Status flags: $01=READ state, $00=Warmstart,
|
||||||
$80=Coldstart, $40=APPLESOFT RAM
|
$80=Coldstart, $40=APPLESOFT RAM
|
||||||
AA52 DOS CSWL intercept state number.
|
AA52 DOS CSWL intercept state number.
|
||||||
AA53 Address of true CSWL handler (2 bytes).
|
AA53 Address of true CSWL handler (2 bytes).
|
||||||
AA55 Address of true KSWL handler (2 bytes).
|
AA55 Address of true KSWL handler (2 bytes).
|
||||||
|
@ -202,7 +202,7 @@ AAFD-AB05 File manager external entry point (from $3D6).
|
||||||
Is X register zero?
|
Is X register zero?
|
||||||
If so, allow new files by simulating an INIT command
|
If so, allow new files by simulating an INIT command
|
||||||
index.
|
index.
|
||||||
Otherwise, require old file by simulating a LOAD
|
Otherwise, require old file by simulating a LOAD
|
||||||
command index.
|
command index.
|
||||||
Fall through to main file manager entry point.
|
Fall through to main file manager entry point.
|
||||||
.np
|
.np
|
||||||
|
|
|
@ -79,7 +79,7 @@ AC96-ACA7 READ A RANGE OF BYTES subcode handler.
|
||||||
Read a byte (ACA8).
|
Read a byte (ACA8).
|
||||||
Point $42,$43 at range address and add one to address
|
Point $42,$43 at range address and add one to address
|
||||||
Store byte read at address.
|
Store byte read at address.
|
||||||
Loop back to AC96. (length check will exit file
|
Loop back to AC96. (length check will exit file
|
||||||
manager when length is zero.)
|
manager when length is zero.)
|
||||||
.np
|
.np
|
||||||
ACA8-ACB8 Read a data byte.
|
ACA8-ACB8 Read a data byte.
|
||||||
|
@ -245,7 +245,7 @@ AE8E-AF07 INIT function handler.
|
||||||
Set up link from this directory sector to next (track
|
Set up link from this directory sector to next (track
|
||||||
$11, sector-1).
|
$11, sector-1).
|
||||||
Call RWTS to write directory sector.
|
Call RWTS to write directory sector.
|
||||||
Write each sector on track in this way except for
|
Write each sector on track in this way except for
|
||||||
sector zero.
|
sector zero.
|
||||||
On last sector (sector 1) zero link pointer.
|
On last sector (sector 1) zero link pointer.
|
||||||
Point RWTS parms at DOS load point (B7C2).
|
Point RWTS parms at DOS load point (B7C2).
|
||||||
|
|
|
@ -15,7 +15,7 @@ AF5E-AFDB Read a T/S List sector to file buffer.
|
||||||
Is first or next wanted?
|
Is first or next wanted?
|
||||||
If first, go to AFB5 to continue.
|
If first, go to AFB5 to continue.
|
||||||
Otherwise, get link to next T/S List from this one.
|
Otherwise, get link to next T/S List from this one.
|
||||||
If link is non-zero, use it to find next one and go
|
If link is non-zero, use it to find next one and go
|
||||||
to AFB5.
|
to AFB5.
|
||||||
Otherwise, we are out of T/S Lists for this file.
|
Otherwise, we are out of T/S Lists for this file.
|
||||||
If we are reading file, exit with error code.
|
If we are reading file, exit with error code.
|
||||||
|
@ -113,7 +113,7 @@ B0B6-B133 Read next data sector (if necessary).
|
||||||
If non-zero, go to B114.
|
If non-zero, go to B114.
|
||||||
Otherwise, if not writing, exit with error (no data
|
Otherwise, if not writing, exit with error (no data
|
||||||
to read there).
|
to read there).
|
||||||
If writing, allocate a new sector and store its
|
If writing, allocate a new sector and store its
|
||||||
track/sector location in the list at this point
|
track/sector location in the list at this point
|
||||||
(B134).
|
(B134).
|
||||||
Go to B120.
|
Go to B120.
|
||||||
|
@ -196,7 +196,7 @@ B23A-B243 Switch to second pass in directory scan.
|
||||||
B244-B2C2 Allocate a disk sector.
|
B244-B2C2 Allocate a disk sector.
|
||||||
Is there a track currently allocated to this file?
|
Is there a track currently allocated to this file?
|
||||||
If not, go to B26A to find a track with free sectors.
|
If not, go to B26A to find a track with free sectors.
|
||||||
B249 Otherwise, decrement sector number to get next
|
B249 Otherwise, decrement sector number to get next
|
||||||
possible free sector number.
|
possible free sector number.
|
||||||
If there are no more sectors on this track, go to
|
If there are no more sectors on this track, go to
|
||||||
B265 to find a new track.
|
B265 to find a new track.
|
||||||
|
@ -225,7 +225,7 @@ B244-B2C2 Allocate a disk sector.
|
||||||
Compute bit map index (tracknumber*4).
|
Compute bit map index (tracknumber*4).
|
||||||
Copy track bit map from VTOC to workarea, watching
|
Copy track bit map from VTOC to workarea, watching
|
||||||
to see if all four bytes are zero (track is full).
|
to see if all four bytes are zero (track is full).
|
||||||
In any case, set all four bytes in VTOC to zero
|
In any case, set all four bytes in VTOC to zero
|
||||||
(allocate all sectors).
|
(allocate all sectors).
|
||||||
If no free sectors in the track, go to B272 to try
|
If no free sectors in the track, go to B272 to try
|
||||||
next track.
|
next track.
|
||||||
|
@ -337,7 +337,7 @@ B4BB-B5BA DIRECTORY sector buffer.
|
||||||
B5BB-B5D0 File manager parameter list.
|
B5BB-B5D0 File manager parameter list.
|
||||||
B5BB Opcode
|
B5BB Opcode
|
||||||
B5BC Subcode
|
B5BC Subcode
|
||||||
B5BD Eight bytes of variable parameters depending on
|
B5BD Eight bytes of variable parameters depending on
|
||||||
opcode.
|
opcode.
|
||||||
B5C5 Return code.
|
B5C5 Return code.
|
||||||
B5C7 Address of file manager workarea buffer.
|
B5C7 Address of file manager workarea buffer.
|
||||||
|
@ -385,7 +385,7 @@ B600-B6FF Start of Boot 2/RWTS image.
|
||||||
on track 0, sector 0.
|
on track 0, sector 0.
|
||||||
B65D DOS 3.3 patch area.
|
B65D DOS 3.3 patch area.
|
||||||
B65D APPEND patch flag.
|
B65D APPEND patch flag.
|
||||||
B65E APPEND patch. Come here when file manager driver
|
B65E APPEND patch. Come here when file manager driver
|
||||||
gets an error other than end of data.
|
gets an error other than end of data.
|
||||||
Locate and free the file buffer.
|
Locate and free the file buffer.
|
||||||
Clear the APPEND flag.
|
Clear the APPEND flag.
|
||||||
|
|
|
@ -5,7 +5,7 @@ B700-B749 DOS 2nd stage boot loader.
|
||||||
Create new stack.
|
Create new stack.
|
||||||
Call SETVIC ($FE93) and SETKBD ($FE89).
|
Call SETVIC ($FE93) and SETKBD ($FE89).
|
||||||
Exit to DOS coldstart ($9D84).
|
Exit to DOS coldstart ($9D84).
|
||||||
.NP
|
.np
|
||||||
B74A-B78C Put DOS on tracks 0-2.
|
B74A-B78C Put DOS on tracks 0-2.
|
||||||
Set RWTS parmlist to write DOS to disk.
|
Set RWTS parmlist to write DOS to disk.
|
||||||
Call Read/Write group of pages ($B793).
|
Call Read/Write group of pages ($B793).
|
||||||
|
@ -20,7 +20,7 @@ B793-B7B4 Read/Write a group of pages.
|
||||||
B7B5-B7C1 Disable interrupts and call RWTS.
|
B7B5-B7C1 Disable interrupts and call RWTS.
|
||||||
.np
|
.np
|
||||||
B7C2-B7D5 Set RWTS parameters for writing DOS.
|
B7C2-B7D5 Set RWTS parameters for writing DOS.
|
||||||
.NP
|
.np
|
||||||
B7D6-B7DE Zero current buffer.
|
B7D6-B7DE Zero current buffer.
|
||||||
Zero 256 bytes pointed to by $42,$43.
|
Zero 256 bytes pointed to by $42,$43.
|
||||||
Exit to caller.
|
Exit to caller.
|
||||||
|
@ -51,14 +51,14 @@ B7E8-B7F8 RWTS parmlist.
|
||||||
B7F6 Volume number found.
|
B7F6 Volume number found.
|
||||||
B7F7 Slot number found.
|
B7F7 Slot number found.
|
||||||
B7F8 Drive number found.
|
B7F8 Drive number found.
|
||||||
.NP
|
.np
|
||||||
B7F9-B7FA Unused.
|
B7F9-B7FA Unused.
|
||||||
.NP
|
.np
|
||||||
B7FB-B7FE Device Characteristics Table (DCT).
|
B7FB-B7FE Device Characteristics Table (DCT).
|
||||||
B7FB Device type (should be $00).
|
B7FB Device type (should be $00).
|
||||||
B7FC Phases per track (should be $01).
|
B7FC Phases per track (should be $01).
|
||||||
B7FD Motor on time count (2 bytes - should be $EF, $D8).
|
B7FD Motor on time count (2 bytes - should be $EF, $D8).
|
||||||
.NP
|
.np
|
||||||
B7FF Unused.
|
B7FF Unused.
|
||||||
.np
|
.np
|
||||||
B800-B829 PRENIBBLE routine.
|
B800-B829 PRENIBBLE routine.
|
||||||
|
@ -128,7 +128,7 @@ B8DC-B943 READ routine.
|
||||||
B944-B99F RDADR routine.
|
B944-B99F RDADR routine.
|
||||||
Read an Address Field.
|
Read an Address Field.
|
||||||
Reads starting address marks ($D5/$AA/$96), address
|
Reads starting address marks ($D5/$AA/$96), address
|
||||||
information (volume/track/sector/checksum), and
|
information (volume/track/sector/checksum), and
|
||||||
closing address marks ($DE/$AA).
|
closing address marks ($DE/$AA).
|
||||||
On entry: X-reg:Slot number times 16
|
On entry: X-reg:Slot number times 16
|
||||||
Read mode (Q6L,Q7L)
|
Read mode (Q6L,Q7L)
|
||||||
|
@ -181,13 +181,13 @@ BA29-BA68 Write Translate Table.
|
||||||
Values range from $96 to $FF.
|
Values range from $96 to $FF.
|
||||||
Codes with more than one pair of adjacent zeros or
|
Codes with more than one pair of adjacent zeros or
|
||||||
with no adjacent ones are excluded.
|
with no adjacent ones are excluded.
|
||||||
.NP
|
.np
|
||||||
BA69-BA95 Unused.
|
BA69-BA95 Unused.
|
||||||
.np
|
.np
|
||||||
BA96-BAFF Read Translate Table.
|
BA96-BAFF Read Translate Table.
|
||||||
Contains 8 bit bytes used to convert 6 bit "nibbles".
|
Contains 8 bit bytes used to convert 6 bit "nibbles".
|
||||||
Values range from $96 to $FF.
|
Values range from $96 to $FF.
|
||||||
Codes with more than one pair of adjacent zeros or
|
Codes with more than one pair of adjacent zeros or
|
||||||
with no adjacent ones are excluded.
|
with no adjacent ones are excluded.
|
||||||
.np
|
.np
|
||||||
BB00-BBFF Primary Buffer.
|
BB00-BBFF Primary Buffer.
|
||||||
|
@ -220,7 +220,7 @@ BCC4-BCDE Write double byte subroutine.
|
||||||
BCDF-BCFF Unused.
|
BCDF-BCFF Unused.
|
||||||
.np
|
.np
|
||||||
BD00-BD18 Main entry to RWTS.
|
BD00-BD18 Main entry to RWTS.
|
||||||
Upon entry, store Y-reg and A-reg at $48,$49 as
|
Upon entry, store Y-reg and A-reg at $48,$49 as
|
||||||
pointers to the IOB.
|
pointers to the IOB.
|
||||||
Initialize maximum number of recals at 1 and seeks
|
Initialize maximum number of recals at 1 and seeks
|
||||||
at 4.
|
at 4.
|
||||||
|
@ -242,9 +242,9 @@ BD54-BD73 Move pointers in IOB to zero page for future use.
|
||||||
BD74-BD8F Select appropriate drive and save drive being used
|
BD74-BD8F Select appropriate drive and save drive being used
|
||||||
as high bit of $35. 1=drive 1, 0=drive 2.
|
as high bit of $35. 1=drive 1, 0=drive 2.
|
||||||
Get test results. If drive was on, branch to $BD90.
|
Get test results. If drive was on, branch to $BD90.
|
||||||
Wait for capacitor to discharge using MSWAIT
|
Wait for capacitor to discharge using MSWAIT
|
||||||
subroutine at $BA00.
|
subroutine at $BA00.
|
||||||
BD90-BDAA Get destination track and go to it using MYSEEK
|
BD90-BDAA Get destination track and go to it using MYSEEK
|
||||||
subroutine at $BE5A.
|
subroutine at $BE5A.
|
||||||
Check test result again and if drive was on,
|
Check test result again and if drive was on,
|
||||||
branch to TRYTRK at $BDAB.
|
branch to TRYTRK at $BDAB.
|
||||||
|
@ -281,17 +281,17 @@ BE0B-BE0C Used to branch to ALLDONE at $BE46.
|
||||||
BE0D-BF0F FORMDSK
|
BE0D-BF0F FORMDSK
|
||||||
Jump to DSKFORM at $BEAF.
|
Jump to DSKFORM at $BEAF.
|
||||||
BE10-BE25 RTTRK
|
BE10-BE25 RTTRK
|
||||||
Check volume number found against volume number
|
Check volume number found against volume number
|
||||||
wanted.
|
wanted.
|
||||||
If no volume was specified, then no error.
|
If no volume was specified, then no error.
|
||||||
If specified volume doesn't match, load A-reg with
|
If specified volume doesn't match, load A-reg with
|
||||||
$20 (volume mismatch error) and exit via HNDLERR
|
$20 (volume mismatch error) and exit via HNDLERR
|
||||||
at $BE48.
|
at $BE48.
|
||||||
BE26-BE45 CRCTVOL
|
BE26-BE45 CRCTVOL
|
||||||
Check to see if sector is correct.
|
Check to see if sector is correct.
|
||||||
Use ILFAV table at $BFB8 for software sector
|
Use ILFAV table at $BFB8 for software sector
|
||||||
interleaving.
|
interleaving.
|
||||||
If wrong sector, try again by branching back to
|
If wrong sector, try again by branching back to
|
||||||
TRYADR at $BDC1.
|
TRYADR at $BDC1.
|
||||||
If sector correct, find out what operation to do.
|
If sector correct, find out what operation to do.
|
||||||
If write, branch to WRIT at $BE51.
|
If write, branch to WRIT at $BE51.
|
||||||
|
@ -310,11 +310,11 @@ BE51-BE59 WRITE
|
||||||
If the write was good, exit via ALLDONE ($BE46).
|
If the write was good, exit via ALLDONE ($BE46).
|
||||||
If bad write, load A-reg with $10 (write protect
|
If bad write, load A-reg with $10 (write protect
|
||||||
error) and exit via HNDLERR ($BE48).
|
error) and exit via HNDLERR ($BE48).
|
||||||
BE5A-BE8D MYSEEK
|
BE5A-BE8D MYSEEK
|
||||||
Provides necessary housekeeping before going to
|
Provides necessary housekeeping before going to
|
||||||
SEEKABS routine.
|
SEEKABS routine.
|
||||||
Determines number of phases per track and stores
|
Determines number of phases per track and stores
|
||||||
track information in appropriate slot dependent
|
track information in appropriate slot dependent
|
||||||
location.
|
location.
|
||||||
BE8E-BE94 XTOY routine.
|
BE8E-BE94 XTOY routine.
|
||||||
Put slot in Y-reg by transferring X-reg divided
|
Put slot in Y-reg by transferring X-reg divided
|
||||||
|
@ -331,7 +331,7 @@ BEAF-BF0C INIT command handler
|
||||||
Allow 48 retries during initialization.
|
Allow 48 retries during initialization.
|
||||||
Double check that the first sector found is zero
|
Double check that the first sector found is zero
|
||||||
after calling TRACK WRITE.
|
after calling TRACK WRITE.
|
||||||
Increment the track number after successfully
|
Increment the track number after successfully
|
||||||
formatting a track.
|
formatting a track.
|
||||||
Loop back until 35 tracks are done.
|
Loop back until 35 tracks are done.
|
||||||
BF0D-BF61 TRACK WRITE routine.
|
BF0D-BF61 TRACK WRITE routine.
|
||||||
|
@ -339,7 +339,7 @@ BF0D-BF61 TRACK WRITE routine.
|
||||||
Preceed it with 128 self-sync bytes.
|
Preceed it with 128 self-sync bytes.
|
||||||
Follow them with sectors 0 through 15 in sequence.
|
Follow them with sectors 0 through 15 in sequence.
|
||||||
Set retry count for verifying the track at 48.
|
Set retry count for verifying the track at 48.
|
||||||
Fill the sector initilization map with positive
|
Fill the sector initilization map with positive
|
||||||
numbers.
|
numbers.
|
||||||
Loop through a delay period to bypass most of the
|
Loop through a delay period to bypass most of the
|
||||||
initial self-sync bytes.
|
initial self-sync bytes.
|
||||||
|
@ -355,7 +355,7 @@ BF62-BF87 VERIFY TRACK routine.
|
||||||
This routine reads all 16 sectors from the track that
|
This routine reads all 16 sectors from the track that
|
||||||
was just formatted.
|
was just formatted.
|
||||||
If an error occurs during the read of either the
|
If an error occurs during the read of either the
|
||||||
Address Field or the Data Field, the number of
|
Address Field or the Data Field, the number of
|
||||||
retries is decremented.
|
retries is decremented.
|
||||||
The routine continues reading until retries is zero.
|
The routine continues reading until retries is zero.
|
||||||
Calls Sector Map routine ($BF88).
|
Calls Sector Map routine ($BF88).
|
||||||
|
@ -367,7 +367,7 @@ BF88-BFA7 Sector Map routine.
|
||||||
if that value is greater than zero.
|
if that value is greater than zero.
|
||||||
Upon completion of track zero, the sync count is
|
Upon completion of track zero, the sync count is
|
||||||
decremented by two if it is at least 16.
|
decremented by two if it is at least 16.
|
||||||
.NP
|
.np
|
||||||
BFA8-BFB7 Sector Initialization Map used to mark sectors as
|
BFA8-BFB7 Sector Initialization Map used to mark sectors as
|
||||||
they are initialized.
|
they are initialized.
|
||||||
Contains a $30 prior to initialization of a track.
|
Contains a $30 prior to initialization of a track.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
.nf
|
.nf
|
||||||
.na
|
.na
|
||||||
DOS ZERO PAGE USAGE
|
DOS ZERO PAGE USAGE
|
||||||
.SP1
|
.sp1
|
||||||
.un
|
.un
|
||||||
BYTE USE
|
BYTE USE
|
||||||
24 Cursor horizontal (DOS)
|
24 Cursor horizontal (DOS)
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
.na
|
.na
|
||||||
.NF
|
.nf
|
||||||
.ce
|
.ce
|
||||||
TABLE OF CONTENTS
|
TABLE OF CONTENTS
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 1
|
CHAPTER 1
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
INTRODUCTION
|
INTRODUCTION
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 2
|
CHAPTER 2
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
THE EVOLUTION OF DOS
|
THE EVOLUTION OF DOS
|
||||||
.SP1
|
.sp1
|
||||||
DOS 3
|
DOS 3
|
||||||
DOS 3.1
|
DOS 3.1
|
||||||
DOS 3.2
|
DOS 3.2
|
||||||
DOS 3.2.1
|
DOS 3.2.1
|
||||||
DOS 3.3
|
DOS 3.3
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 3
|
CHAPTER 3
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
THE DISK II HARDWARE AND TRACK FORMATTING
|
THE DISK II HARDWARE AND TRACK FORMATTING
|
||||||
.SP1
|
.sp1
|
||||||
DISK ORGANIZATION
|
DISK ORGANIZATION
|
||||||
TRACK FORMATTING
|
TRACK FORMATTING
|
||||||
DATA FIELD ENCODING
|
DATA FIELD ENCODING
|
||||||
SECTOR INTERLEAVING
|
SECTOR INTERLEAVING
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 4
|
CHAPTER 4
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
DISKETTE DATA FORMATS
|
DISKETTE DATA FORMATS
|
||||||
.SP1
|
.sp1
|
||||||
DISKETTE SPACE ALLOCATION
|
DISKETTE SPACE ALLOCATION
|
||||||
THE VTOC
|
THE VTOC
|
||||||
THE CATALOG
|
THE CATALOG
|
||||||
|
@ -43,21 +43,21 @@ BINARY FILES
|
||||||
APPLESOFT AND INTEGER FILES
|
APPLESOFT AND INTEGER FILES
|
||||||
OTHER FILE TYPES (S,R,A,B)
|
OTHER FILE TYPES (S,R,A,B)
|
||||||
EMERGENCY REPAIRS
|
EMERGENCY REPAIRS
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 5
|
CHAPTER 5
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
THE STRUCTURE OF DOS
|
THE STRUCTURE OF DOS
|
||||||
.SP1
|
.sp1
|
||||||
DOS MEMORY USE
|
DOS MEMORY USE
|
||||||
THE DOS VECTORS IN PAGE 3
|
THE DOS VECTORS IN PAGE 3
|
||||||
WHAT HAPPENS DURING BOOTING
|
WHAT HAPPENS DURING BOOTING
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 6
|
CHAPTER 6
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
USING DOS FROM ASSEMBLY LANGUAGE
|
USING DOS FROM ASSEMBLY LANGUAGE
|
||||||
.SP1
|
.sp1
|
||||||
DIRECT USE OF DISK DRIVE
|
DIRECT USE OF DISK DRIVE
|
||||||
CALLING READ/WRITE TRACK/SECTOR (RWTS)
|
CALLING READ/WRITE TRACK/SECTOR (RWTS)
|
||||||
RWTS IOB BY CALL TYPE
|
RWTS IOB BY CALL TYPE
|
||||||
|
@ -65,50 +65,50 @@ CALLING THE DOS FILE MANAGER
|
||||||
FILE MANAGER PARAMETER LIST BY CALL TYPE
|
FILE MANAGER PARAMETER LIST BY CALL TYPE
|
||||||
THE FILE MANAGER WORKAREA
|
THE FILE MANAGER WORKAREA
|
||||||
COMMON ALGORITHMS
|
COMMON ALGORITHMS
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 7
|
CHAPTER 7
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
CUSTOMIZING DOS
|
CUSTOMIZING DOS
|
||||||
.SP1
|
.sp1
|
||||||
SLAVE VS MASTER PATCHING
|
SLAVE VS MASTER PATCHING
|
||||||
AVOIDING RELOAD OF LANGUAGE CARD
|
AVOIDING RELOAD OF LANGUAGE CARD
|
||||||
INSERTING A PROGRAM BETWEEN DOS AND ITS BUFFERS
|
INSERTING A PROGRAM BETWEEN DOS AND ITS BUFFERS
|
||||||
BRUN OR EXEC A HELLO FILE
|
BRUN OR EXEC A HELLO FILE
|
||||||
REMOVING THE PAUSE DURING A LONG CATALOG
|
REMOVING THE PAUSE DURING A LONG CATALOG
|
||||||
.SP3
|
.sp3
|
||||||
CHAPTER 8
|
CHAPTER 8
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
DOS PROGRAM LOGIC
|
DOS PROGRAM LOGIC
|
||||||
.SP1
|
.sp1
|
||||||
DISK II CONTROLLER CARD ROM - BOOT 0
|
DISK II CONTROLLER CARD ROM - BOOT 0
|
||||||
FIRST RAM BOOT STRAP LOADER - BOOT 1
|
FIRST RAM BOOT STRAP LOADER - BOOT 1
|
||||||
DOS 3.3 MAIN ROUTINES
|
DOS 3.3 MAIN ROUTINES
|
||||||
DOS FILE MANAGER
|
DOS FILE MANAGER
|
||||||
READ/WRITE TRACK/SECTOR
|
READ/WRITE TRACK/SECTOR
|
||||||
.BP
|
.bp
|
||||||
APPENDIX A
|
APPENDIX A
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
EXAMPLE PROGRAMS
|
EXAMPLE PROGRAMS
|
||||||
.SP1
|
.sp1
|
||||||
HOW TO USE THE PROGRAMS
|
HOW TO USE THE PROGRAMS
|
||||||
DUMP - TRACK DUMP PROGRAM
|
DUMP - TRACK DUMP PROGRAM
|
||||||
ZAP - DISK UPDATE PROGRAM
|
ZAP - DISK UPDATE PROGRAM
|
||||||
FTS - FIND TRACK/SECTOR LISTS PROGRAM
|
FTS - FIND TRACK/SECTOR LISTS PROGRAM
|
||||||
COPY - BINARY TO TEXT FILE CONVERT PROGRAM
|
COPY - BINARY TO TEXT FILE CONVERT PROGRAM
|
||||||
INIT - REFORMAT A SINGLE DISK TRACK
|
INIT - REFORMAT A SINGLE DISK TRACK
|
||||||
.SP3
|
.sp3
|
||||||
APPENDIX B
|
APPENDIX B
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
DISK PROTECTION SCHEMES
|
DISK PROTECTION SCHEMES
|
||||||
.SP3
|
.sp3
|
||||||
APPENDIX C
|
APPENDIX C
|
||||||
.SP1
|
.sp1
|
||||||
.UL
|
.ul
|
||||||
GLOSSARY
|
GLOSSARY
|
||||||
.SP3
|
.sp3
|
||||||
INDEX
|
INDEX
|
||||||
.BR
|
.br
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
.ec^
|
.ec^
|
||||||
.m11
|
.m11
|
||||||
.m22
|
.m22
|
||||||
.m48
|
.m48
|
||||||
.na
|
.na
|
||||||
.ll60
|
.ll60
|
||||||
.fo ''-%-
|
.fo ''-%-
|
||||||
.pn 5
|
.pn5
|
||||||
.pi 0
|
.pi0
|
||||||
.br
|
.br
|
||||||
.np
|
.np
|
||||||
.ce
|
.ce
|
||||||
|
@ -34,7 +34,7 @@ It is recommended that, until the
|
||||||
reader is completely familiar with
|
reader is completely familiar with
|
||||||
the operation of these programs, he
|
the operation of these programs, he
|
||||||
would be well advised to use them
|
would be well advised to use them
|
||||||
only on an "expendable" diskette.
|
only on an "expendable" diskette.
|
||||||
None of the programs can physically
|
None of the programs can physically
|
||||||
damage a diskette, but they can, if
|
damage a diskette, but they can, if
|
||||||
used improperly, destroy the data on
|
used improperly, destroy the data on
|
||||||
|
@ -43,7 +43,7 @@ re-INITialized.
|
||||||
.sp1
|
.sp1
|
||||||
Five programs are provided:
|
Five programs are provided:
|
||||||
.sp1
|
.sp1
|
||||||
.NF
|
.nf
|
||||||
DUMP TRACK DUMP UTILITY
|
DUMP TRACK DUMP UTILITY
|
||||||
.pi8
|
.pi8
|
||||||
.in8
|
.in8
|
||||||
|
@ -69,7 +69,7 @@ attempt to patch a diskette directory
|
||||||
back together. It is also useful in
|
back together. It is also useful in
|
||||||
examining the structure of files
|
examining the structure of files
|
||||||
stored on disk and in applying
|
stored on disk and in applying
|
||||||
patches to files or DOS directly.
|
patches to files or DOS directly.
|
||||||
ZAP allows its user to read, and
|
ZAP allows its user to read, and
|
||||||
optionally write, any sector on a
|
optionally write, any sector on a
|
||||||
diskette. As such, it serves as a
|
diskette. As such, it serves as a
|
||||||
|
@ -84,7 +84,7 @@ INIT REFORMAT A SINGLE TRACK
|
||||||
|
|
||||||
This program will initialize a single
|
This program will initialize a single
|
||||||
track on a diskette. Any volume
|
track on a diskette. Any volume
|
||||||
number ($00-$FF) may be specified.
|
number ($00-$FF) may be specified.
|
||||||
INIT is useful in restoring a track
|
INIT is useful in restoring a track
|
||||||
whose sectoring has been damaged
|
whose sectoring has been damaged
|
||||||
without reinitializing the entire
|
without reinitializing the entire
|
||||||
|
@ -97,7 +97,7 @@ FTS FIND T/S LISTS UTILITY
|
||||||
.in8
|
.in8
|
||||||
|
|
||||||
FTS may be used when the directory
|
FTS may be used when the directory
|
||||||
for a diskette has been destroyed.
|
for a diskette has been destroyed.
|
||||||
It searches every sector on a
|
It searches every sector on a
|
||||||
diskette for what appear to be
|
diskette for what appear to be
|
||||||
Track/Sector Lists, printing the
|
Track/Sector Lists, printing the
|
||||||
|
@ -131,7 +131,7 @@ the File Manager.
|
||||||
.pi0
|
.pi0
|
||||||
.in0
|
.in0
|
||||||
STORING THE PROGRAMS ON DISKETTE
|
STORING THE PROGRAMS ON DISKETTE
|
||||||
.pp
|
.pp
|
||||||
The enterprising programmer may wish
|
The enterprising programmer may wish
|
||||||
to type the source code for each
|
to type the source code for each
|
||||||
program into an assembler and
|
program into an assembler and
|
||||||
|
@ -160,10 +160,10 @@ be stored there
|
||||||
.sp1
|
.sp1
|
||||||
For example...
|
For example...
|
||||||
.sp1
|
.sp1
|
||||||
.NF
|
.nf
|
||||||
0800:20 DC 03 112 COPY JSR LOCFPL FIND PARMLIST
|
0800:20 DC 03 112 COPY JSR LOCFPL FIND PARMLIST
|
||||||
.SP1
|
.sp1
|
||||||
.FI
|
.fi
|
||||||
indicates that the binary code
|
indicates that the binary code
|
||||||
"20DC03" should be stored at 0800 and
|
"20DC03" should be stored at 0800 and
|
||||||
that this is statement 112. To enter
|
that this is statement 112. To enter
|
||||||
|
@ -172,14 +172,14 @@ must type in each address and its
|
||||||
corresponding object code. The
|
corresponding object code. The
|
||||||
following is an example of how to
|
following is an example of how to
|
||||||
enter the DUMP program:
|
enter the DUMP program:
|
||||||
.BP
|
.bp
|
||||||
.nf
|
.nf
|
||||||
CALL -151 (Enter the monitor from BASIC)
|
CALL -151 (Enter the monitor from BASIC)
|
||||||
0800:20 E3 03
|
0800:20 E3 03
|
||||||
0803:84 00
|
0803:84 00
|
||||||
0805:85 01
|
0805:85 01
|
||||||
0807:A5 02
|
0807:A5 02
|
||||||
.SP1
|
.sp1
|
||||||
...etc...
|
...etc...
|
||||||
.sp1
|
.sp1
|
||||||
0879:85 3F
|
0879:85 3F
|
||||||
|
@ -196,16 +196,16 @@ When the program is to be run...
|
||||||
BLOAD DUMP (Load program)
|
BLOAD DUMP (Load program)
|
||||||
CALL -151 (Get into monitor)
|
CALL -151 (Get into monitor)
|
||||||
02:11 N 800G (Store track to dump, run program)
|
02:11 N 800G (Store track to dump, run program)
|
||||||
.pp
|
.pp
|
||||||
The BSAVE commands which must be used
|
The BSAVE commands which must be used
|
||||||
with the other programs are:
|
with the other programs are:
|
||||||
.sp1
|
.sp1
|
||||||
BSAVE ZAP,A$900,L$6C
|
BSAVE ZAP,A$900,L$6C
|
||||||
.BR
|
.br
|
||||||
BSAVE INIT,A$800,L$89
|
BSAVE INIT,A$800,L$89
|
||||||
.BR
|
.br
|
||||||
BSAVE FTS,A$900,L$DC
|
BSAVE FTS,A$900,L$DC
|
||||||
.BR
|
.br
|
||||||
BSAVE COPY,A$800,L$1EC
|
BSAVE COPY,A$800,L$1EC
|
||||||
.bp
|
.bp
|
||||||
DUMP -- TRACK DUMP UTILITY
|
DUMP -- TRACK DUMP UTILITY
|
||||||
|
@ -230,7 +230,7 @@ I/O errors. The DUMP program serves
|
||||||
as an example of direct use of the
|
as an example of direct use of the
|
||||||
DISK II hardware from assembly
|
DISK II hardware from assembly
|
||||||
language, with little or no use of
|
language, with little or no use of
|
||||||
DOS.
|
DOS.
|
||||||
|
|
||||||
To use DUMP, first store the number
|
To use DUMP, first store the number
|
||||||
of the track you wish dumped at
|
of the track you wish dumped at
|
||||||
|
@ -278,7 +278,7 @@ The next step up the ladder from DUMP
|
||||||
is to access data on the diskette at
|
is to access data on the diskette at
|
||||||
the sector level. The ZAP program
|
the sector level. The ZAP program
|
||||||
allows its user to specify a track
|
allows its user to specify a track
|
||||||
and sector to be read into memory.
|
and sector to be read into memory.
|
||||||
The programmer can then make changes
|
The programmer can then make changes
|
||||||
in the image of the sector in memory
|
in the image of the sector in memory
|
||||||
and subsequently use ZAP to write the
|
and subsequently use ZAP to write the
|
||||||
|
@ -337,7 +337,7 @@ entered...
|
||||||
.nf
|
.nf
|
||||||
803:02 (Change 03 to 02)
|
803:02 (Change 03 to 02)
|
||||||
04:02 N 900G (Change ZAP to write mode and do it)
|
04:02 N 900G (Change ZAP to write mode and do it)
|
||||||
.pp
|
.pp
|
||||||
Note that ZAP will remember the
|
Note that ZAP will remember the
|
||||||
previous
|
previous
|
||||||
values in $02, $03, and $04.
|
values in $02, $03, and $04.
|
||||||
|
@ -448,7 +448,7 @@ printed by FTS to see if it is really
|
||||||
a T/S List. Additionally, FTS will
|
a T/S List. Additionally, FTS will
|
||||||
find every T/S List image on the
|
find every T/S List image on the
|
||||||
diskette, even some which were for
|
diskette, even some which were for
|
||||||
files which have since been deleted.
|
files which have since been deleted.
|
||||||
Since it is difficult to determine
|
Since it is difficult to determine
|
||||||
which files are valid and which are
|
which files are valid and which are
|
||||||
old deleted files, it is usually
|
old deleted files, it is usually
|
||||||
|
@ -484,7 +484,7 @@ read track $12, sector $0F. At +$0C
|
||||||
is the track and sector of the first
|
is the track and sector of the first
|
||||||
sector in the file. This sector can
|
sector in the file. This sector can
|
||||||
be read and examined to try to
|
be read and examined to try to
|
||||||
identify the file and its type.
|
identify the file and its type.
|
||||||
Usually a BASIC program can be
|
Usually a BASIC program can be
|
||||||
identified, even though it is stored
|
identified, even though it is stored
|
||||||
in tokenized form, from the text
|
in tokenized form, from the text
|
||||||
|
@ -492,7 +492,7 @@ strings contained in the PRINT
|
||||||
statements. An ASCII conversion
|
statements. An ASCII conversion
|
||||||
chart (see page 8 in the APPLE II
|
chart (see page 8 in the APPLE II
|
||||||
REFERENCE MANUAL) can be used to
|
REFERENCE MANUAL) can be used to
|
||||||
decode these character strings.
|
decode these character strings.
|
||||||
Straight T-type files will also
|
Straight T-type files will also
|
||||||
contain ASCII text, with each line
|
contain ASCII text, with each line
|
||||||
separated from the others with $8D
|
separated from the others with $8D
|
||||||
|
@ -509,8 +509,8 @@ something else. Given below is an
|
||||||
example ZAP to the CATALOG to create
|
example ZAP to the CATALOG to create
|
||||||
an entry for the file whose T/S List
|
an entry for the file whose T/S List
|
||||||
is at T=12 S=0F.
|
is at T=12 S=0F.
|
||||||
.SP1
|
.sp1
|
||||||
.NF
|
.nf
|
||||||
CALL -151
|
CALL -151
|
||||||
BLOAD ZAP
|
BLOAD ZAP
|
||||||
...insert disk to be ZAPped...
|
...insert disk to be ZAPped...
|
||||||
|
@ -531,7 +531,7 @@ found by FTS until all of the files
|
||||||
have been recovered. As each file is
|
have been recovered. As each file is
|
||||||
recovered, it may be RENAMEd to its
|
recovered, it may be RENAMEd to its
|
||||||
previous name. Once all the files
|
previous name. Once all the files
|
||||||
have been copied to another disk,
|
have been copied to another disk,
|
||||||
and successfully tested, the
|
and successfully tested, the
|
||||||
damaged disk may be re-INITialized.
|
damaged disk may be re-INITialized.
|
||||||
.bp
|
.bp
|
||||||
|
@ -549,7 +549,7 @@ file. The name of the input file is
|
||||||
assumed to be "INPUT", although this
|
assumed to be "INPUT", although this
|
||||||
could just as easily have been
|
could just as easily have been
|
||||||
inputted from the keyboard, and the
|
inputted from the keyboard, and the
|
||||||
name of the output file is "OUTPUT".
|
name of the output file is "OUTPUT".
|
||||||
COPY is a single drive operation,
|
COPY is a single drive operation,
|
||||||
using the last drive which was
|
using the last drive which was
|
||||||
referenced.
|
referenced.
|
||||||
|
|
|
@ -112,7 +112,7 @@ the order of the information,
|
||||||
doubling the sector numbers, or
|
doubling the sector numbers, or
|
||||||
altering the checksum with some
|
altering the checksum with some
|
||||||
constant. Any of the above would
|
constant. Any of the above would
|
||||||
cause an I/O error in a normal DOS.
|
cause an I/O error in a normal DOS.
|
||||||
Finally, we have the two closing
|
Finally, we have the two closing
|
||||||
bytes ($DE/$AA), which are similar to
|
bytes ($DE/$AA), which are similar to
|
||||||
the starting bytes, but with a
|
the starting bytes, but with a
|
||||||
|
@ -135,7 +135,7 @@ also. Switching the third bytes
|
||||||
between the two fields is an example
|
between the two fields is an example
|
||||||
of a protective measure. The data
|
of a protective measure. The data
|
||||||
portion consists of 342 bytes of
|
portion consists of 342 bytes of
|
||||||
data, followed by a checksum byte.
|
data, followed by a checksum byte.
|
||||||
Quite often the data is written so
|
Quite often the data is written so
|
||||||
that the checksum computation will be
|
that the checksum computation will be
|
||||||
non-zero, causing an error. The
|
non-zero, causing an error. The
|
||||||
|
@ -176,7 +176,7 @@ A state of the art protection scheme
|
||||||
consists of two elements. First, the
|
consists of two elements. First, the
|
||||||
data is stored on the diskette in
|
data is stored on the diskette in
|
||||||
some non-standard way in order to
|
some non-standard way in order to
|
||||||
make copying very difficult.
|
make copying very difficult.
|
||||||
Secondly, some portion of memory is
|
Secondly, some portion of memory is
|
||||||
utilized that will be altered upon a
|
utilized that will be altered upon a
|
||||||
RESET. (For example, the primary
|
RESET. (For example, the primary
|
||||||
|
@ -186,7 +186,7 @@ software from being removed from
|
||||||
memory intact.
|
memory intact.
|
||||||
|
|
||||||
Recently, several "nibble" or byte
|
Recently, several "nibble" or byte
|
||||||
copy programs have become available.
|
copy programs have become available.
|
||||||
Unlike traditional copy programs
|
Unlike traditional copy programs
|
||||||
which require the data to be in a
|
which require the data to be in a
|
||||||
predefined format, these utilities
|
predefined format, these utilities
|
||||||
|
@ -196,7 +196,7 @@ protected disks were first
|
||||||
introduced, it has been asked, "why
|
introduced, it has been asked, "why
|
||||||
can't a track be read into memory and
|
can't a track be read into memory and
|
||||||
then written back out to another
|
then written back out to another
|
||||||
diskette in exactly the same way?".
|
diskette in exactly the same way?".
|
||||||
The problem lies with the self-sync
|
The problem lies with the self-sync
|
||||||
or auto-sync bytes. (For a full
|
or auto-sync bytes. (For a full
|
||||||
discussion see Chapter 3) These
|
discussion see Chapter 3) These
|
||||||
|
@ -227,13 +227,13 @@ will expand the physical space needed
|
||||||
to write the track back out, since
|
to write the track back out, since
|
||||||
sync bytes require 25% more room. If
|
sync bytes require 25% more room. If
|
||||||
enough hex $FF's occur in the data,
|
enough hex $FF's occur in the data,
|
||||||
the track will overwrite itself.
|
the track will overwrite itself.
|
||||||
This can happen in general if the
|
This can happen in general if the
|
||||||
drive used to write the data is
|
drive used to write the data is
|
||||||
significantly slower than normal.
|
significantly slower than normal.
|
||||||
Thus, we are back to having to
|
Thus, we are back to having to
|
||||||
analyze the data and, in effect, make
|
analyze the data and, in effect, make
|
||||||
some assumptions. It appears that,
|
some assumptions. It appears that,
|
||||||
apart from using some
|
apart from using some
|
||||||
hardware device to help find the sync
|
hardware device to help find the sync
|
||||||
bytes, a software program must make
|
bytes, a software program must make
|
||||||
|
@ -255,7 +255,7 @@ nibble copy programs to rely heavily
|
||||||
upon the user for direction. If the
|
upon the user for direction. If the
|
||||||
present trend continues, it is very
|
present trend continues, it is very
|
||||||
likely that protection schemes will
|
likely that protection schemes will
|
||||||
evolve to a point where automated
|
evolve to a point where automated
|
||||||
techniques cannot be used to defeat
|
techniques cannot be used to defeat
|
||||||
them.
|
them.
|
||||||
.br
|
.br
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
APPENDIX C - GLOSSARY
|
APPENDIX C - GLOSSARY
|
||||||
.sp1
|
.sp1
|
||||||
.pn5
|
.pn5
|
||||||
.IN20
|
.in20
|
||||||
.PI-20
|
.pi-20
|
||||||
|
|
||||||
ACCESS TIME]>The time required to
|
ACCESS TIME]>The time required to
|
||||||
locate and read or write data on a
|
locate and read or write data on a
|
||||||
|
@ -31,7 +31,7 @@ ALPHANUMERIC]>An alphabetic character
|
||||||
term used to refer to the class of all
|
term used to refer to the class of all
|
||||||
characters and digits.
|
characters and digits.
|
||||||
|
|
||||||
ANALOG]>As opposed to digital.
|
ANALOG]>As opposed to digital.
|
||||||
Having a value which is continuous,
|
Having a value which is continuous,
|
||||||
such as a voltage or electrical
|
such as a voltage or electrical
|
||||||
resistance.
|
resistance.
|
||||||
|
@ -73,7 +73,7 @@ of a program or data against the
|
||||||
possibility of its accidental loss or
|
possibility of its accidental loss or
|
||||||
destruction.
|
destruction.
|
||||||
|
|
||||||
BASE]>The number system in use.
|
BASE]>The number system in use.
|
||||||
Decimal is base 10, since each digit
|
Decimal is base 10, since each digit
|
||||||
represents a power of 10
|
represents a power of 10
|
||||||
(1,10,100,...). Hexadecimal is base
|
(1,10,100,...). Hexadecimal is base
|
||||||
|
@ -155,7 +155,7 @@ predecessor via an address pointer.
|
||||||
CHECKSUM/CRC]>A method for verifying
|
CHECKSUM/CRC]>A method for verifying
|
||||||
that data has not been damaged. When
|
that data has not been damaged. When
|
||||||
data is written, the sum of all its
|
data is written, the sum of all its
|
||||||
constituent bytes is stored with it.
|
constituent bytes is stored with it.
|
||||||
If, when the data is later read, its
|
If, when the data is later read, its
|
||||||
sum no longer matches the checksum,
|
sum no longer matches the checksum,
|
||||||
it has been damaged.
|
it has been damaged.
|
||||||
|
@ -163,7 +163,7 @@ it has been damaged.
|
||||||
CLOBBERED]>Damaged or destroyed. A
|
CLOBBERED]>Damaged or destroyed. A
|
||||||
clobbered sector is one which has
|
clobbered sector is one which has
|
||||||
been overwritten such that it is
|
been overwritten such that it is
|
||||||
unrecoverable.
|
unrecoverable.
|
||||||
|
|
||||||
CODE]>Executable instructions to the
|
CODE]>Executable instructions to the
|
||||||
computer, usually in machine
|
computer, usually in machine
|
||||||
|
@ -233,7 +233,7 @@ contain a printable ASCII character, binary
|
||||||
numeric data, or a machine language
|
numeric data, or a machine language
|
||||||
instruction.
|
instruction.
|
||||||
|
|
||||||
DCT]>Device Characteristics Table.
|
DCT]>Device Characteristics Table.
|
||||||
Used as an input parameter table to
|
Used as an input parameter table to
|
||||||
Read/Write Track/Sector (RWTS) to
|
Read/Write Track/Sector (RWTS) to
|
||||||
describe the hardware characteristics
|
describe the hardware characteristics
|
||||||
|
@ -249,7 +249,7 @@ an executing BASIC program. OPEN,
|
||||||
READ, WRITE, and CLOSE are all
|
READ, WRITE, and CLOSE are all
|
||||||
examples of deferred commands.
|
examples of deferred commands.
|
||||||
|
|
||||||
DIGITAL]>As opposed to analog.
|
DIGITAL]>As opposed to analog.
|
||||||
Discrete values as opposed to
|
Discrete values as opposed to
|
||||||
continuous ones. Only digital values
|
continuous ones. Only digital values
|
||||||
may be stored in a computer. Analog
|
may be stored in a computer. Analog
|
||||||
|
@ -281,7 +281,7 @@ data stored there.
|
||||||
DISK INITIALIZATION]>The process
|
DISK INITIALIZATION]>The process
|
||||||
which places track formatting
|
which places track formatting
|
||||||
information, including sectors and
|
information, including sectors and
|
||||||
gaps, on a blank diskette.
|
gaps, on a blank diskette.
|
||||||
During disk initialization, DOS also
|
During disk initialization, DOS also
|
||||||
places a VTOC and directory on the
|
places a VTOC and directory on the
|
||||||
newly formatted disk, as well as
|
newly formatted disk, as well as
|
||||||
|
@ -289,7 +289,7 @@ saving the HELLO program.
|
||||||
|
|
||||||
DISPLACEMENT]>The distance from the
|
DISPLACEMENT]>The distance from the
|
||||||
beginning of a block of data to a
|
beginning of a block of data to a
|
||||||
particular byte or field.
|
particular byte or field.
|
||||||
Displacements are usually given
|
Displacements are usually given
|
||||||
beginning with 0, for the first byte,
|
beginning with 0, for the first byte,
|
||||||
1 for the second, etc. Also known as
|
1 for the second, etc. Also known as
|
||||||
|
@ -304,7 +304,7 @@ sends them to the printer.
|
||||||
|
|
||||||
DUMP]>An unformatted or partially
|
DUMP]>An unformatted or partially
|
||||||
formatted listing of the contents of
|
formatted listing of the contents of
|
||||||
memory or a diskette in hexadecimal.
|
memory or a diskette in hexadecimal.
|
||||||
Used for diagnostic purposes.
|
Used for diagnostic purposes.
|
||||||
|
|
||||||
ENCODE]>To translate data from one
|
ENCODE]>To translate data from one
|
||||||
|
@ -316,7 +316,7 @@ on a DISK II.
|
||||||
|
|
||||||
ENTRY POINT (EPA)]>The entry point
|
ENTRY POINT (EPA)]>The entry point
|
||||||
address is the location within a
|
address is the location within a
|
||||||
program where execution is to start.
|
program where execution is to start.
|
||||||
This is not necessarily the same as
|
This is not necessarily the same as
|
||||||
the load point (or lowest memory
|
the load point (or lowest memory
|
||||||
address in the program).
|
address in the program).
|
||||||
|
@ -414,7 +414,7 @@ because it easily converts with
|
||||||
binary.
|
binary.
|
||||||
|
|
||||||
HIGH MEMORY]>Those memory locations
|
HIGH MEMORY]>Those memory locations
|
||||||
which have high address values.
|
which have high address values.
|
||||||
$FFFF is the highest memory location.
|
$FFFF is the highest memory location.
|
||||||
Also called the "top" of memory.
|
Also called the "top" of memory.
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ block of storage.
|
||||||
|
|
||||||
INSTRUCTION]>A single step to be
|
INSTRUCTION]>A single step to be
|
||||||
performed in an assembly language or
|
performed in an assembly language or
|
||||||
machine language program.
|
machine language program.
|
||||||
Instructions perform such operations
|
Instructions perform such operations
|
||||||
as addition, subtraction, store, or
|
as addition, subtraction, store, or
|
||||||
load.
|
load.
|
||||||
|
@ -482,7 +482,7 @@ disk or cassette tape.
|
||||||
JMP]>A 6502 assembly langauge
|
JMP]>A 6502 assembly langauge
|
||||||
instruction which causes the computer
|
instruction which causes the computer
|
||||||
to begin executing instructions at a
|
to begin executing instructions at a
|
||||||
different location in memory.
|
different location in memory.
|
||||||
Similar to a GOTO statement in BASIC.
|
Similar to a GOTO statement in BASIC.
|
||||||
|
|
||||||
JSR]>A 6502 assembly langauge
|
JSR]>A 6502 assembly langauge
|
||||||
|
@ -500,7 +500,7 @@ from the keyboard or a remote
|
||||||
terminal.
|
terminal.
|
||||||
|
|
||||||
LABEL]>A name associated with a
|
LABEL]>A name associated with a
|
||||||
location in a program or in memory.
|
location in a program or in memory.
|
||||||
Labels are used in assembly langauge
|
Labels are used in assembly langauge
|
||||||
much like statement numbers are used
|
much like statement numbers are used
|
||||||
in BASIC.
|
in BASIC.
|
||||||
|
@ -521,7 +521,7 @@ array of data items.
|
||||||
|
|
||||||
LOAD POINT (LP)]>The lowest address
|
LOAD POINT (LP)]>The lowest address
|
||||||
of a loaded assembly language
|
of a loaded assembly language
|
||||||
program -- the first byte loaded.
|
program -- the first byte loaded.
|
||||||
Not necessarily the same as the entry
|
Not necessarily the same as the entry
|
||||||
point address (EPA).
|
point address (EPA).
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ or Least Significant Byte. The 1's
|
||||||
bit in a byte or the second pair of
|
bit in a byte or the second pair of
|
||||||
hexadecimal digits forming an
|
hexadecimal digits forming an
|
||||||
address. In the address $8030, $30
|
address. In the address $8030, $30
|
||||||
is the LO order part of the address.
|
is the LO order part of the address.
|
||||||
|
|
||||||
MASTER DISK]>A DOS diskette which
|
MASTER DISK]>A DOS diskette which
|
||||||
will boot in an APPLE II of any size
|
will boot in an APPLE II of any size
|
||||||
|
@ -602,7 +602,7 @@ stored as a file on a diskette.
|
||||||
|
|
||||||
OFFSET]>The distance from the
|
OFFSET]>The distance from the
|
||||||
beginning of a block of data to a
|
beginning of a block of data to a
|
||||||
particular byte or field.
|
particular byte or field.
|
||||||
Offsets are usually given
|
Offsets are usually given
|
||||||
beginning with 0, for the first byte,
|
beginning with 0, for the first byte,
|
||||||
1 for the second, etc. Also known as
|
1 for the second, etc. Also known as
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
PAGE]>256 bytes of memory which share
|
PAGE]>256 bytes of memory which share
|
||||||
a common high order address byte.
|
a common high order address byte.
|
||||||
Zero page is the first 256 bytes of
|
Zero page is the first 256 bytes of
|
||||||
memory ($0000 through $00FF).
|
memory ($0000 through $00FF).
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ a separate line or wire.
|
||||||
|
|
||||||
PARAMETER LIST]>An area of storage
|
PARAMETER LIST]>An area of storage
|
||||||
set aside for communication between
|
set aside for communication between
|
||||||
a calling program and a subroutine.
|
a calling program and a subroutine.
|
||||||
The parameter list contains input and
|
The parameter list contains input and
|
||||||
output variables which will be used
|
output variables which will be used
|
||||||
by the subroutine.
|
by the subroutine.
|
||||||
|
@ -57,7 +57,7 @@ beginning of a disk field which
|
||||||
uniquely identify it from any other
|
uniquely identify it from any other
|
||||||
data on the track.
|
data on the track.
|
||||||
|
|
||||||
PROM]>Programmable Read Only Memory.
|
PROM]>Programmable Read Only Memory.
|
||||||
PROMs are usually used on controller
|
PROMs are usually used on controller
|
||||||
cards associated with peripherals to
|
cards associated with peripherals to
|
||||||
hold the driver program which
|
hold the driver program which
|
||||||
|
@ -120,7 +120,7 @@ RELEASE]>A version of a distributed
|
||||||
piece of software. There have been
|
piece of software. There have been
|
||||||
several releases of DOS.
|
several releases of DOS.
|
||||||
|
|
||||||
RELOCATABLE]>The attribute of
|
RELOCATABLE]>The attribute of
|
||||||
an object module file
|
an object module file
|
||||||
which contains a machine language
|
which contains a machine language
|
||||||
program and the information necessary
|
program and the information necessary
|
||||||
|
@ -131,7 +131,7 @@ RETURN CODE]>A numeric value returned
|
||||||
from a subroutine, indicating the
|
from a subroutine, indicating the
|
||||||
success or failure of the operation
|
success or failure of the operation
|
||||||
attempted. A return code of zero
|
attempted. A return code of zero
|
||||||
usually means there were no errors.
|
usually means there were no errors.
|
||||||
Any other value indicates the nature
|
Any other value indicates the nature
|
||||||
of the error, as defined by the
|
of the error, as defined by the
|
||||||
design of the subroutine.
|
design of the subroutine.
|
||||||
|
@ -195,7 +195,7 @@ DOS image will always be loaded into
|
||||||
the same memory location, regadless
|
the same memory location, regadless
|
||||||
of the size of the machine.
|
of the size of the machine.
|
||||||
|
|
||||||
SOFT ERROR]>A recoverable I/O error.
|
SOFT ERROR]>A recoverable I/O error.
|
||||||
A worn diskette might produce soft
|
A worn diskette might produce soft
|
||||||
errors occasionally.
|
errors occasionally.
|
||||||
|
|
||||||
|
@ -252,13 +252,13 @@ Also called "strobe".
|
||||||
TOKENS]>A method where human
|
TOKENS]>A method where human
|
||||||
recognizable words may be coded to
|
recognizable words may be coded to
|
||||||
single binary byte values for memory
|
single binary byte values for memory
|
||||||
compression and faster processing.
|
compression and faster processing.
|
||||||
BASIC statements are tokenized, where
|
BASIC statements are tokenized, where
|
||||||
hex codes are assigned to words like
|
hex codes are assigned to words like
|
||||||
IF, PRINT, and END.
|
IF, PRINT, and END.
|
||||||
|
|
||||||
TRACK]>One complete circular path of
|
TRACK]>One complete circular path of
|
||||||
magnetic storage on a diskette.
|
magnetic storage on a diskette.
|
||||||
There are 35 concentric tracks on an APPLE
|
There are 35 concentric tracks on an APPLE
|
||||||
diskette.
|
diskette.
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ sector number for each of its data
|
||||||
sectors in the order that they are to
|
sectors in the order that they are to
|
||||||
be read or written.
|
be read or written.
|
||||||
|
|
||||||
TTL]>Transistor to Transistor Logic.
|
TTL]>Transistor to Transistor Logic.
|
||||||
A standard for the interconnection of
|
A standard for the interconnection of
|
||||||
integrated circuits which also
|
integrated circuits which also
|
||||||
defines the which voltages
|
defines the which voltages
|
||||||
|
@ -295,7 +295,7 @@ VOLUME]>An identification for a
|
||||||
diskette, disk platter, or cassette,
|
diskette, disk platter, or cassette,
|
||||||
containing one or more files.
|
containing one or more files.
|
||||||
|
|
||||||
VTOC]>Volume Table Of Contents.
|
VTOC]>Volume Table Of Contents.
|
||||||
Based upon the IBM OS/VS VTOC. On
|
Based upon the IBM OS/VS VTOC. On
|
||||||
the APPLE, a sector mapping the
|
the APPLE, a sector mapping the
|
||||||
free sectors on the diskette and
|
free sectors on the diskette and
|
||||||
|
|
|
@ -25,7 +25,7 @@ Q7H with Q6L = Write
|
||||||
Q7H with Q6H = Load Write Latch
|
Q7H with Q6H = Load Write Latch
|
||||||
.bp
|
.bp
|
||||||
SIG 3-4
|
SIG 3-4
|
||||||
.SP3
|
.sp3
|
||||||
8-5
|
8-5
|
||||||
.sp1
|
.sp1
|
||||||
9E9E If EXECing, call A682 to get the next byte from the
|
9E9E If EXECing, call A682 to get the next byte from the
|
||||||
|
@ -37,9 +37,9 @@ SIG 3-4
|
||||||
8-8
|
8-8
|
||||||
.sp1
|
.sp1
|
||||||
table of valid keywords (A941).
|
table of valid keywords (A941).
|
||||||
.SP3
|
.sp3
|
||||||
8-9
|
8-9
|
||||||
.SP1
|
.sp1
|
||||||
A1AE-A1B8 Clear the file manager parameter list at B5BB to
|
A1AE-A1B8 Clear the file manager parameter list at B5BB to
|
||||||
.sp3
|
.sp3
|
||||||
8-13
|
8-13
|
||||||
|
@ -55,9 +55,9 @@ AACA-ACD9 WRITE A RANGE OF BYTES subcode handler.
|
||||||
ACDA-ACEE Write a data byte.
|
ACDA-ACEE Write a data byte.
|
||||||
.sp3
|
.sp3
|
||||||
8-27
|
8-27
|
||||||
.SP1
|
.sp1
|
||||||
AF3A Otherwise, set up RWTS pointer (AF4B).
|
AF3A Otherwise, set up RWTS pointer (AF4B).
|
||||||
.SP1
|
.sp1
|
||||||
next (C=1)).
|
next (C=1)).
|
||||||
.sp3
|
.sp3
|
||||||
8-28
|
8-28
|
||||||
|
@ -78,13 +78,13 @@ B134-B15A Add a new data sector to file.
|
||||||
8-34
|
8-34
|
||||||
.sp1
|
.sp1
|
||||||
Call SETVID ($FE93) and SETKBD ($FE89).
|
Call SETVID ($FE93) and SETKBD ($FE89).
|
||||||
.SP3
|
.sp3
|
||||||
8-35
|
8-35
|
||||||
.SP1
|
.sp1
|
||||||
$20=Volume mismatch, $40=Drive error, $08=INIT error.
|
$20=Volume mismatch, $40=Drive error, $08=INIT error.
|
||||||
.sp1
|
.sp1
|
||||||
Uses Write Translate Table ($BA29).
|
Uses Write Translate Table ($BA29).
|
||||||
.SP3
|
.sp3
|
||||||
8-37
|
8-37
|
||||||
.sp1
|
.sp1
|
||||||
Y-reg:number of autosyncs to write
|
Y-reg:number of autosyncs to write
|
||||||
|
@ -92,7 +92,7 @@ B134-B15A Add a new data sector to file.
|
||||||
8-39
|
8-39
|
||||||
.sp1
|
.sp1
|
||||||
Jump to DSKFORM at $BEAF.
|
Jump to DSKFORM at $BEAF.
|
||||||
.SP1
|
.sp1
|
||||||
Use ILEAV table at $BFB8 for software sector
|
Use ILEAV table at $BFB8 for software sector
|
||||||
.sp3
|
.sp3
|
||||||
8-41
|
8-41
|
||||||
|
@ -100,7 +100,7 @@ B134-B15A Add a new data sector to file.
|
||||||
BFC8-BFD8 Patch area starts here.
|
BFC8-BFD8 Patch area starts here.
|
||||||
.bp
|
.bp
|
||||||
SIG 5-6
|
SIG 5-6
|
||||||
.SP3
|
.sp3
|
||||||
A-16
|
A-16
|
||||||
.sp1
|
.sp1
|
||||||
using ZAP to patch a catalog entry into track 17 for each
|
using ZAP to patch a catalog entry into track 17 for each
|
||||||
|
|
|
@ -25,6 +25,9 @@ join in--send patches, help add stuff, etc.
|
||||||
* Escape all else in C-style
|
* Escape all else in C-style
|
||||||
3. Remove NUL at end of .txt files
|
3. Remove NUL at end of .txt files
|
||||||
4. .pp dot command is paragraph break, replace with blank line.
|
4. .pp dot command is paragraph break, replace with blank line.
|
||||||
|
5. Remove trailing whitespace
|
||||||
|
6. Normalize case and spacing of dot commands (lowercase here)
|
||||||
|
|
||||||
|
|
||||||
This has probably broken the .s files a bit, and I haven't bothered to decompile
|
This has probably broken the .s files a bit, and I haven't bothered to decompile
|
||||||
the five byte HELLO ... ;)
|
the five byte HELLO ... ;)
|
||||||
|
|
Loading…
Reference in New Issue