Remove trailing whitespace, normalize dot commands

This commit is contained in:
T. Joseph Carter 2017-07-20 15:45:47 -07:00
parent d9046beb1d
commit b773fd6d8c
27 changed files with 382 additions and 382 deletions

View File

@ -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

View File

@ -1,17 +1,17 @@
.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
@ -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

View File

@ -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,7 +30,7 @@ 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

View File

@ -2,7 +2,7 @@
.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)
@ -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
@ -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

View File

@ -2,7 +2,7 @@
.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)
@ -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
@ -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

View File

@ -1,4 +1,4 @@
.SP2 .sp2
DATA FIELD ENCODING DATA FIELD ENCODING
Due to Apple's hardware, it is not Due to Apple's hardware, it is not
@ -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

View File

@ -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,7 +126,7 @@ 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
@ -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
@ -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
@ -350,7 +350,7 @@ 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
@ -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
@ -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)

View File

@ -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
@ -147,7 +147,7 @@ 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
@ -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

View File

@ -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,17 +132,17 @@ 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
@ -153,18 +153,18 @@ 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
@ -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)

View File

@ -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
@ -124,11 +124,11 @@ 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
@ -315,12 +315,12 @@ 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

View File

@ -75,7 +75,7 @@ be followed to do this:
.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

View File

@ -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
@ -94,7 +94,7 @@ C65C-C6FA This subroutine reads the sector number stored at
.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,
@ -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

View File

@ -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.
@ -181,7 +181,7 @@ 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.
@ -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.

View File

@ -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)

View File

@ -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

View File

@ -5,8 +5,8 @@
.na .na
.ll60 .ll60
.fo ''-%- .fo ''-%-
.pn 5 .pn5
.pi 0 .pi0
.br .br
.np .np
.ce .ce
@ -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
@ -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
@ -201,11 +201,11 @@ 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
@ -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...

View File

@ -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

View File

@ -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

View File

@ -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 ... ;)