mirror of
https://github.com/iKarith/beneath-apple-dos.git
synced 2024-06-26 02:29:30 +00:00
Remove dot commands from appendix A
This commit is contained in:
parent
84b8c34680
commit
7db5e6054a
|
@ -1,17 +1,4 @@
|
|||
.ec^
|
||||
.m11
|
||||
.m22
|
||||
.m48
|
||||
.na
|
||||
.ll60
|
||||
.fo ''-%-
|
||||
.pn5
|
||||
.pi0
|
||||
.br
|
||||
.np
|
||||
.ce
|
||||
APPENDIX A - EXAMPLE PROGRAMS
|
||||
.sp1
|
||||
# APPENDIX A - EXAMPLE PROGRAMS
|
||||
|
||||
This section is intended to supply
|
||||
the reader with utility programs
|
||||
|
@ -40,13 +27,10 @@ damage a diskette, but they can, if
|
|||
used improperly, destroy the data on
|
||||
a diskette, requiring it to be
|
||||
re-INITialized.
|
||||
.sp1
|
||||
|
||||
Five programs are provided:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
DUMP TRACK DUMP UTILITY
|
||||
.pi8
|
||||
.in8
|
||||
|
||||
This is an example of how to directly
|
||||
access the disk drive through its I/O
|
||||
|
@ -57,12 +41,8 @@ examination. This can be useful both
|
|||
to understand how disks are formatted
|
||||
and in diagnosing clobbered
|
||||
diskettes.
|
||||
.sp1
|
||||
.in0
|
||||
.nf
|
||||
|
||||
ZAP DISK UPDATE UTILITY
|
||||
.pi8
|
||||
.in8
|
||||
|
||||
This program is the backbone of any
|
||||
attempt to patch a diskette directory
|
||||
|
@ -75,12 +55,8 @@ optionally write, any sector on a
|
|||
diskette. As such, it serves as a
|
||||
good example of a program which calls
|
||||
Read/Write Track/Sector (RWTS).
|
||||
.sp1
|
||||
.in0
|
||||
.nf
|
||||
|
||||
INIT REFORMAT A SINGLE TRACK
|
||||
.pi8
|
||||
.in8
|
||||
|
||||
This program will initialize a single
|
||||
track on a diskette. Any volume
|
||||
|
@ -89,12 +65,8 @@ INIT is useful in restoring a track
|
|||
whose sectoring has been damaged
|
||||
without reinitializing the entire
|
||||
diskette. DOS 3.3 and 48K is assumed.
|
||||
.bp
|
||||
.in0
|
||||
.nf
|
||||
|
||||
FTS FIND T/S LISTS UTILITY
|
||||
.pi8
|
||||
.in8
|
||||
|
||||
FTS may be used when the directory
|
||||
for a diskette has been destroyed.
|
||||
|
@ -105,12 +77,8 @@ track and sector location of each it
|
|||
finds. Knowing the locations of the
|
||||
T/S Lists can help the user patch
|
||||
together a new catalog using ZAP.
|
||||
.sp1
|
||||
.in0
|
||||
.nf
|
||||
|
||||
COPY CONVERT FILES
|
||||
.pi8
|
||||
.in8
|
||||
|
||||
COPY is provided as an example of
|
||||
direct use of the DOS File Manager
|
||||
|
@ -127,11 +95,9 @@ it is not included as a utility
|
|||
program but rather as an example of
|
||||
the programming necessary to access
|
||||
the File Manager.
|
||||
.sp2
|
||||
.pi0
|
||||
.in0
|
||||
|
||||
STORING THE PROGRAMS ON DISKETTE
|
||||
.pp
|
||||
|
||||
The enterprising programmer may wish
|
||||
to type the source code for each
|
||||
program into an assembler and
|
||||
|
@ -150,20 +116,18 @@ the following procedure.
|
|||
The assembly language listings
|
||||
consist of columns of information as
|
||||
follows:
|
||||
.sp1
|
||||
|
||||
The address of some object
|
||||
code
|
||||
The object code which should
|
||||
be stored there
|
||||
The statement number
|
||||
The statement itself
|
||||
.sp1
|
||||
|
||||
For example...
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
0800:20 DC 03 112 COPY JSR LOCFPL FIND PARMLIST
|
||||
.sp1
|
||||
.fi
|
||||
|
||||
indicates that the binary code
|
||||
"20DC03" should be stored at 0800 and
|
||||
that this is statement 112. To enter
|
||||
|
@ -172,16 +136,15 @@ must type in each address and its
|
|||
corresponding object code. The
|
||||
following is an example of how to
|
||||
enter the DUMP program:
|
||||
.bp
|
||||
.nf
|
||||
|
||||
CALL -151 (Enter the monitor from BASIC)
|
||||
0800:20 E3 03
|
||||
0803:84 00
|
||||
0805:85 01
|
||||
0807:A5 02
|
||||
.sp1
|
||||
|
||||
...etc...
|
||||
.sp1
|
||||
|
||||
0879:85 3F
|
||||
087B:4C B3 FD
|
||||
BSAVE DUMP,A$800,L$7E (Save program to disk)
|
||||
|
@ -191,25 +154,20 @@ in DUMP) has no object bytes
|
|||
associated with it, it may be
|
||||
ignored.
|
||||
When the program is to be run...
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
BLOAD DUMP (Load program)
|
||||
CALL -151 (Get into monitor)
|
||||
02:11 N 800G (Store track to dump, run program)
|
||||
.pp
|
||||
|
||||
The BSAVE commands which must be used
|
||||
with the other programs are:
|
||||
.sp1
|
||||
|
||||
BSAVE ZAP,A$900,L$6C
|
||||
.br
|
||||
BSAVE INIT,A$800,L$89
|
||||
.br
|
||||
BSAVE FTS,A$900,L$DC
|
||||
.br
|
||||
BSAVE COPY,A$800,L$1EC
|
||||
.bp
|
||||
DUMP -- TRACK DUMP UTILITY
|
||||
.sp1
|
||||
|
||||
|
||||
The DUMP program will dump any track
|
||||
on a diskette in its raw,
|
||||
|
@ -241,17 +199,16 @@ part of the track in hexadecimal on
|
|||
the screen. The entire track image
|
||||
is stored, starting at $1000.
|
||||
For example:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151 (Get into the monitor from BASIC)
|
||||
BLOAD DUMP (Load the DUMP program)
|
||||
...Now insert the diskette to be dumped...
|
||||
02:11 N 800G (Store a 11 (track 17, the catalog
|
||||
track) in $02, N terminates the store
|
||||
command, go to location $800)
|
||||
.sp1
|
||||
|
||||
The output might look like this...
|
||||
.sp1
|
||||
|
||||
1000- D5 AA 96 AA AB AA BB AB (Start of sector address)
|
||||
1008- AA AB BA DE AA E8 C0 FF
|
||||
1010- 9E FF FF FF FF FF D5 AA (Start of sector data)
|
||||
|
@ -270,9 +227,9 @@ of the error and record the data on
|
|||
paper for later entry via ZAP. A
|
||||
thorough understanding of Chapter 3
|
||||
is necessary to accomplish this feat.
|
||||
.bp
|
||||
|
||||
ZAP -- DISK UPDATE UTILITY
|
||||
.sp1
|
||||
|
||||
|
||||
The next step up the ladder from DUMP
|
||||
is to access data on the diskette at
|
||||
|
@ -310,8 +267,7 @@ locations have been set up, begin
|
|||
execution at $900. ZAP will read or
|
||||
write the sector into or from the 256
|
||||
bytes starting at $800. For example:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151 (Get into the monitor from BASIC)
|
||||
BLOAD ZAP (Load the ZAP program)
|
||||
...Now insert the diskette to be zapped...
|
||||
|
@ -319,9 +275,9 @@ BLOAD ZAP (Load the ZAP program)
|
|||
track) in $02, a 00 (sector 0) at $03,
|
||||
and a 01 (read) at $04. N ends the
|
||||
store command and 900G runs ZAP.)
|
||||
.sp1
|
||||
|
||||
The output might look like this...
|
||||
.sp1
|
||||
|
||||
0800- 04 11 0F 03 00 00 01 00 (Start of VTOC)
|
||||
0808- 00 00 00 00 00 00 00 00
|
||||
0810- 00 00 00 00 00 00 00 00
|
||||
|
@ -333,23 +289,21 @@ offset 3 (the version of DOS which
|
|||
INITed this diskette) is to be
|
||||
changed, the following would be
|
||||
entered...
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
803:02 (Change 03 to 02)
|
||||
04:02 N 900G (Change ZAP to write mode and do it)
|
||||
.pp
|
||||
|
||||
Note that ZAP will remember the
|
||||
previous
|
||||
values in $02, $03, and $04.
|
||||
.bp
|
||||
|
||||
If something is wrong with the sector
|
||||
to be read (an I/O error, perhaps),
|
||||
ZAP will print an error message of
|
||||
the form:
|
||||
.sp1
|
||||
|
||||
RC=10
|
||||
.sp1
|
||||
|
||||
A return code of 10, in this case,
|
||||
means that the diskette was write
|
||||
protected and a write operation was
|
||||
|
@ -359,9 +313,9 @@ and 80 - read error. Refer to the
|
|||
documentation on RWTS given in
|
||||
Chapter 6 for more information on
|
||||
these errors.
|
||||
.bp
|
||||
|
||||
INIT -- REFORMAT A SINGLE TRACK
|
||||
.sp1
|
||||
|
||||
|
||||
Occasionally the sectoring information
|
||||
on a diskette can become damaged so
|
||||
|
@ -399,8 +353,7 @@ formatted for some reason (eg.
|
|||
physical damage or problems with the
|
||||
disk drive itself) a return code is
|
||||
printed. For example:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151 (Get into the monitor from BASIC)
|
||||
BLOAD INIT (Load the INIT program)
|
||||
...Now insert the disk to be INIT-ed...
|
||||
|
@ -408,16 +361,14 @@ BLOAD INIT (Load the INIT program)
|
|||
track) in $02, a volume number of
|
||||
$FE (254) in $03, N terminates the
|
||||
store command, go to location $800)
|
||||
.sp1
|
||||
.fi
|
||||
|
||||
WARNING: DOS 3.3 must be loaded in
|
||||
the machine before running INIT and a
|
||||
48K Apple is assumed. INIT will not work with other
|
||||
versions of DOS or other memory
|
||||
sizes.
|
||||
.bp
|
||||
|
||||
FTS -- FIND T/S LISTS UTILITY
|
||||
.sp1
|
||||
|
||||
From time to time one of your
|
||||
diskettes will develop an I/O error
|
||||
|
@ -463,20 +414,18 @@ will print the track and sector
|
|||
number of each sector it finds which
|
||||
bears a resemblance to a T/S List.
|
||||
For example:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151 (Get into the monitor from BASIC)
|
||||
BLOAD FTS (Load the FTS program)
|
||||
...Now insert the disk to be scanned...
|
||||
900G (Run the FTS program on this diskette)
|
||||
.sp1
|
||||
|
||||
The output might look like this...
|
||||
.sp1
|
||||
|
||||
T=12 S=0F
|
||||
T=13 S=0F
|
||||
T=14 S=0D
|
||||
T=14 S=0F
|
||||
.bp
|
||||
|
||||
Here, only four possible files were
|
||||
found. ZAP should now be used to
|
||||
|
@ -509,8 +458,7 @@ something else. Given below is an
|
|||
example ZAP to the CATALOG to create
|
||||
an entry for the file whose T/S List
|
||||
is at T=12 S=0F.
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151
|
||||
BLOAD ZAP
|
||||
...insert disk to be ZAPped...
|
||||
|
@ -534,9 +482,8 @@ previous name. Once all the files
|
|||
have been copied to another disk,
|
||||
and successfully tested, the
|
||||
damaged disk may be re-INITialized.
|
||||
.bp
|
||||
|
||||
COPY -- CONVERT FILES
|
||||
.sp1
|
||||
|
||||
The COPY program demonstrates the use
|
||||
of the DOS File Manager subroutine
|
||||
|
@ -556,8 +503,7 @@ referenced.
|
|||
|
||||
To run COPY, load it and begin
|
||||
execution at $800:
|
||||
.sp1
|
||||
.nf
|
||||
|
||||
CALL -151 (Get into the monitor from BASIC)
|
||||
BLOAD COPY (Load the COPY program)
|
||||
...Now insert the disk containing INPUT...
|
||||
|
@ -570,5 +516,5 @@ Manager will be printed. Consult the
|
|||
documentation on the File Manager
|
||||
parameter list in Chapter 6
|
||||
for a list of these return codes.
|
||||
.br
|
||||
|
||||
.nx appendix b
|
Loading…
Reference in New Issue
Block a user