Remove trailing nulls, .pp tags

PIEWriter dot codes are case-insensitive, and I've deciphered that .pp is a
paragraph break.  Replace those with blank lines.  The NUL at EOF was escaped,
but it can be simply deleted.  Did so.
This commit is contained in:
T. Joseph Carter 2017-07-20 15:08:22 -07:00
parent 1d9b739d80
commit 27bcf5f79c
27 changed files with 355 additions and 381 deletions

View File

@ -12,7 +12,7 @@
.ce
CHAPTER 1 - INTRODUCTION
.sp 2
.pp
Beneath Apple DOS is intended
to serve as a companion to Apple's
DOS Manual, providing additional
@ -35,7 +35,7 @@ contents of the DOS Manual. Since
all chapters presented here may not
be of use to each Apple owner, each
has been written to stand on its own.
.pp
The information presented here is a
result of intensive disassembly and
annotation of various versions of DOS
@ -53,7 +53,7 @@ presented here, all of the material
included in Beneath Apple DOS has
been thoroughly researched and
tested.
.pp
There were several reasons
for writing Beneath Apple DOS:
.SP1
@ -68,7 +68,7 @@ To allow you to customize DOS to fit your needs.
.br
To provide complete information on diskette formatting.
.br
.pp
When Apple Computer Inc. introduced
its Disk Operating System (DOS)
version 3 in 1978 to support the
@ -95,7 +95,7 @@ where the
Disk Operating System
Manual leaves off.
.bp
.pp
Throughout this manual, discussion
centers primarily on DOS version
3.3. The reasons for this are that 3.3
@ -106,7 +106,7 @@ would imagine. Wherever there is a
major difference between the various
DOS releases in a given topic, each
release will be covered.
.pp
In addition to the DOS dependent
information provided, many of the
discussions also apply to
@ -117,4 +117,3 @@ the track and sector level is, for
the most part, the same.
.br
.nx ch2
\x00

View File

@ -3,7 +3,7 @@
.ce
CHAPTER 2 - THE EVOLUTION OF DOS
.sp 2
.pp
Since its introduction, Apple DOS has
gone through three major versions.
All of these versions look
@ -22,7 +22,7 @@ fit on a track from 13 to 16.
DOS 3 - 29 June 1978
.br
DOS 3.1 - 20 July 1978
.pp
The first release of DOS was
apparently a victim of a rush at
Apple to introduce the DISK II. As
@ -32,7 +32,7 @@ and the introduction of the AUTOSTART
ROM, a new release was needed.
.SP1
DOS 3.2 - 16 February 1979
.pp
Although DOS 3.2 embodied more
changes from its
predecessor than any other release of
@ -44,37 +44,37 @@ are listed below:
.pi-2
.in2
.ps0
.pp
- NOMON C,I,O is the initial default
under DOS 3.2. MON C,I,O was the
default under DOS 3.1.
.pp
- Input prompts (>,],*) are echoed
when MON O is in effect, not under
MON I as was the case under 3.1.
.pp
- When a DOS command was entered from
the keyboard, DOS executed it and
then passed a blank followed by a
carriage return to BASIC under 3.1. Under 3.2
only a carriage return is passed.
.pp
- Under 3.2, certain commands may not
be entered from the keyboard but may
only be used within a BASIC program
(READ, WRITE, POSITION, OPEN,
APPEND).
.pp
- Under 3.2, when LOADing an APPLESOFT program,
DOS automatically
converts from APPLESOFT ROM format to
APPLESOFT RAM format if the RAM version of
BASIC is in use and vice versa.
.pp
- DOS 3.1 could not read lower case
characters from a text file; DOS 3.2
can.
.pp
.bp
- Some DOS commands are allowed to
create a new file, others will not.
@ -88,30 +88,30 @@ XYZ, and then printed the file not
found error message.) Under 3.2, OPEN
is allowed to create a file if one
does not exist, but LOAD may not.
.pp
- Under 3.1, exiting to the monitor
required that the monitor status
register location ($48) be set to
zero before reentering DOS. Under DOS
3.2 this is no longer necessary.
.pp
- The Read/Write-Track/Sector (RWTS)
section of DOS disables interrupts
while it is executing. Under 3.1,
RWTS could be interrupted by a
peripheral while writing to a disk,
destroying the disk.
.pp
- The default for the B (byte offset) keyword is 0
under 3.2.
.pp
- DOS was reassembled for 3.2 causing most of
its interesting locations and
routines to move slightly. This
played havoc with user programs and
utilities which had DOS addresses
built into them.
.pp
- Additional file types (beyond
T, I, A, and B) are defined within
DOS 3.2, although no commands yet
@ -122,14 +122,14 @@ DOS TOOLKIT for relocatable object
module assembler files. At present,
no other use is made of these
extra file types.
.pp
- Support was added under 3.2 for the
AUTOSTART ROM.
.pp
- All files open when a disk full
condition occurs are closed by DOS
3.2.
.pp
- As with each new release of DOS,
several new programs were added to
the master diskette for 3.2. Among
@ -145,7 +145,7 @@ renamed.
.ps1
.sp1
DOS 3.2.1 - 31 July 1979
.PP
DOS 3.2.1 was essentially a
"maintenance release" of DOS 3.2.
Minor patches were made to RWTS and
@ -155,7 +155,7 @@ done. Additional delays were added
following a switch between drives.
.bp
DOS 3.3 - 25 August 1980
.PP
Introduced in mid 1980 as a
hardware/software upgrade from DOS
3.2.1, the DOS 3.3 package includes
@ -183,7 +183,7 @@ received a few patches:
.pi-2
.in2
.ps0
.pp
- The initial DOS bootstrap loader
was moved to $800 under 3.3. It was
at $300 under 3.2. In addition, as
@ -191,16 +191,16 @@ stored on the diskette (track 0
sector 0) it is nibbilized in the
same way as all other sectors under
3.3.
.pp
- A bug in APPEND which caused it to
position improperly if the file was a
multiple of 256 bytes long was fixed
under 3.3.
.pp
- A VERIFY command is internally
executed after every SAVE or BSAVE
under 3.3.
.pp
- All 4 bytes are used in the Volume
Table Of Contents (VTOC) free sector bit map when
keeping track of free sectors. This
@ -208,20 +208,20 @@ allows DOS to handle up to 32 sectors
per track. Of course, RWTS will only
handle 16 sectors due to hardware
limitations.
.pp
- If a LANGUAGE CARD is present, DOS
stores a zero on it at $E000 during
bootstrap to force the HELLO program
on the master diskette to reload
BASIC.
.pp
- DOS is read into memory from the
top down (backwards) under 3.3 rather than the
bottom up. Its image is
still stored in the same order on the
diskette (tracks 0, 1, and 2),
however.
.pp
- Additional programs added to the
master diskette under 3.3 include
FID, a generalized file utility which
@ -234,7 +234,7 @@ will boot a 13 sector diskette,
and a new COPY program
which will also support single drive
copies.
.pp
- Under 3.2, speed differences in
some drives prevented their use
together with the DOS COPY program.
@ -246,4 +246,3 @@ applies.
.in0
.ps1
.nx ch3.1
\x00

View File

@ -3,7 +3,7 @@
.ce
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
.sp 2
.pp
Apple Computer's excellent manual on
the Disk Operating System (DOS)
provides only very basic information
@ -14,7 +14,7 @@ diskette. The first section will
contain a brief introduction to the
hardware, and may be skipped by those
already familiar with the DOS manual.
.pp
For system housekeeping, DOS divides
diskettes into tracks and sectors.
This is done during the
@ -43,7 +43,7 @@ tracks, although they are invisible
to the eye on a real diskette.
.sp1
*** INSERT FIGURE 3.1 HERE ***
.pp
It should be pointed out, for the
sake of accuracy, that the disk arm
can position itself over 70 "phases".
@ -67,7 +67,7 @@ two phases from one another. See
APPENDIX B for more information on
protection schemes.
.bp
.pp
A sector is a subdivision of a track.
It is the smallest unit of
"updatable" data on the diskette.
@ -130,14 +130,14 @@ USABLE* BYTES PER DISKETTE
* Excludes DOS, VTOC, and CATALOG
.bp
TRACK FORMATTING
.pp
Up to this point we have broken down
the structure of data to the track
and sector level. To better
understand how
data is stored and retrieved, we will
start at the bottom and work up.
.pp
As this manual is primarily concerned
with software, no attempt will be
made to deal with the specifics of
@ -150,7 +150,7 @@ hardware converts analog data to
digital data but how this is
accomplished is beyond the scope of
this manual.
.pp
Data is recorded on the diskette
using frequency modulation as the
recording mode. Each data bit
@ -163,7 +163,7 @@ pattern shown represents a binary
value of 101.
.sp1
*** INSERT FIGURE 3.2 HERE ***
.pp
As can be seen in Figure 3.3, the
clock bits and data bits (if present)
are interleaved. The presence of a
@ -177,7 +177,7 @@ bit and the leading edge of the next
clock bit.
.sp1
*** INSERT FIGURE 3.3 HERE ***
.PP
A byte would consist of eight (8)
consecutive bit cells. The most
significant bit cell is usually
@ -200,7 +200,7 @@ illustrates the relationship of the
bits within a byte.
.bp
*** INSERT FIGURE 3.4 HERE ***
.PP
To graphically show how bits are
stored and retrieved, we must take
certain liberties. The diagrams are
@ -218,7 +218,7 @@ embodies the function of data flow to
and from the diskette.
.sp1
*** INSERT FIGURE 3.5 HERE ***
.pp
Figure 3.5 shows the three bits, 101,
being read from the diskette data
stream into the data latch. Of
@ -229,7 +229,7 @@ clock bits. This task is done by the
hardware and is shown more for
accuracy than for its importance to
our discussion.
.pp
Writing data can be depicted in much
the same way (see Figure 3.6).
The clock bits which
@ -250,7 +250,7 @@ Self-sync bytes will be covered in
detail shortly.
.sp1
*** INSERT FIGURE 3.6 HERE ***
.PP
A "field" is made up of a group of
consecutive
bytes. The number of bytes varies,
@ -273,7 +273,7 @@ computer time
to decode the address field before
the corresponding data field can pass
beneath the read/write head.
.pp
All gaps are primarily alike in
content, consisting of self-sync
hexadecimal FF's, and vary only in
@ -283,7 +283,7 @@ of a typical track, broken into its
major components.
.bp
*** INSERT FIGURE 3.7 HERE ***
.PP
Self-sync or auto-sync bytes are
special bytes that make up the three
different types of gaps on a track.
@ -325,14 +325,14 @@ have been stripped out and 0's and
1's have been used for clarity.
.sp1
*** INSERT FIGURE 3.8 HERE ***
.pp
There is no way from looking at the
data to tell what bytes are
represented, because we don't know
where to start. This is exactly the
problem that self-sync bytes
overcome.
.pp
A self-sync byte is defined to be a
hexadecimal FF with a special
difference. It is, in fact, a 10 bit
@ -344,7 +344,7 @@ elsewhere on the disk and a self-sync
hex FF byte.
.bp
*** INSERT FIGURE 3.9 HERE ***
.pp
A self-sync is generated by using a
40 cycle (micro-second) loop while
writing an FF. A bit is written
@ -378,7 +378,7 @@ the data unless there is an error on
the track.
.sp1
*** INSERT FIGURE 3.10 ***
.PP
We can now discuss the particular
portions of a track in detail. The
three gaps will be covered first.
@ -395,7 +395,7 @@ bytes must be maintained for
each gap type (as discussed earlier).
The result is fairly uniform gap
sizes within each particular track.
.pp
Gap 1 is the first data written to a
track during initialization. Its
purpose is twofold. The gap
@ -422,7 +422,7 @@ as a Gap 3 type for Address Field
number 0 (See Figure 3.7 for
clarity).
.bp
.pp
Gap 2 appears after each Address
Field and before each Data Field.
Its length varies from five to ten bytes
@ -474,7 +474,7 @@ byte. Figure 3.12 illustrates this.
*** INSERT FIGURE 3.11 HERE ***
.SP1
*** INSERT FIGURE 3.12 HERE ***
.PP
Gap 3 appears after each
Data Field and before each Address
Field. It is longer than Gap 2 and
@ -498,7 +498,7 @@ the first part of the gap can be
overwritten or damaged. (See Figure
3.11 for clarity)
.bp
.pp
An examination of the contents of the
two types of fields is in order.
The Address Field contains
@ -516,7 +516,7 @@ detailed illustration is given in
Figure 3.13.
.sp1
*** INSERT FIGURE 3.13 HERE ***
.PP
The prologue consists of three bytes
which form a unique sequence, found
in no other component of the track.
@ -552,7 +552,7 @@ that the drive is still in sync with
the bytes on the disk. These bytes
are probably unnecessary, but do
provide a means of double checking.
.pp
The other field type is the Data
Field. Much like the Address Field,
it consists of a prologue, data,
@ -575,4 +575,3 @@ in the Address Field and it serves
the same function.
.bp
.nx ch3.2
\x00

View File

@ -3,7 +3,7 @@
.ce
CHAPTER 3 - DISK II HARDWARE AND TRACK FORMATTING
.sp 2
.pp
Apple Computer's excellent manual on
the Disk Operating System (DOS)
provides only very basic information
@ -14,7 +14,7 @@ diskette. The first section will
contain a brief introduction to the
hardware, and may be skipped by those
already familiar with the DOS manual.
.pp
For system housekeeping, DOS divides
diskettes into tracks and sectors.
This is done during the
@ -43,7 +43,7 @@ tracks, although they are invisible
to the eye on a real diskette.
.sp1
*** INSERT FIGURE 3.1 HERE ***
.pp
It should be pointed out, for the
sake of accuracy, that the disk arm
can position itself over 70 "phases".
@ -67,7 +67,7 @@ two phases from one another. See
APPENDIX B for more information on
protection schemes.
.bp
.pp
A sector is a subdivision of a track.
It is the smallest unit of
"updatable" data on the diskette.
@ -130,14 +130,14 @@ USABLE* BYTES PER DISKETTE
* Excludes DOS, VTOC, and CATALOG
.bp
TRACK FORMATTING
.pp
Up to this point we have broken down
the structure of data to the track
and sector level. To better
understand how
data is stored and retrieved, we will
start at the bottom and work up.
.pp
As this manual is primarily concerned
with software, no attempt will be
made to deal with the specifics of
@ -150,7 +150,7 @@ hardware converts analog data to
digital data but how this is
accomplished is beyond the scope of
this manual.
.pp
Data is recorded on the diskette
using frequency modulation as the
recording mode. Each data bit
@ -163,7 +163,7 @@ pattern shown represents a binary
value of 101.
.sp1
*** INSERT FIGURE 3.2 HERE ***
.pp
As can be seen in Figure 3.3, the
clock bits and data bits (if present)
are interleaved. The presence of a
@ -177,7 +177,7 @@ bit and the leading edge of the next
clock bit.
.sp1
*** INSERT FIGURE 3.3 HERE ***
.PP
A byte would consist of eight (8)
consecutive bit cells. The most
significant bit cell is usually
@ -200,7 +200,7 @@ illustrates the relationship of the
bits within a byte.
.bp
*** INSERT FIGURE 3.4 HERE ***
.PP
To graphically show how bits are
stored and retrieved, we must take
certain liberties. The diagrams are
@ -218,7 +218,7 @@ embodies the function of data flow to
and from the diskette.
.sp1
*** INSERT FIGURE 3.5 HERE ***
.pp
Figure 3.5 shows the three bits, 101,
being read from the diskette data
stream into the data latch. Of
@ -229,7 +229,7 @@ clock bits. This task is done by the
hardware and is shown more for
accuracy than for its importance to
our discussion.
.pp
Writing data can be depicted in much
the same way (see Figure 3.6).
The clock bits which
@ -250,7 +250,7 @@ Self-sync bytes will be covered in
detail shortly.
.sp1
*** INSERT FIGURE 3.6 HERE ***
.PP
A "field" is made up of a group of
consecutive
bytes. The number of bytes varies,
@ -273,7 +273,7 @@ computer time
to decode the address field before
the corresponding data field can pass
beneath the read/write head.
.pp
All gaps are primarily alike in
content, consisting of self-sync
hexadecimal FF's, and vary only in
@ -283,7 +283,7 @@ of a typical track, broken into its
major components.
.bp
*** INSERT FIGURE 3.7 HERE ***
.PP
Self-sync or auto-sync bytes are
special bytes that make up the three
different types of gaps on a track.
@ -325,14 +325,14 @@ have been stripped out and 0's and
1's have been used for clarity.
.sp1
*** INSERT FIGURE 3.8 HERE ***
.pp
There is no way from looking at the
data to tell what bytes are
represented, because we don't know
where to start. This is exactly the
problem that self-sync bytes
overcome.
.pp
A self-sync byte is defined to be a
hexadecimal FF with a special
difference. It is, in fact, a 10 bit
@ -344,7 +344,7 @@ elsewhere on the disk and a self-sync
hex FF byte.
.bp
*** INSERT FIGURE 3.9 HERE ***
.pp
A self-sync is generated by using a
40 cycle (micro-second) loop while
writing an FF. A bit is written
@ -378,7 +378,7 @@ the data unless there is an error on
the track.
.sp1
*** INSERT FIGURE 3.10 ***
.PP
We can now discuss the particular
portions of a track in detail. The
three gaps will be covered first.
@ -395,7 +395,7 @@ bytes must be maintained for
each gap type (as discussed earlier).
The result is fairly uniform gap
sizes within each particular track.
.pp
Gap 1 is the first data written to a
track during initialization. Its
purpose is twofold. The gap
@ -422,7 +422,7 @@ as a Gap 3 type for Address Field
number 0 (See Figure 3.7 for
clarity).
.bp
.pp
Gap 2 appears after each Address
Field and before each Data Field.
Its length varies from five to ten bytes
@ -474,7 +474,7 @@ byte. Figure 3.12 illustrates this.
*** INSERT FIGURE 3.11 HERE ***
.SP1
*** INSERT FIGURE 3.12 HERE ***
.PP
Gap 3 appears after each
Data Field and before each Address
Field. It is longer than Gap 2 and
@ -498,7 +498,7 @@ the first part of the gap can be
overwritten or damaged. (See Figure
3.11 for clarity)
.bp
.pp
An examination of the contents of the
two types of fields is in order.
The Address Field contains
@ -516,7 +516,7 @@ detailed illustration is given in
Figure 3.13.
.sp1
*** INSERT FIGURE 3.13 HERE ***
.PP
The prologue consists of three bytes
which form a unique sequence, found
in no other component of the track.
@ -552,7 +552,7 @@ that the drive is still in sync with
the bytes on the disk. These bytes
are probably unnecessary, but do
provide a means of double checking.
.pp
The other field type is the Data
Field. Much like the Address Field,
it consists of a prologue, data,
@ -560,4 +560,4 @@ checksum, and an epilogue. (Refer to
Figure 3.14) The prologue is
different only in the third byte.
The bytes are $D5, $AA, and $AD,
which again form a
which again form a

View File

@ -1,6 +1,6 @@
.SP2
DATA FIELD ENCODING
.pp
Due to Apple's hardware, it is not
possible to read all 256 possible
byte values from a diskette.
@ -22,7 +22,7 @@ This amounts to about 88K of data per
diskette, or roughly 72K of space
available to the user; typical for 5
1/4 single density drives.
.pp
Fortunately, a second technique for
writing data to diskette was devised
that allows 13
@ -39,7 +39,7 @@ track format used by DOS 3 through
DOS 3.2.1. The "5 and 3" scheme
represented a hefty 33% increase over
comparable drives of the day.
.pp
Currently, of course, DOS 3.3
features 16 sectors per track and
provides a 23% increase in disk
@ -52,7 +52,7 @@ was to the logic of the "state
machine" in the P6 PROM, now allowing
two consecutive zero bits in data
bytes.
.pp
These three different encoding
techniques
will now be covered in some detail.
@ -74,7 +74,7 @@ are all set to one to guarantee
meeting the two requirements.
.sp1
*** INSERT FIGURE 3.15 HERE ***
.PP
No matter what value the original
data data byte has, this technique
insures that the high bit is set and
@ -90,7 +90,7 @@ the byte containing the even bits.
This is illustrated in Figure 3.16.
.sp1
*** INSERT FIGURE 3.16 HERE ***
.PP
It is important that the least
significant bit contain a 1 when the
odd-bits byte is left shifted. The
@ -98,7 +98,7 @@ entire
operation is carried out in the
RDADR subroutine at $B944 in DOS
(48K).
.pp
The major difficulty with the above
technique is that it takes up a lot of
room on the track. To overcome this
@ -126,7 +126,7 @@ An overview is diagrammed in Figure
3.17.
.sp1
*** INSERT FIGURE 3.17 HERE ***
.PP
First, the 256 bytes that will make
up a sector must be translated to
five bit bytes. This is done by the
@ -150,7 +150,7 @@ contains three areas, graphically
illustrating the name "5 and 3".
.bp
*** INSERT FIGURE 3.18 HERE ***
.PP
A total of 410 bytes are needed to
store the original 256. This can be
calculated by finding the total bits
@ -166,7 +166,7 @@ involving a one to one look-up in the
table given in Figure 3.19.
.sp1
*** INSERT FIGURE 3.19 HERE ***
.pp
The Data Field has a checksum much
like the one in the Address Field,
used to verify the integrity of the
@ -181,7 +181,7 @@ Figure 3.19. This can best be
illustrated by Figure 3.20 on the following page.
.sp1
*** INSERT FIGURE 3.20 HERE ***
.PP
The reason for this transformation
can be better understood by examining
how the information is retrieved from
@ -205,7 +205,7 @@ for that point in the series.
This process is diagrammed in Figure 3.21.
.bp
*** INSERT FIGURE 3.21 HERE ***
.pp
The third encoding technique, currently
used by DOS 3.3, is similar to the "5
and 3". It was made possible by a
@ -238,7 +238,7 @@ is done by the prenibble routine
results are shown in Figure 3.22.
.sp1
*** INSERT FIGURE 3.22 (20) HERE ***
.PP
A total of 342 bytes are needed,
shown by finding the total number of
bits (256 x 8 = 2048) and dividing by
@ -255,7 +255,7 @@ of exclusive-ORs, exactly as with the
*** INSERT FIGURE 3.23 (21) HERE ***
.sp1
SECTOR INTERLEAVING
.PP
Sector interleaving is the staggering
of sectors on a track to maximize
access speed. There is usually a
@ -287,7 +287,7 @@ are stored in descending sequential
order, no single interleaving scheme
works well for both booting and
sequentially accessing a file.
.pp
A different approach has been used in
DOS 3.3 in an attempt to maximize
performance. The interleaving is now
@ -309,7 +309,7 @@ problem if RWTS is used for disk
access, but would become a
consideration if access were made
without RWTS.
.pp
To eliminate the access differences
between booting and reading files,
another change has been made. During
@ -319,7 +319,7 @@ order into memory, just as files are
accessed. This means one
interleaving scheme can minimize disk
access time.
.pp
It is interesting to point out that
Pascal, Fortran, and CP/M diskettes
all use software interleaving also.
@ -331,4 +331,3 @@ differences is presented in Figure
*** INSERT FIGURE 3.24 (22) HERE ***
.br
.nxch4
\x00

View File

@ -2,7 +2,7 @@
.np
.ce
CHAPTER 4 - DISKETTE DATA FORMATS
.pp
As was described in CHAPTER 3, a 16
sector diskette consists of 560 data
areas of 256 bytes each, called
@ -12,7 +12,7 @@ rings or tracks of 16 sectors each.
The way DOS allocates these tracks of
sectors is the subject of
this chapter.
.pp
A file (be it APPLESOFT,
INTEGER, BINARY, or TEXT type)
consists of one or more sectors
@ -42,7 +42,7 @@ DOS uses sectors is given in Figure
*** INSERT FIGURE 4.1 ***
.sp1
DISKETTE SPACE ALLOCATION
.pp
The map in Figure 4.1 shows that the
first three tracks of each diskette
are always reserved for the bootstrap
@ -80,7 +80,7 @@ track is allocated elsewhere on the
disk in the manner described above.
.bp
THE VTOC
.pp
The Volume Table Of Contents is the "anchor" of the
entire diskette. On any diskette
accessible by any version of DOS, the
@ -146,7 +146,7 @@ BIT MAPS OF FREE SECTORS ON A GIVEN TRACK
If all sectors are free:
FFFF0000
.pp
An example of a VTOC sector is given
in Figure 4.2. This VTOC corresponds
to the map of the diskette given in
@ -156,7 +156,7 @@ Figure 4.1.
.bp
THE CATALOG
.ll30
.pp
In order for DOS to find a given
file, it must first read the VTOC to
find out where the first catalog
@ -189,7 +189,7 @@ that there are no more catalog
sectors in the chain.
.SP1
*** INSERT FIGURE 4.3 ***
.PP
In each catalog
sector up to seven files may be
listed and described. Thus, on a
@ -251,7 +251,7 @@ BYTE DESCRIPTION
this length giving 1-255 but a full 65,535 may be
stored here.
.sp
.pp
Figure 4.4 is an example of a typical
catalog sector. In this example there
are only four files on the entire
@ -264,7 +264,7 @@ and contain zeros.
*** INSERT FIGURE 4.4 ***
.SP1
THE TRACK/SECTOR LIST
.PP
Each file has
associated with it a "Track/Sector
List" sector. This sector contains a
@ -309,7 +309,7 @@ BYTE DESCRIPTION
0E-0F Track and sector of second data sector or zeros
10-FF Up to 120 more Track/Sector pairs
.sp1
.pp
A sequential file will end when the first zero T/S List entry
is encountered. A random file, however, can have spaces within
it which were never allocated and therefore
@ -318,7 +318,7 @@ in the T/S List. This distinction is not always handled
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
to verify some random organization text files.
.pp
An example T/S List sector is given in Figure 4.6.
The example file (HELLO, from our
previous examples) has only one data
@ -352,7 +352,7 @@ that the data was broken up into
sectors at all.
.SP1
TEXT FILES
.pp
The TEXT data type is the least
complicated
file data structure. It consists of
@ -393,7 +393,7 @@ file.
*** INSERT FIGURE 4.7 ***
.bp
BINARY FILES
.pp
The structure of a BINARY type file is
shown in Figure 4.8. An exact copy of
the memory involved is written to the
@ -423,7 +423,7 @@ the diskette.
*** INSERT FIGURE 4.8 ***
.SP1
APPLESOFT AND INTEGER FILES
.pp
A BASIC program, be it APPLESOFT or
INTEGER, is saved to the diskette in
a way that is similar to BSAVE. The
@ -457,7 +457,7 @@ BASIC program is given in Figure
*** INSERT FIGURES 4.9 AND 4.10 ***
.bp
OTHER FILE TYPES (S,R,A,B)
.pp
Additional file types have been
defined within DOS as can be seen in
the file descriptive entry format,
@ -485,7 +485,7 @@ about R files he should refer to that
documentation.
.sp1
EMERGENCY REPAIRS
.PP
From time to time the information on
a diskette can become damaged or
lost. This can create various
@ -499,7 +499,7 @@ and a few program tools can allow any
reasonably sharp APPLE II user to
patch up most errors on his
diskettes.
.pp
A first question would be, "how do
errors occur". The most common cause
of an error is a worn or physically
@ -517,7 +517,7 @@ the files on
the aged diskette to a brand new one
and discards the old one or keeps it
as a backup.
.pp
Another cause of damaged diskettes is
the practice of hitting the RESET key
to abort the execution of a program
@ -553,7 +553,7 @@ checksum (see CHAPTER 3) it may be
possible to read the bad sector and
ignore the error and get most of the
data.
.pp
An I/O error usually means that one
of two conditions has occured. Either
a bad checksum was detected on the
@ -571,7 +571,7 @@ to copy all readable sectors from the
damaged diskette to another formatted
diskette and then reconstruct the
lost data there.
.pp
Many commercially available utilities
exist which allow the user to
read and display the contents of
@ -616,7 +616,7 @@ files periodically to simplify
recovery. More information on the
above procedures is given in APPENDIX
A.
.pp
A less significant form of diskette
clobber, but very annoying, is the
loss of free sectors. Since DOS
@ -644,7 +644,7 @@ another diskette (note that FID must
be used, not COPY, since COPY copies
an image of the diskette, bad VTOC
and all).
.pp
If a file is deleted it can usually
be recovered, providing that
additional sector allocations have
@ -661,4 +661,3 @@ and then the original deleted so that
the VTOC freespace bit map will
be updated.
.nx ch5
\x00

View File

@ -4,7 +4,7 @@
CHAPTER 5 - THE STRUCTURE OF DOS
.sp 2
DOS MEMORY USE
.pp
DOS is an assembly language program
which is loaded into RAM memory when
the user boots his disk. If the
@ -39,7 +39,7 @@ occupied does not exist on a smaller
machine.
.SP1
*** INSERT FIGURE 5.1 ***
.pp
A diagram of DOS's memory for a 48K
APPLE II is given in
Figure 5.1. As can be seen, there are
@ -58,7 +58,7 @@ the file buffers also changes. This
affects the placement of HIMEM,
moving it up or down with fewer or
more buffers respectively.
.pp
The 3.5K
above the file buffers is occupied by
the main DOS routines. It is here
@ -86,7 +86,7 @@ of DOS. This interface is generalized
through a group of vectors in page 3
of RAM and is documented in the next
chapter.
.pp
The last 2.5K of DOS is the
Read/Write Track/Sector (RWTS)
package. RWTS is the next step lower
@ -107,7 +107,7 @@ the next chapter.
.ne5
THE DOS VECTORS IN PAGE 3
.ll30
.pp
In addition to the approximately 10K
of RAM occupied by DOS in high
memory, DOS maintains a group of what
@ -199,7 +199,7 @@ ADDR USAGE
a maskable interrupt occurs.
.bp
WHAT HAPPENS DURING BOOTING
.PP
When an APPLE is powered on its
memory is essentially devoid of any
programs. In order to get DOS
@ -218,7 +218,7 @@ in Figure 5.2 and a description of
the bootstrap process follows.
.SP1
*** INSERT FIGURE 5.2 ***
.pp
The first boot stage (let's call it
Boot 0) is the execution of the ROM
on the disk controller card. When the
@ -242,7 +242,7 @@ $300). Once this sector is read, the
first stage boot jumps (GOTO's) $800
which is the second stage boot (Boot
1).
.pp
Boot 1, also about 256 bytes long,
uses part of the Boot 0 ROM as a
subroutine and, in a loop, reads the
@ -336,7 +336,7 @@ that it will execute properly at its
new home. The relocator then jumps to
the high memory copy of DOS and the
old image is forgotten.
.pp
The DOS boot is completed by the DOS
coldstart routine. This code
initializes DOS, making space for the
@ -363,7 +363,7 @@ form of nibbilization (see chapter 3)
than any other sector on the
diskette, making its raw appearance
in memory at $3600 non-executable.
.pp
The various stages of the bootstrap
process will be covered again in greater
detail in Chapter 8, DOS PROGRAM
@ -372,4 +372,3 @@ LOGIC.
*** INSERT FIGURE 5.3 HERE ***
.BR
.NX CH6.1
\x00

View File

@ -4,7 +4,7 @@
CHAPTER 6 - USING DOS FROM ASSEMBLY LANGUAGE
.sp1
CAVEAT
.PP
This chapter is aimed at the advanced
assembly language programmer who
wishes to access the disk without
@ -17,7 +17,7 @@ present) of a programmer who has
never used assembly language.
.sp2
DIRECT USE OF DISK DRIVE
.PP
It is often desirable or necessary to
access the Apple's disk drives
directly from assembly language,
@ -78,7 +78,7 @@ generally desirable to write code
that is not slot dependent, one would
normally use $C08A,X (where the
X register contains the value $s0).
.pp
In general, the above addresses need
only be accessed with any valid 6502
instruction. However, in the case of
@ -92,7 +92,7 @@ number 1. (Assume slot number 6)
LDA $C0EA
BIT $C08A,X (where X-reg contains $60)
CMP $C08A,X (where X-reg contains $60)
.pp
Below are typical examples
demonstrating the use of the device
address assignments. For more
@ -101,7 +101,7 @@ assumed and the X-register contains
$60.
.sp1
STEPPER PHASE OFF/ON:
.PP
Basically, each of the four phases
(0-3) must be turned on and then off
again. Done in ascending order, this
@ -169,7 +169,7 @@ NOTE: $C08F,X must already have been
accessed to insure Write mode and a
100 microsecond delay should be
invoked before writing.
.pp
Due to hardware constraints, data
bytes must be written in 32 cycle
loops. Below is an example for an
@ -197,7 +197,7 @@ without an adjustment.
RTS (6)
.SP2
CALLING READ/WRITE TRACK/SECTOR (RWTS)
.pp
Read/Write Track/Sector (RWTS) exists
in every version of DOS as a
collection of subroutines, occupying
@ -206,11 +206,11 @@ program. The interface to RWTS is
standardized and thoroughly documented by Apple
and may be called by a
program running outside of DOS.
.pp
There are two subroutines which must
be called or whose function must be
performed.
.pp
JSR $3E3 - When this subroutine is
called, the Y and A registers are
loaded with the address of the
@ -227,7 +227,7 @@ to RWTS. Of course, you may set up
your own IOB as long as the Y and A
registers point to your IOB upon
calling RWTS.
.pp
JSR $3D9 - This is the main entry to
the RWTS routine. Prior to making
this call, the Y and A registers must
@ -356,4 +356,3 @@ Output: Byte 0D - Return code (See previous definition)
10 - Current Drive number
.bp
.nx ch6.2
\x00

View File

@ -1,5 +1,5 @@
CALLING THE DOS FILE MANAGER
.pp
The DOS file manager exists in every
version of DOS as a collection of
subroutines occupying approximately
@ -20,7 +20,7 @@ these routines may be relied upon as
program
uses these routines to process files
on the diskette.
.pp
There are
two subroutines which must be called
in order to access the file manager.
@ -289,7 +289,7 @@ Input: Byte 00 - 0C
Output: Byte 0A - Return code
.bp
DOS BUFFERS
.pp
Usually it is desirable to use one of DOS's buffers when
calling the file manager to save memory. DOS buffers consist of
each of the three buffers used by the file manager (file
@ -336,7 +336,7 @@ BYTE DESCRIPTION
the chain then this field contains zeros.
.bp
THE FILE MANAGER WORKAREA
.pp
The file manager workarea contains
the variables which, taken together,
constitute all of the information the
@ -398,13 +398,13 @@ BYTE DESCRIPTION
2A/2C Not used
.bp
COMMON ALGORITHMS
.PP
Given below are several pieces of code
which are used when working with DOS:
.SP1
.ne5
LOCATE A FREE DOS BUFFER
.PP
The following subroutine may be used
to locate an unallocated DOS buffer
for use with the DOS file manager.
@ -438,7 +438,7 @@ NBUF SEC INDICATE-NO FREE BUFFERS
RTS RETURN TO CALLER
.bp
IS DOS IN THE MACHINE?
.PP
The following series of instructions
should be used prior to attempting to
call RWTS or the file manager to
@ -452,7 +452,7 @@ machine.
.SP2
.ne5
WHICH VERSION OF DOS IS ACTIVE?
.pp
In case the program has version dependent code, a check of
the DOS version may be required:
.sp1
@ -498,7 +498,7 @@ SETBSC CMP $E000 CORRECT BASIC ALREADY THERE?
\x2c\x40\x42\x5b\x33\x03\x61\x9fTS RTS IN ANY CASE, EXIT TO CALLER
.bp
SEE IF A BASIC PROGRAM IS IN EXECUTION
.PP
To determine if there is a BASIC program running or
if BASIC is in immediate command mode, use the following
statements:
@ -519,4 +519,3 @@ statements:
BNE EXEC ELSE, PROGRAM IS EXECUTING
.br
.nx ch7
\x00

View File

@ -3,7 +3,7 @@
.ce
CHAPTER 7 - CUSTOMIZING DOS
.sp1
.PP
Although DOS usually provides most of
the functionality needed by the BASIC
or assembly language programmer, at
@ -22,7 +22,7 @@ implications of each change can
result in an unreliable system.
.sp1
SLAVE VS MASTER PATCHING
.PP
The usual procedure for making
changes to DOS involves "patching"
the object or machine language code
@ -78,7 +78,7 @@ DOS.
.SP1
.ne5
AVOIDING RELOAD OF LANGUAGE CARD
.PP
A rather annoying addition to DOS 3.3
was a patch to the Boot 2 code to
store a binary zero in the first byte
@ -122,7 +122,7 @@ store instruction for a 32K DOS is
7FD3 and for a 16K DOS is 3FD3.
.sp1
INSERTING A PROGRAM BETWEEN DOS AND ITS BUFFERS
.pp
Once in a while it is useful to find
a "safe" place to load a machine
language program (a printer driver,
@ -154,7 +154,7 @@ since its HIMEM is below the DOS
buffers.
.bp
BRUN OR EXEC THE HELLO FILE
.pp
Ordinarily, when DOS finishes booting
into memory, it performs a RUN
command on the HELLO file in its file
@ -170,7 +170,7 @@ following patch to DOS (48K):
.sp1
.ne5
REMOVING THE PAUSE DURING A LONG CATALOG
.pp
Normally, when a CATALOG command is
done on a disk with many files, DOS
will pause every time the screen
@ -186,4 +186,3 @@ patch to DOS (48K):
.bp
.st waiting for ch8 diskette
.nx ch8
\x00

View File

@ -12,7 +12,7 @@
.ce
CHAPTER 8 - DOS PROGRAM LOGIC
.sp1
.PP
This chapter will take a detailed
look at the operation of the DOS
program itself to aid the APPLE user
@ -377,4 +377,3 @@ ADDRESS
9FCD-A179 DOS command parse routine.
.br
.nx ch8.1
\x00

View File

@ -163,4 +163,3 @@ A298-A2A2 APPEND command handler.
and turn flag off.
Exit via a call to POSITION.
.nx ch8.2
\x00

View File

@ -218,4 +218,3 @@ A54F-A56D INIT command handler.
.np
A56E-A579 CATALOG command handler.
.nx ch8.3
\x00

View File

@ -219,4 +219,3 @@ A851-A883 Replace DOS keyboard/video intercept vectors.
address.
Exit to caller.
.nx ch8.4
\x00

View File

@ -253,4 +253,3 @@ AB28-ABDB Common open routine.
And write it back (AF3A).
Set return code to 6 ("FILE NOT FOUND").
.nx ch8.5
\x00

View File

@ -278,4 +278,3 @@ AF34-AF4A Checkpoint write T/S List sector buffer to disk.
need of checkpoint.
Exit to caller.
.nx ch8.6
\x00

View File

@ -406,4 +406,3 @@ B600-B6FF Start of Boot 2/RWTS image.
B6FF Number of sectors (pages) in Boot 2.
.br
.nx ch8.7
\x00

View File

@ -402,4 +402,3 @@ BFED-BFFF Patch called from $B377.
Exit through $B385 ("DISK FULL ERROR").
.br
.nx ch8 zpage use
\x00

View File

@ -50,4 +50,3 @@ D6 APPLESOFT BASIC PROGRAM protection flag (DOS)
D8,D9 INTEGER BASIC line number (DOS)
APPLESOFT BASIC ONERR (DOS)
.br
\x00

View File

@ -112,4 +112,3 @@ GLOSSARY
.SP3
INDEX
.BR
\x00

View File

@ -12,7 +12,7 @@
.ce
APPENDIX A - EXAMPLE PROGRAMS
.sp1
.PP
This section is intended to supply
the reader with utility programs
which can be used to examine and
@ -47,7 +47,7 @@ Five programs are provided:
DUMP TRACK DUMP UTILITY
.pi8
.in8
.pp
This is an example of how to directly
access the disk drive through its I/O
select addresses. DUMP may be used
@ -63,7 +63,7 @@ diskettes.
ZAP DISK UPDATE UTILITY
.pi8
.in8
.pp
This program is the backbone of any
attempt to patch a diskette directory
back together. It is also useful in
@ -81,7 +81,7 @@ Read/Write Track/Sector (RWTS).
INIT REFORMAT A SINGLE TRACK
.pi8
.in8
.pp
This program will initialize a single
track on a diskette. Any volume
number ($00-$FF) may be specified.
@ -95,7 +95,7 @@ diskette. DOS 3.3 and 48K is assumed.
FTS FIND T/S LISTS UTILITY
.pi8
.in8
.pp
FTS may be used when the directory
for a diskette has been destroyed.
It searches every sector on a
@ -111,7 +111,7 @@ together a new catalog using ZAP.
COPY CONVERT FILES
.pi8
.in8
.pp
COPY is provided as an example of
direct use of the DOS File Manager
package from assembly language. The
@ -146,7 +146,7 @@ non-assembly language programmer, the
binary object code of each program
may be entered from the monitor using
the following procedure.
.pp
The assembly language listings
consist of columns of information as
follows:
@ -185,7 +185,7 @@ CALL -151 (Enter the monitor from BASIC)
0879:85 3F
087B:4C B3 FD
BSAVE DUMP,A$800,L$7E (Save program to disk)
.pp
Note that if a line (such as line 4
in DUMP) has no object bytes
associated with it, it may be
@ -210,7 +210,7 @@ BSAVE COPY,A$800,L$1EC
.bp
DUMP -- TRACK DUMP UTILITY
.sp1
.pp
The DUMP program will dump any track
on a diskette in its raw,
pre-nibbilized format, allowing the
@ -231,7 +231,7 @@ as an example of direct use of the
DISK II hardware from assembly
language, with little or no use of
DOS.
.pp
To use DUMP, first store the number
of the track you wish dumped at
location $02, then begin execution at
@ -257,7 +257,7 @@ The output might look like this...
1010- 9E FF FF FF FF FF D5 AA (Start of sector data)
1018- AD AE B2 9D AC AE 96 96 (Sector data)
...etc...
.pp
Quite often, a sector with an I/O
error will have only one bit which is
in error, either in the address or
@ -273,7 +273,7 @@ is necessary to accomplish this feat.
.bp
ZAP -- DISK UPDATE UTILITY
.sp1
.pp
The next step up the ladder from DUMP
is to access data on the diskette at
the sector level. The ZAP program
@ -288,7 +288,7 @@ when it is necessary to patch up a
damaged directory. Its use in this
regard will be covered in more detail
when FTS is explained.
.pp
To use ZAP, store the number of the
track and sector you wish to access
in $02 and $03 respectively. Tracks
@ -327,7 +327,7 @@ The output might look like this...
0810- 00 00 00 00 00 00 00 00
0818- 00 00 00 00 00 00 00 00
...etc...
.pp
In the above example, if the byte at
offset 3 (the version of DOS which
INITed this diskette) is to be
@ -342,7 +342,7 @@ Note that ZAP will remember the
previous
values in $02, $03, and $04.
.bp
.pp
If something is wrong with the sector
to be read (an I/O error, perhaps),
ZAP will print an error message of
@ -362,7 +362,7 @@ these errors.
.bp
INIT -- REFORMAT A SINGLE TRACK
.sp1
.pp
Occasionally the sectoring information
on a diskette can become damaged so
that one or more sectors can no
@ -387,7 +387,7 @@ run they can be copied back to the
repaired diskette and data can be
written to the previously damaged
sector.
.pp
To run INIT, first store the number
of the track you wish reformatted at
location $02, the volume number of
@ -418,7 +418,7 @@ sizes.
.bp
FTS -- FIND T/S LISTS UTILITY
.sp1
.pp
From time to time one of your
diskettes will develop an I/O error
smack in the middle of the catalog
@ -456,7 +456,7 @@ necessary to restore all the files
and copy them to another diskette,
and later delete the duplicate or
unwanted ones.
.pp
To run FTS, simply load the program
and start execution at $900. FTS
will print the track and sector
@ -477,7 +477,7 @@ T=13 S=0F
T=14 S=0D
T=14 S=0F
.bp
.pp
Here, only four possible files were
found. ZAP should now be used to
read track $12, sector $0F. At +$0C
@ -523,7 +523,7 @@ BLOAD ZAP
:A0 A0
02:11 0F 02 N 900G (Write new sector image out as
first (and only) catalog sector)
.pp
The file should immediately be copied
to another diskette and then the
process repeated for each T/S List
@ -537,7 +537,7 @@ damaged disk may be re-INITialized.
.bp
COPY -- CONVERT FILES
.sp1
.pp
The COPY program demonstrates the use
of the DOS File Manager subroutine
package from assembly language. COPY
@ -553,7 +553,7 @@ name of the output file is "OUTPUT".
COPY is a single drive operation,
using the last drive which was
referenced.
.pp
To run COPY, load it and begin
execution at $800:
.sp1
@ -562,7 +562,7 @@ CALL -151 (Get into the monitor from BASIC)
BLOAD COPY (Load the COPY program)
...Now insert the disk containing INPUT...
900G (Run the COPY program)
.pp
When COPY finishes, it will return to
BASIC. If any errors occur, the
return code passed back from the File
@ -572,4 +572,3 @@ parameter list in Chapter 6
for a list of these return codes.
.br
.nx appendix b
\x00

View File

@ -3,7 +3,7 @@
.ce
APPENDIX B - DISK PROTECTION SCHEMES
.sp1
.PP
As the quantity and quality
of Apple II software
has increased, so has the incidence
@ -16,7 +16,7 @@ schemes involve a modified or custom
Disk Operating System, it seems
appropriate to discuss disk
protection in general.
.pp
Typically, a protection scheme's
purpose is to stop unauthorized
duplication of the contents of the
@ -31,7 +31,7 @@ the reader is unclear about how a
normal diskette is formatted, he
should refer to Chapter 3 for more
information.
.pp
Early protection methods were
primitive in comparison to what is
being done now. Just as the methods
@ -43,7 +43,7 @@ are developed, they are soon broken,
prompting the software vendor to try
to create even more sophisticated
systems.
.pp
It seems reasonable at this time to
say that it is impossible to protect
a disk in such a way that it can't be
@ -68,14 +68,14 @@ which take advantage of this
are limited and must
involve only certain changes which
will be discussed below.
.pp
Most protected disks use a modified
version of Apple's DOS. This is a
much easier task than writing one's
own Disk Operating System and will be
the primary area covered by this
discussion.
.pp
Although there are a vast array of
different protection schemes, they
all consist of having some portion of
@ -87,7 +87,7 @@ number of bytes which, if changed,
will cause a sector to be unreadable.
We will examine how that is done in
some detail.
.pp
The Address Field normally starts
with the bytes $D5/$AA/$96. If any
one of these bytes were changed, DOS
@ -122,7 +122,7 @@ whatever two bytes follow the
information field, using them for
verification, but not to locate the
field itself.
.pp
The Data Field is quite similar to
the Address Field in that its three
parts correspond almost identically,
@ -141,7 +141,7 @@ that the checksum computation will be
non-zero, causing an error. The
closing bytes are identical to those
of the Address Field ($DE/$AA).
.pp
As mentioned earlier, the PROM on the
disk controller skips certain parts
of both types of fields. In
@ -155,7 +155,7 @@ defeated by making slight
modifications to DOS's RWTS
routines, rendering it
unreliable as a protective measure.
.pp
In the early days of disk protection,
a single alteration was all that was
needed to stop all but a few from
@ -171,7 +171,7 @@ non-standard formats written even
.ul
between
tracks.
.pp
A state of the art protection scheme
consists of two elements. First, the
data is stored on the diskette in
@ -184,7 +184,7 @@ text page or certain zero page
locations) This is to prevent the
software from being removed from
memory intact.
.pp
Recently, several "nibble" or byte
copy programs have become available.
Unlike traditional copy programs
@ -239,7 +239,7 @@ hardware device to help find the sync
bytes, a software program must make
some assumptions about how the data
is structured on the diskette.
.pp
The result of the
introduction of nibble copy programs
has been to "force the hand" of the
@ -260,4 +260,3 @@ techniques cannot be used to defeat
them.
.br
.nx appendix c.1
\x00

View File

@ -7,12 +7,12 @@ APPENDIX C - GLOSSARY
.pn5
.IN20
.PI-20
.PP
ACCESS TIME]>The time required to
locate and read or write data on a
direct access storage device, such as
a diskette drive.
.pp
ADDRESS]>The numeric location of a
piece of data in memory. Usually
given as a hexadecimal number from
@ -20,33 +20,33 @@ $0000 to $FFFF (65535 decimal). A
disk address is the location of a
data sector, expressed in terms of its
track and sector numbers.
.pp
ALGORITHM]>A sequence of steps which
may be performed by a program or
other process, which will produce a
given result.
.pp
ALPHANUMERIC]>An alphabetic character
(A-Z) or a numeric digit (0-9). The
term used to refer to the class of all
characters and digits.
.pp
ANALOG]>As opposed to digital.
Having a value which is continuous,
such as a voltage or electrical
resistance.
.pp
AND]>The logical process of
determining whether two bits are both
ones. 0 AND 1 results in 0 (false),
1 AND 1 results in 1 (true).
.pp
ARM]>The portion of a disk drive
which suspends the read/write head
over the disk's surface. The arm can
be moved radially to allow access to
different tracks.
.pp
ASCII]>American Standard Code for
Information Interchange. A
hexadecimal to character conversion
@ -57,7 +57,7 @@ special, or control character. ASCII
is used when interfacing to
peripherals, such as keyboards,
printers, or video text displays.
.pp
ASSEMBLY LANGUAGE]>Also known as
MACHINE LANGUAGE. The native
programming language of the
@ -67,40 +67,40 @@ and is not humanized, as is BASIC,
PASCAL, or FORTRAN. An assembler is
used to convert assembly language
statements to an executable program.
.pp
BACKUP]>The process of making a copy
of a program or data against the
possibility of its accidental loss or
destruction.
.pp
BASE]>The number system in use.
Decimal is base 10, since each digit
represents a power of 10
(1,10,100,...). Hexadecimal is base
16 (1,16,256,...). Binary is base 2
(1,2,4,8,...).
.pp
BINARY]>A number system based upon
powers of 2. Only the digits 0 and 1
are used. 101 in binary, for
example, is 1 units digit, 0 twos,
and 1 fours, or 5 in decimal.
.pp
BIT]>A single binary digit (a 1 or a
0). A bit is the smallest unit of
storage or information in a computer.
.PP
BIT CELL]>The space on a diskette,
between two clock pulses, which can
hold the value of a single binary 0
or 1 (bit).
.pp
BIT SLIP MARKS]>The epilogue of a
disk field. Used to double check
that the disk head is still in read
sync and the sector has not been
damaged.
.pp
BOOT/BOOTSTRAP]>The process of
loading a very large program into
memory by loading successively larger
@ -108,50 +108,50 @@ pieces, each of which loads its
successor. The program loads itself
by "pulling itself up by its
bootstraps".
.pp
BRK]>BREAK. An assembly langauge instruction
which can be used to force an
interrupt and immediate suspension of
execution of a program.
.pp
BUFFER]>An area of memory used to
temporarily hold data as it is being
transferred to or from a peripheral,
such as a disk drive.
.pp
BUG]>A programming error. Faulty
operation of a program.
.pp
BYTE]>The smallest unit of
addressable memory in a computer. A
byte usually consists of 8 bits and
can contain a decimal number ranging
from 0 to 255 or a single
alphanumeric character.
.pp
CARRIAGE RETURN]>A control character
which instructs the printer to end
one line and begin another. When
printing a carriage return is usually
followed by a line feed.
.pp
CARRY FLAG]>A 6502 processor flag
which indicates that a previous
addition resulted in a carry. Also
used
as an error indicator by many system
programs.
.PP
CATALOG]>A directory of the files on
a diskette. See DIRECTORY.
.pp
CHAIN]>A linked list of data
elements. Data is chained if its
elements need not be contiguous in
storage and
each element can be found from its
predecessor via an address pointer.
.pp
CHECKSUM/CRC]>A method for verifying
that data has not been damaged. When
data is written, the sum of all its
@ -159,34 +159,34 @@ constituent bytes is stored with it.
If, when the data is later read, its
sum no longer matches the checksum,
it has been damaged.
.pp
CLOBBERED]>Damaged or destroyed. A
clobbered sector is one which has
been overwritten such that it is
unrecoverable.
.pp
CODE]>Executable instructions to the
computer, usually in machine
language.
.pp
COLDSTART]>A restart of a program
which reinitializes all of its
parameters, usually erasing any work
which was in progress at the time of
the restart. A DOS coldstart erases
the BASIC program in memory.
.pp
CONTIGUOUS]>Physically next to. Two
bytes are contiguous if they are
adjoining each other in memory or on
the disk.
.pp
CONTROL BLOCK]>A collection of data
which is used by the operating system
to manage resources. Examples of a
control block used by DOS are the
file buffers.
.pp
CONTROL CHARACTER]>A special ASCII
code which is used to perform a
unique function on a peripheral, but
@ -195,7 +195,7 @@ character.
Carriage return, line feed, form
feed, and bell are all control
characters.
.pp
CONTROLLER CARD]>A hardware circuit
board which is plugged into an APPLE
connector which allows communication
@ -203,11 +203,11 @@ with a peripheral device, such as a
disk or printer. A controller card
usually contains a small driver
program in ROM.
.PP
CSWL]>A vector in zero-page through
which output data is passed for
display on the CRT or for printing.
.pp
CYCLE]>The smallest unit of time
within the central processor of the
computer. Each machine language
@ -215,9 +215,9 @@ instruction requires two or more
cycles to complete. One cycle (on
the APPLE) is one micro-second or one
millionth of a second.
.pp
DATA]>Units of information.
.pp
DATA SECTOR BUFFER]>On the APPLE, a
256 byte buffer used by DOS to hold
the image of any given sector on the
@ -226,29 +226,29 @@ from the file, data is extracted from
the data sector buffer until it is
exhausted, at which time it is
refilled with the next sector image.
.pp
DATA TYPE]>The type of information
stored in a byte. A byte might
contain a printable ASCII character, binary
numeric data, or a machine language
instruction.
.pp
DCT]>Device Characteristics Table.
Used as an input parameter table to
Read/Write Track/Sector (RWTS) to
describe the hardware characteristics
of the diskette drive.
.pp
DECIMAL]>A number system based upon
powers of 10. Digits range from 0 to
9.
.pp
DEFERRED COMMANDS]>DOS commands which
may (or must) be invoked from within
an executing BASIC program. OPEN,
READ, WRITE, and CLOSE are all
examples of deferred commands.
.pp
DIGITAL]>As opposed to analog.
Discrete values as opposed to
continuous ones. Only digital values
@ -259,7 +259,7 @@ light outside, must be converted into
a numerical value which, of
necessity, must be "rounded off" to a
discrete value.
.pp
DIRECT ACCESS]>Peripheral storage
allowing rapid access of any piece of
data, regardless of its placement on
@ -270,14 +270,14 @@ read to locate the last byte. A
diskette is direct access, since the
arm may be rapidly moved to any
track and sector.
.pp
DIRECTORY]>A catalog of all files
stored on a diskette. The directory
must contain each file's name and its
location on the disk as well as other
information regarding the type of
data stored there.
.pp
DISK INITIALIZATION]>The process
which places track formatting
information, including sectors and
@ -286,7 +286,7 @@ During disk initialization, DOS also
places a VTOC and directory on the
newly formatted disk, as well as
saving the HELLO program.
.pp
DISPLACEMENT]>The distance from the
beginning of a block of data to a
particular byte or field.
@ -294,59 +294,59 @@ Displacements are usually given
beginning with 0, for the first byte,
1 for the second, etc. Also known as
an offset.
.pp
DRIVER]>A program which provides an
input stream to another program or an
output device. A printer driver
accepts input from a user program in
the form of lines to be printed, and
sends them to the printer.
.pp
DUMP]>An unformatted or partially
formatted listing of the contents of
memory or a diskette in hexadecimal.
Used for diagnostic purposes.
.pp
ENCODE]>To translate data from one
form to another for any of a number
of reasons. In DOS 3.3,
Data is encoded from 8
bit bytes to 6 bit bytes for storage
on a DISK II.
.pp
ENTRY POINT (EPA)]>The entry point
address is the location within a
program where execution is to start.
This is not necessarily the same as
the load point (or lowest memory
address in the program).
.pp
EOF]>End Of File. This mark signals
the end of a data file. $00 for
APPLE DOS text files.
.pp
EPILOGUE]>The last three bytes of a
field on a track. These unique bytes
are used to insure the integrity of
the data which preceeds them.
.pp
EXCLUSIVE OR]>A logical operation
which compares two bits to determine
if they are different. 1 EOR 0
results in 1. 1 EOR 1 results in 0.
.pp
FIELD]>A group of contiguous bytes
forming a single piece of data, such
as a person's name, his age, or his
social security number. In disk
formatting, a group of data bytes
surrounded by gaps.
.pp
FILE]>A named collection of data on a
diskette or other mass storage
medium. Files can contain data or
programs.
.pp
FILE BUFFERS]>In APPLE DOS, a
collection of buffers used to manage
one open file. Included are a data
@ -356,51 +356,51 @@ workarea buffer, the name of the
file, and pointers. The DOS command,
MAXFILES 3, causes 3 of these file
buffers to be allocated.
.pp
FILE DESCRIPTOR]>A single entry in a
diskette directory which describes
one file. Included are the name of
the file, its data type, its length,
and its location on the diskette.
.pp
FILE MANAGER]>That portion of DOS
which manages files. The file
manager handles such general
operations as OPEN, CLOSE, READ,
WRITE, POSITION, RENAME, DELETE, etc.
.pp
FILE TYPE]>The type of data held by a
file. Valid DOS file types are
Binary, Applesoft, Integer-BASIC,
Text, Relocatable, S, A, and B.
.pp
FIRMWARE]>A middle ground between
hardware and software. Usually used
to describe micro-code or programs
which have been stored in read-only
memory.
.pp
GAPS]>The spaces between fields of
data on a diskette. Gaps on an APPLE
diskette contain self-sync bytes.
.pp
HARD ERROR]>An unrecoverable
Input/Output error. The data stored
in the disk sector can never be
successfully read again.
.pp
HARDWARE]>Physical computer
equipment, as opposed to programs
which run on the equipment.
A disk drive is an example of a
hardware component.
.pp
HEAD]>The read/write head on a
diskette drive. A magnetic pickup,
similar in nature to the head on a
stereo tapedeck, which rests on the
spinning surface of the diskette.
.pp
HEXADECIMAL/HEX]>A numeric system
based on powers of 16. Valid hex
digits range from 0 to 9 and A to F,
@ -412,39 +412,39 @@ represent the contents of one byte.
Hexadecimal is used with computers
because it easily converts with
binary.
.pp
HIGH MEMORY]>Those memory locations
which have high address values.
$FFFF is the highest memory location.
Also called the "top" of memory.
.pp
HIMEM]>APPLE's zero-page address
which identifies the first byte past
the available memory which can be
used to store BASIC programs and
their variables.
.pp
IMMEDIATE COMMAND]>A DOS command
which may be entered at any time,
especially when DOS is waiting for a
command from the keyboard. Deferred
commands are the opposite of
immediate commands.
.pp
INDEX]>A displacement into a table or
block of storage.
.pp
INSTRUCTION]>A single step to be
performed in an assembly language or
machine language program.
Instructions perform such operations
as addition, subtraction, store, or
load.
.pp
INTEGER]>As opposed to floating
point. A "whole" number with no
fraction associated with it.
.pp
INTERCEPT]>A program which logically
places itself in the execution path
of another program, or pair of
@ -452,13 +452,13 @@ programs. A video intercept
is used to re-direct program output
from the screen to a printer,
for example.
.pp
INTERLEAVE]>The practice of selecting
the order of sectors on a diskette
track to minimize access time due to
rotational delay. Also called
"skewing" or interlacing.
.pp
INTERRUPT]>A hardware signal which
causes the computer to halt execution
of a program and enter a special
@ -466,103 +466,103 @@ handler routine. Interrupts are used
to service real-time clock
time-outs, BRK instructions, and
RESET.
.pp
IOB]>Input/Output Block. A
collection of parameter data, passed
to Read/Write Track/Sector,
describing the operation to be
performed.
.pp
I/O ERROR]>Input/Output Error.
An error which occurs
during transmission of data to or
from a peripheral device, such as a
disk or cassette tape.
.pp
JMP]>A 6502 assembly langauge
instruction which causes the computer
to begin executing instructions at a
different location in memory.
Similar to a GOTO statement in BASIC.
.pp
JSR]>A 6502 assembly langauge
instruction which causes the computer
to "call" a subroutine. Similar to a
CALL statement in BASIC.
.pp
K]>A unit of measurement, usually
applied to bytes. 1 K bytes is
equivalent to 1024 bytes.
.PP
KSWL]>A vector in zero-page through
which input data is passed for
from the keyboard or a remote
terminal.
.pp
LABEL]>A name associated with a
location in a program or in memory.
Labels are used in assembly langauge
much like statement numbers are used
in BASIC.
.PP
LATCH]>A component into which the
Input/Output
hardware can store a byte value,
which will hold that value until the
central processor has time to read
it (or vice versa).
.pp
LINK]>An address pointer in an
element of a linked chain of data or
buffers.
.pp
LIST]>A one dimensional sequential
array of data items.
.pp
LOAD POINT (LP)]>The lowest address
of a loaded assembly language
program -- the first byte loaded.
Not necessarily the same as the entry
point address (EPA).
.pp
LOGICAL]>A form of arithmetic which
operates with binary "truth" or
"false", 1 or 0. AND, OR, NAND, NOR,
and EXCLUSIVE OR are all logical
operations.
.pp
LOOP]>A programming construction in
which a
group of instructions or statements
are repeatedly executed.
.pp
LOW MEMORY]>The memory locations with
the lowest addresses. $0000 is the
lowest memory location. Also called
the "bottom" of memory.
.pp
LOMEM]>APPLE's zero-page address
which identifies the first byte of
the available memory which can be
used to store BASIC programs and
their variables.
.pp
LSB/LO ORDER]>Least Significant Bit
or Least Significant Byte. The 1's
bit in a byte or the second pair of
hexadecimal digits forming an
address. In the address $8030, $30
is the LO order part of the address.
.pp
MASTER DISK]>A DOS diskette which
will boot in an APPLE II of any size
memory and take full advantage of it.
.pp
MICROSECOND]>A millionth of a
second. Equivalent to one cycle of
the APPLE II central processor.
Also written as "Usec".
.pp
MONITOR]>A machine language program
which always resides in the computer
and which is the first to receive
@ -571,35 +571,35 @@ up. The APPLE monitor resides in ROM
and allows examination and
modification of memory at a byte
level.
.pp
MSB/HI ORDER]>Most Significant Bit or
Most Significant Byte. The 128's bit
of a byte (the left-most) or the
first pair of hexadecimal digits in
an address. In the byte value $83,
the MSB is on (is a 1).
.pp
NULL]>Empty, having no length or
value. A null string is one which
contains no characters. The null
control character ($00) produces no
effect on a printer (also called an
idle).
.pp
NIBBLE/NYBBLE]>A portion of a byte,
usually 4 bits and represented by a
single hexadecimal digit. $FE
contains two nibbles, $F and $E.
.pp
OBJECT CODE]>A machine language
program in binary form, ready to
execute. Object code is the output
of an assembler.
.pp
OBJECT MODULE]>A complete machine
language program in object code form,
stored as a file on a diskette.
.pp
OFFSET]>The distance from the
beginning of a block of data to a
particular byte or field.
@ -607,26 +607,26 @@ Offsets are usually given
beginning with 0, for the first byte,
1 for the second, etc. Also known as
a displacement.
.pp
OPCODE]>Operation Code. The three
letter mnemonic representing a single
assembly langauge instruction. JMP
is the opcode for the jump
instruction.
.pp
OPERATING SYSTEM]>A machine language
program which manages the memory and
peripherals automatically,
simplifying the job of the
applications programmer.
.pp
OR]>The logical operation comparing
two bits to determine if either of
them are 1. 1 OR 1 results in 1
(true), 1
OR 0 results in 1, 0 OR 0 results in
0 (false).
.pp
OVERHEAD]>The space required by the
system, either in memory or on the
disk, to manage either. The disk
@ -634,4 +634,3 @@ directory and VTOC are part of a
diskette's overhead.
.br
.nx appendix c.2
\x00

View File

@ -1,21 +1,21 @@
.pp
PAGE]>256 bytes of memory which share
a common high order address byte.
Zero page is the first 256 bytes of
memory ($0000 through $00FF).
.pp
PARALLEL]>Opposite of serial. A
communication mode which sends all of
the bits in a byte at once, each over
a separate line or wire.
.pp
PARAMETER LIST]>An area of storage
set aside for communication between
a calling program and a subroutine.
The parameter list contains input and
output variables which will be used
by the subroutine.
.pp
PARITY]>A scheme, similar to
checksums but on a bit level rather
than a byte level, which allows
@ -27,54 +27,54 @@ used in expensive memory to detect or
correct single bit failures, and when
sending data over communications
lines to detect noise errors.
.pp
PARSE]>The process of interpreting
character string data, such as a
command with keywords.
.pp
PATCH]>A small change to the object
code of an assembly language program.
Also called a "zap".
.pp
PERIPHERAL]>A device which is
external to the computer itself, such
as a disk drive or a printer. Also
called an Input/Output device.
.pp
PHYSICAL RECORD]>A collection of data
corresponding to the smallest unit of
storage on a peripheral device.
For disks, a physical record
is a sector.
.pp
POINTER]>The address or memory
location of a block of data or a
single data item. The address
"points" to the data.
.pp
PROLOGUE]>The three bytes at the
beginning of a disk field which
uniquely identify it from any other
data on the track.
.pp
PROM]>Programmable Read Only Memory.
PROMs are usually used on controller
cards associated with peripherals to
hold the driver program which
interfaces the device to applications
programs.
.pp
PROMPT]>An output string which lets
the user know that input is expected.
A "*" is the prompt character for the
APPLE monitor.
.pp
PROTECTED DISK]>A diskette whose
format or content has been modified
to prevent its being copied. Most
retail software today is distributed
on protected disks to prevent theft.
.pp
PSEUDO-OPCODE]>A special assembly
language opcode which does not
translate into a machine instruction.
@ -83,17 +83,17 @@ assembler to perform some function,
such as skipping a page in an
assembly listing or reserving data
space in the output object code.
.pp
RANDOM ACCESS]>Direct access. The
capability to rapidly access any
single piece of data on a storage
medium without having to sequentially
read all of its predecessors.
.pp
RAM]>Random Access Memory. Computer
memory which will allow storage and
retrieval of values by address.
.pp
RECAL]>Recalibrate the disk arm so
that the read/write head is
positioned over track zero. This is
@ -101,13 +101,13 @@ done by pulling the arm as far as it
will go to the outside of the
diskette until it hits a stop,
producing a "clacking" sound.
.pp
RECORD]>A collection of associated
data items or fields. One or more
records are usually associated with a
file. Each record might correspond
to an employee, for example.
.pp
REGISTER]>A named temporary storage
location in the central processor
itself. The 6502 has 5 registers;
@ -115,18 +115,18 @@ the A, X, Y, S, and P registers.
Registers are used by an assembly
language program to access memory and
perform arithmetic.
.pp
RELEASE]>A version of a distributed
piece of software. There have been
several releases of DOS.
.pp
RELOCATABLE]>The attribute of
an object module file
which contains a machine language
program and the information necessary
to make it run at any memory
location.
.pp
RETURN CODE]>A numeric value returned
from a subroutine, indicating the
success or failure of the operation
@ -135,74 +135,74 @@ usually means there were no errors.
Any other value indicates the nature
of the error, as defined by the
design of the subroutine.
.PP
ROM]>Read Only Memory. Memory which
has a permanent value. The APPLE
monitor and BASIC interpreters are
stored in ROM.
.PP
RWTS]>Read/Write Track/Sector. A
collection of subroutines which allow
access to the diskette at a
track and sector level. RWTS is
part of DOS and may be called by
external assembly language programs.
.pp
SEARCH]>The process of scanning a
track for a given sector.
.PP
SECTOR]>The smallest updatable unit
of data on a disk track. One sector
on an APPLE DISK II contains 256
data bytes.
.pp
SECTOR ADDRESS]>A disk field which
identifies the sector data field which
follows in terms of its volume,
track, and sector number.
.pp
SECTOR DATA]>A disk field which
contains the actual sector data in
nibbilized form.
.pp
SEEK]>The process of moving the disk
arm to a given track.
.pp
SELF-SYNC]>Also called "auto-sync"
bytes. Special disk bytes which
contain more than 8 bits, allowing
synchronization of the hardware to
byte boundaries when reading.
.pp
SEQUENTIAL ACCESS]>A mode of data
retreival where each byte of data is
read in the order in which it was
written to the disk.
.pp
SERIAL]>As opposed to parallel. A
communication mode which sends data
bits one at a time over a single line
or wire.
.pp
SHIFT]>A logical operation which
moves the bits of a byte either left
or right one position, moving a 0
into the bit at the other end.
.pp
SLAVE DISK]>A diskette with a copy of
DOS which is not relocatable. The
DOS image will always be loaded into
the same memory location, regadless
of the size of the machine.
.pp
SOFT ERROR]>A recoverable I/O error.
A worn diskette might produce soft
errors occasionally.
.pp
SOFTWARE]>Computer programs and data
which can be loaded into RAM memory
and executed.
.pp
SOURCE CODE]>A program in a form
which is understandable to humans;
in character form as opposed
@ -211,10 +211,10 @@ Source assembly code must be
processed by an assembler to
translate it into machine or "object"
code.
.pp
SKEWING]>The process of interleaving
sectors. See INTERLEAVE.
.pp
STATE MACHINE]>A process (in software
or hardware) which defines a
unique target state, given an input
@ -223,18 +223,18 @@ state machine approach is used in DOS
to keep track of its video intercepts
and by the hardware on the disk
controller card to process disk data.
.pp
STROBE]>The act of triggering an I/O
function by momentarily referencing a
special I/O address. Strobing $C030
produces a click on the speaker.
Also called "toggling".
.pp
SUBROUTINE]>A program whose function
is required repeatedly during
execution, and therefore is called by
a main program in several places.
.pp
TABLE]>A collection of data entries,
having similar format, residing in
memory. Each entry might contain the
@ -242,13 +242,13 @@ name of a program and its address,
for example. A "lookup" can be
performed on such a table to locate
any given program by name.
.pp
TOGGLE]>The act of triggering an I/O
function by momentarily referencing a
special I/O address. Toggling $C030
produces a click on the speaker.
Also called "strobe".
.pp
TOKENS]>A method where human
recognizable words may be coded to
single binary byte values for memory
@ -256,68 +256,68 @@ compression and faster processing.
BASIC statements are tokenized, where
hex codes are assigned to words like
IF, PRINT, and END.
.pp
TRACK]>One complete circular path of
magnetic storage on a diskette.
There are 35 concentric tracks on an APPLE
diskette.
.pp
TRANSLATE TABLE]>A table of single
byte codes which are to replace
input codes on a one-for-one
basis. A translate table is used to
convert from 6 bit codes to disk
codes.
.PP
T/S LIST]>Track/Sector List. A
sector which describes the location
of a file by listing the track and
sector number for each of its data
sectors in the order that they are to
be read or written.
.pp
TTL]>Transistor to Transistor Logic.
A standard for the interconnection of
integrated circuits which also
defines the which voltages
represent 0's and 1's.
.pp
UTILITY]>A program which is used to
maintain, or assist in the development
of, other programs or disk files.
.pp
VECTOR]>A collection of pointers or
JMP instructions at a fixed location
in memory which allow access to a
relocatable program or data.
.pp
VOLUME]>An identification for a
diskette, disk platter, or cassette,
containing one or more files.
.pp
VTOC]>Volume Table Of Contents.
Based upon the IBM OS/VS VTOC. On
the APPLE, a sector mapping the
free sectors on the diskette and
giving the location of the directory.
.pp
WARMSTART]>A restart of a program
which retains, as much as is
possible, the work which was in
progress at the time. A DOS
warmstart retains the BASIC program
in memory.
.PP
WRITE PROTECTED]>A diskette whose
write protect notch is covered,
preventing the disk drive from
writing on it.
.pp
ZAP]>From the IBM utility program,
SUPERZAP. A program which allows
updates to a disk at a byte level,
using hexadecimal.
.pp
ZERO PAGE]>The first 256 bytes of
memory in a 6502 based machine. Zero
page locations have special
@ -325,4 +325,3 @@ significance to the central
processor, making their management
and assignment critical.
.br
\x00

View File

@ -130,4 +130,3 @@ A-20
.nf
800G (Run the COPY program)
.br
\x00

View File

@ -33,4 +33,3 @@ utilities called BENEATH APPLE DOS'
BAG OF TRICKS. See the page facing
1-1 for more details.
.br
\x00

View File

@ -123,4 +123,3 @@ C-15
.sp1
the voltages which represent 0's and
.br
\x00