Download OS65D v3.0 User Manual

Transcript
OS - 6SD V3 .0 User ' s Manual
Table of Co nt ents
Features
1
Introduction
2
Using t h e System in BASIC
3
Menu - Oriented D;isks .... . ... . . .. . . . .. .. .. .. ...... . . .. . . 3
Development Disks
5
BASIC a nd the Immediate Mode
S
Loading , Sa vin g and Running BASIC Programs
8
Floppy Disk Formats . .. .. .. . . ...... . .. ... . .. . ..... . ... . 8
Utilizing Named Program Files
11
Mini- Floppy Disk Direct o ry
12
Full Size Flopp y Di sk Directory
13
Savin g a BASI C Progra m On Dis k Via a Named File . . . .. . 14
Loadin g a BASIC Program From Disk By File Nam e
IS
Delet ing Files
15
Backing Up Files
17
Modifying BEXEC i: and Applicat i ons Disks . ....... . . .... 17
Advanced Features of OS - 65D V3 . 0 9- Digit BASIC
19
BAS IC I/O Han d ling
19
BASIC to DOS Interface
20
Data File s in BASIC ..... .. . . . ......... . .... ... .... . . . 22
Seq ue ntial Data File s
22
Steps to Using Seq uen tial Data Fi les
23
Random Data Fil e s
25
Steps to Using Rando m Data Files . .. . . .... ... .... .. ... 2 6
Us ing t he Assembler/ Edit or
28
Using the Extended Monitor
30
System Overview
31
System Architecture . ... . . . .... .... . ... . . .. .. . ... ... .. 31
Memo r y Map
32
Ut ility Programs
33
Create Fil e Ut ility . ..... . ... . .. .. ... .... . . .. ..... 34
Change ParameTer Utility
36
Delete File Uti l ity
43
Directory Util i ty
44
Sorted Direct o ry Ut iIi ty . . .. ..... .. .... . .. . .. . . . .. 46
48
Random Access File Li st Utility
Rename File Ut ility
50
Secto r Directory Utility
51
Seq ue ntial File Lister Utility .. . ..... . ... . .. . ... . 53
Trace Utility
54
File Zeroing Utility
55
OS -65 D V3. 0 Kernel
56
Changing I/ O Distributor Flags ... . . ... . . . . . . .. .. . . ... 56
Transferring Disk Sectors
59
Executing a Machine Code File
59
Us i ng I nd irect Fi l es
61
Kernal Uti lit i es .. .... . .. ..... . . .. . . . .... .. .... . . . . . . 63
Initializing Di skettes
63
Copying Diske t t es
63
OS - 65D V3 . 0 fo r the I - P
65
I - P Pico DOS
66
Appendix
OS - 65D V3.0 llse r ' s Guid e
Manual eC) 197 8 OHIO SCIE NTIFIC, INC.
65D V3 . 0 eC) 1978 OHIO SCIENTIFIC, INC .
9-Digit BASIC eC) MICROSOFT, INC.
Features
*Convenient to use "conv entional" disk operating system
*Available for all OSI 6502 mini-floppy and 8" floppy
confi g urations
*Supports 9-Digit BASIC, Assembler/ Editor, Extended Machine
Code Monitor and transient code programs
*Utilizes named files and manually allocated files interchangeably
*Features con v enient to use BASIC oriented sequential and
random access data files
*Supports up to four floppy drives
*Supports 430 serial, 550 serial (16 port) parallel printer,
cassette and memory I /O as well as serial console and/ or
keyboard with video console
*Can be directly converted to a locked menu-oriented system
for end users
*Contains all OS-65D V2.0 features as a subset and can read
version 2 files and assign file names to them
*Supports multiple variable length disk buffers and variable
length sectors on diskette
-1-
Introduction
OS-650 version 3.0 is a convenient to us e disk operating
system which fully supports Microsoft's 9-0igit Extended BASlC,
a 6502 resident Assembler/Editor, 6502 Extended Machine Code
Monitor and various I/O devices.
The operating system is
available for all Ohio Scientific mini - floppy and full size
floppy disk configurations.
The system is convenient for
beginners to use via the programming language BASIC.
It
supports writing' programs in BASIC, storing programs on disk,
recalling programs and reading and writin g sequential and
random access data files in BASIC.
The s y stem also fully
supports assembler language programming for the 6502.
In
conjunction with its assembler and machine code capabilities,
it offers an extensive machine code debugging aid, the Extended
Monitor.
The system is also well suited to utilize machine code
subroutines in conjunction with BASIC programs.
It has several
advanced features such as variable sector length and the capability
of its stand-alone disk operating system ke r nel to support other
languages.
This manual will cover the above features starting with
fundamental operation of the system for the BASIC programmer
and advancing to more detailed levels.
The manual is written
to permit the user to fully utilize the computer system at the
BASIC language level, without ever having to read those portions
of the manual covering assembler level operation.
For the user's
convenience, a condensed User's Guide that covers all features of
OS-650 Version 3.0 is included at the end of this manual.
-2-
Using the System in BASIC
Before usinq any flopp y diskettes, please carefully read
al~
the warnings about the care and handling of diskettes and
the fl oppy disk system in the main operator's manual accompanyin s; yo ur computer .
Once yo u ha ve the system properly connected
anc pC"'ere d up, p lace the 65D Version 3.0 diskette, label side
up, in the " A" drive of your disk system.
There are basically
t wo types of 6 5D 3 . 0 diskettes: Development disks and menuoriented Appl icati on s disks.
Both boot up directly in the
programr..i ng language BASI C and e xecute a BASIC program called
BEXEC* .
with e ith er type of disk ette, the proper procedure is
as follow s:
1.
Place the diskette into the c is k d ri ve.
2.
Close the drive door .
3.
Depress the reset button in fr ont of the CPU or the
break key on the computer's k e yboa r d depend in g on
the model of the computer you have.
4.
Check to be sure the shift lock key is in the locked
or down position on polled keyboard systems.
5.
Depress the " D" k e y. This selects the floppy d isk
bootstrap which will load the operating s y stem from
disk into memory. A series of messages will appear
on the screen.
Me n u-Oriented Disks
Applications disks di s play a menu when boote d
~,hi ch
is a list
of numbers an d p ro gram descriptions, and fi nally, a message such
a s "YOUR SE LECTI ON? ".
To select the desired program, you simply
t ype the number corresponding to the desired selection and depress
the
RETU~~
key.
The operating s y ste m will then load that program
an d execute it .
- 3-
Note that all inputs you type into the computer must be
followed by pressing the RETURN key.
"line-oriented input".
This is referred to as
It offers a tremendous advantage over
character oriented input in that until the RETURN key is pressed,
typing errors can be corrected by merely typing a delete
character after the error, then typing the correct character.
(On various keyboards the delete character (hex code SF) may be
a shift-O, underline or back arrow.)
On video terminals with
backspace capability the erroneous character is then erased and
•
the cursor is left at the proper position for entry of the correct
character.
On printing terminals that have backspace capability
the erroneous character obviously cannot be erased.
However, the
print head is left correctly positioned for entry of the correct
character.
On terminals without backspace capability the cursor/
print head is not repositioned but the delete is performed permitting simple correction of errors.
as needed can be used at any time.
As
many delete key strokes
For example, if two characters
were typed in error, two delete key strokes can be used to eliminate
them.
In addition to the single character delete, a control-U key
entry may be used to delete a whole line.
This is done by pressing
the U key while holding the CTRL key down.
Menu-oriented operating systems provide operational messages
as you go so it is usually not necessary to refer to this manual
while operating an Applications disk.
It is possible to gain
access to the internal software of an Applications disk by typing
in the proper response when the menu is displayed.
This feature
will be covered later, after the user has gained a familiarity
with Development disks.
-4-
Development Disks
Development disks are specifically for users who wish to
write their own programs.
Development disks contain utility
programs which will provide assistance in developing software
instead of providing end user application programs.
A Development
disk will boot in with a message such as "OS-65D Version 3.0"
followed by some other messages and a selection of possible
functions, ultimately asking the question "F UNCT ION?".
The
functions in this menu are utility programs wh ich will be covered
later.
BASIC and the Immediate Mode
The first objective in mastering 65D Version 3.0 is to learn
to utilize the programming language BASIC in the immediate mode
and to write simple programs.
This is accomplished by selecting
a Development disk, booting it in by typin g D and answering
"UNLOCK" to "FUNCTION?".
(Note that the RETURN key must be hit at
the completion of each line of input.)
This operation initializes
BASIC, prepares it for end user programming and returns the user
to the BASIC immediate mode displaying the prompter "OK".
At
this point, the computer will accept almost all standard BASIC
statements in the immediate mode.
The immediate mode can be used
in conjunction with any standard BASIC textbook for mastering the
concepts of the programming language BASIC.
The following is a
short introduction to programming in BASIC and some samp le programs
that can be run.
Once you have mastered elementary programming in
BASIC, proceed to the next section which covers loading BASIC
programs from disk and storing BASIC programs on disk.
-5-
PROGRAM EXAMPLE
The following program example demonstrates some of the
more fundamental concepts of BASIC.
This program may be
entered when the computer replies "OK".
Enter the program
exactly as it appears, including all punctuation, etc.
114
PRINT "HELLO!
I'M YOUR NEW COMPUTER!"
214
PRINT
~TU~
314
END
~TU~
~TURN>
Now, check ~he program to be sure you have entered it
correctly.
Type in the word LIST and
~TURN>.
This
instructs the computer to print out the program as stored
within the computer's memory.
LIST
~TU~
To have the computer execute ("run") the program, type in:
The computer should then print:
HELLO!
I'M YOUR NEW COMPUTER!
The BASIC language makes it easy to modify (edit)
program.
the line.
a
Errors within a line may be corrected by retyping
Additional statements may be incorporated into a
program by sequencing the new line numbers within the existing
program.
The following additions to the example program
demonstrate these editing concepts.
5 FOR X=iJ TO 314
~TURN>
25 NEXT X 4x:TURN>
To examine the program as amended, type LIST
To execute the new program, type RUN
-6-
~TURN>
~TU~.
The computer operating manual contains a more in-depth
discussion of BASIC, several sample programs and a reference
manual on BASIC.
You may also wish to refer to one of the many BASIC
FLogramming texts now available for an in-depth study of BASIC.
-7-
Loading, Saving and Running BASIC Programs
OS-65D Version 3.0 allows t .he user to LOAD, SAVE and RUN
BASIC programs specified by starting track number or by up to
a six character file name.
This unique approach allows maximum
versatility in that the user can allow the disk system to locate
the space for files or can manually specify exact ly where files
appear on the disk, as desired.
Floppy Disk Formats
Floppy disks are di vide d into concentric circles called
tracks.
Each track can be further di vided into entities called
"sectors".
An 8"
floppy disk has 77 usable tracks.
Mini -floppy
disks have from 35 to 40 usable tracks depending upon the quality
of the read/w rite head in the floppy diskette drive and the
quality of the floppy media.
Tracks are numbered from 0 up such
that the 5th physical track on the disk is track 4.
OS - 65D
Version 3.0 stores BASIC programs starting on track boundaries
and uses an integer number of tracks to store each program.
That is, it stores programs on a single sector per track.
Pro-
grams that are multiple tracks in length are stored on contiguous
tracks, that is, if a program is 3 tracks long and is specified
to be stored on track 40, it is, in fact, stored on track 40, 41
and 42.
On 8" floppies, approximately 2800 bytes or characters
are stored per track.
On mini-floppies, approximately 2000 bytes
or characters are stored per track.
Not all of the diskette is available to store user programs .
Part of the diskette is occupied by the operating system, the
language proces sors such as BASIC and the Assembler , utility programs
-8-
and possibly other end user programs and data files.
It is
necessary to maintain a directory of what is on the disk both
to be able to select desired information from the disk and to
know what portions of the disk are available for future storag e.
For the moment, we will bypass the methods of obtaining directories and proceed to storing a program on diskette and
recalling it.
First, type a short program into the computer in BASIC
and RUN it.
Then, follow the procedure below.
Note, when
I
you type EXIT, the system will report the number of tracks
required to store the program.
On 8" floppies stor e the
program on track 73; on 5" floppies store the p r og ram on track
34.
Procedure for Saving a Program on Disk by Track Number
A.
After the program has been entered:
1.
Type EXIT. (By now you should be re membering to hit
the RETURN key after each line of input.)
2.
BASIC will report number of tracks needed for stora g e.
Then the DOS prompter A* will appear.
3.
Type PUT (track number) where (track nu~ber) = 73 f o r
the example on 8" floppies and 34 on 5" floppies.
WARNING: PUT (track number) will place new programs
right over old files on the disk , so be sure
that the tracks you specify don 't contain
other important sofh' are (in the example,
they don't).
4.
Type RETURN BASIC or RE BA in shorthand.
5.
The BASIC prompter "OK" should appear with the pro g ram
still in memory .
Type NEW to clear the p rogram from
the work space.
me~. ory
and reini ti ali ze
Now follow the procedure on the next page,
specifying track 73 for 8" floppies and track 34 on a 5" floppy.
-9-
Procedure for Loading a Program from Disk by Track Number
1.
Type EXIT
2.
Ignore the track size report BASIC puts out
3.
Type LOAD (track number) where (track number)
the starting track of the desired program
4.
Type RE BA
5.
The BASIC prompter "OK" should appear with the
program in memory
6.
RUN or LIST the program as desired
is
The preceding process could be considered tedious for
bringing in programs to be run.
There is a much shorter way
of bringing in programs and running them.
This can be demonstrated
by typing NEW to initialize the work space and then typing the
statement RUN ( track number) where (track number)
is 73 or 34.
This brings the program into the work space and automatically
starts executing it.
-10-
Utilizing Named Program Files
It is somewhat difficult to have to remember the locations
of all programs by track number.
For example, it is easy to
forget whether a program you want is on track 72 or track 27.
Therefore, it is desirable to be able to utilize a name for a
program instead of its track number.
To utilize named files on the disk, utility programs which
are present on the diskette must be used.
These programs are
written in BASIC and include DIR, CREATE an d DELETE.
There are
more utility programs, but these are the only ones necessary
for saving and recalling named BASIC programs.
directory program.
DIR is the
This program, when executed, lists or prints
out a directory of the disk files by name and track utilization.
Disk files can include BASIC programs, BASIC data files, assembler
source code, machine code and other special files such as the
utilities programs.
To obtain a disk directory, simple type
RUN"DIR while in the BASIC immediate mode.
Or t ype DIR directly
to the question" FUNCTION?" When the sys tern is booted.
The
directory program then asks if you want line printer output
stead of console output.
~n­
It then follows with the directory of
file names and track ranges.
The following two listings show
the standard directory for mini-floppy and 8" floppy Development
disks.
-11-
Mini -Floppy Disk Directory
OS-65D VERSION 3.0
DIRECTORY
TRACK RANGE
FILE NAME
-~- - ---------------------------
.0'-12
14-14
OS-65D3
BEXEC*
CHANGE
CREATE
DELETE
DIR
DIRSRT
RANLST
RENAME
SECDIR
SEQLST
TRACE
ZERO
ASAMPL
15-16
17-19
2(1-2.0'
21-21
22-22
23-24
25-25
26-26
27-28
29-29
3.0'-31
32-32
5(1 ENTRIES FREE OUT OF 64
-12-
Full Size Floppy Disk Directory
OS-650 VERSION 3. 0
-- DIRECTORY -TRACK RANGE
FILE NAME
------------------------
OS65D3
BEXEC'"
CHANGE
CREATE
DELETE
DIR
DIRSRT
RANLST
RENAME
SECDIR
SEQLST
TRACE
ZERO
ASAMPL
0-8
9 - 9
10 - 10
13 - 14
15 - 15
16
16
17
17
18 - 19
20
20
21
21
22 - 23
24
24
25 - 26
27 - 27
-
50 ENTRIES FREE OUT OF 64
-13-
The directory listing shows that the program named DIR
resides on track 16 so that, in fact, the program could be
run on an 8" floppy by the statement RUN"16 just as well as
it could be by the statement RUN"DIR.
For more information
on the directory program and the sorted directory program,
DIRSRT,refer to the utilities description portion of the manual.
Saving a BASIC Program on Disk Via a Named File
In order to save a program on disk as a named file, the
disk file must exist on the disk an d appear in the directory.
(
A file is created on disk by use of the CREATE utility program.
This program allows the creation of a disk file of any size from
one track to the total free space of the disk.
The file must have a
six character file name which is unique, that is, the name cannot
be the same as that of an existing file.
The CREATE utility
also checks to make sure that the tracks specified are not in use
at the moment to preclude the possibility of over-writing or
destroying other data on the disk.
simply type RUN" CREATE.
gram called TEST.
To utilize t'1e CREATE prograrr.,
To start, CREATE a one track long pro-
For more detailed information on the CREATE
program, refer to the utilities description portion of the manual.
Once a file such as the example file TEST has been created with
the CREATE utility, you can directly store a program in it.
in a short program and run it.
Key
Then to store this program on
disk in the file TEST, type the followin g statement: DISK! "PUT
TEST".
This statement saves the program currently in the work
space under the file name TEST.
If TEST does not exist or you
misspell it, the di sk operating system will report the error.
-14-
Loading a BASIC Program From Disk By File Name
sa~e
To load and run a BASIC program by file name, use the
procedure as you have used for utility programs.
the statement RUN"TEST".
Simple type
If you want to bring the program into
the work space without running it, type DISK! "LOAD TEST ".
loads the
p~ogram
This
into the work space but does not execute it.
After these' exercises ha ve been comple ted, you can veri fy the
existence of the file TEST by running the directory prog ram and
observing what track it appears on.
Deleting Files
After utilizing a diskette for awhile, it may be desirable
to remove a file from the disk because the file is no longer
needed or possibly because the program is becoming too l arge
for that particular file and the file must be recreated a larger
size.
Files can be removed from the directory and subsequently
from the disk by use of the Delete Utility.
Refer to the utility
documentation portion of this manual for instructions on the use
of this utility.
Other Useful Features FOr Loading and Saving Programs on Disk
We have now covered all the fundament als required to put
programs on a diskette and recall them from a diskette .
The
following discussion will provide additional insights into the
use of the disk system for BASIC programs and other files.
Tips for File Use
File names can be up to six characters lon g and are generally
three to six characters.
The first character in the f ile name
must be alphabetic and the name cannot include spaces.
-15-
The
directory program lists out file names as they appear in the
For this reason, a sorted directory program, DIRSRT,
d irect o ry.
is ava ilable.
It sorts the directory in a lphabetic order or
track number order.
called
RE NA~ffi
The disk also contains a renaming utility
which allows a file name to b e changed.
Tips On File Size
The OS-65D approach to data files re q uires that the user
know how large his file is initially.
Fo r programs, this should
not be a problem.
To be safe, the user can simply spe c ify a d isk file size
as larS' e as or sli<;htly larger than the ava ilable RAN for BASIC
programs.
For example, with the mini-disk system with 20K of
RAN slightly less than 8K is available f o r programs, thus, a
four track file will handle any program that can be typed into
the machine.
The user should always maintain a scratch file,
usually with the name SRATCH, which is larger than the memory
size of the computer or simply have a larg e block of free tracks.
This f ile or. block of tracks can act as temporary storage in
se v e l-al situa t ions.
For example, the user types in a program
and '_h en remembers that he did not create a file for it.
The
procedure is to simply store the program in S RATCH, create an
appropriate f ile, r210ad the program from SRATCH and store it
unde r its p roper name.
Another case comes up wh en a BASIC
program o utgrows its file size.
The program is then stored in
SRATCH, the old file is deleted and then recreated in a larger
size.
These procedures will also be valuable for data files
which will be discussed later.
-16-
Backing Up Files
On computer systems with two or more disk drives, it is
recommended that the user periodically recopy his entire disk to
a "back up" disk by use of the Copy Utility.
The Copy Utility
is a machine code utility and is described in the utilities
documentation portion of the manual.
On single drive systems,
the best approach is to back up work by performing all disk
file functions on two diskettes.
is being
generat~d,
That is, when a new program
a file for it should be created on two
diskettes and then when the program is entere d in the machine,
it should be saved on both diskettes by storing it on one disk,
removing that disk from the system, placing the other diskette
in place and storing it in that diskette.
This is a somewhat
tedious process which is why dual drive systems are popular.
Modifying BEXEC* and Applications Disks
We have now covered enough information to allow the customization of existing Applications diskettes and the creation of new
Applications diskettes.
All OS-65D Version 3.0 diskettes boot up
in BASIC and call in and execute the BASIC program called BEXEC*.
On Applications disks, this program contains a menu of available
BASIC programs.
On Development disks it may contain a menu of
some of the utilities.
To access the operating system, that is,
to unlock an Applications disk such that programs may be listed
and modified, the user must type either UNLOCK or PASS to the
question "YOUR SELECTION?" depending upon the particular diskette.
The system then reports that it is open for modification.
By
unlocking the Applications diskette and examining the listing of
-17-
the menu program, the user can determine where programs are
located on the disk.
Programs can then be called in via the
LOAD command, modified and saved back on disk.
Additional
programs can be saved on the disk and menu changes can be
made as required .
The Applications disks do not contain the
named file utility programs CREATE, DIR, etc., but can be
utilized in conjunction with these programs if they are brought
in from a Development disk.
Likewise, the user can generate
new Applications disks by simply changing BEXEC* on a Development
t
disk as desired for menu and locked operation.
-18-
Advanced Features of OS-650 Version 3.0 9-0igit BASIC
The 9-0igit BASIC in OS-65D Version 3.0 contains several
extensions to Microsoft 9-Digit BASIC.
These extensions provide:
1.
Input/output distribution to various devices
2.
Interfaces to the disk operating system kernel
3.
Extensions for sequential and random access disk
data files
We will now discuss each of these extensions in detail.
BASIC I/O Handling
BASIC inputtand output is performed with the following
commands: INPUT, PRINT and LIST.
Under OS-65D BASIC, these
statements can be utilized in the normal way for input and
output to the console device.
Also, input/output can b e
selectively routed from/to va rious other devices on th e system
including a terminal, modem or cassette at the serial port,
video display, 430 board based UART, memory buffer, line printer,
two disk buffers, 16 port serial board and a null device.
Input /
output can be routed from/to these devices b y simply typing a
pound sign (#)
and the device number (as liste d in the table belOlv)
immediately following the INPUT, PRINT or LIST command.
Output Devices
Input Devices
1.
2.
3.
4.
5.
6.
7.
8.
9.
Serial Port (ACIA)
Keyboard on 440/540 Board
UART on 430 Board
Null
Memory
Disk Buffer 1
Disk Buffer 2
550 Board Serial Port
Null
-19-
1.
2.
3.
4.
5.
6.
7.
8.
9.
Serial Port (ACIAl
Video on 440 / 540 Board
UART on 430 Board
Line Printer
Memory
Disk Buffer 1
Disk Buffer 2
550 Board Serial Port
Null
The following are examples of the use of these statements.
INPUT #8,0$
PRINT #4, "LINE PRINTER"
LIST #6
For instance, to store a program on cassette that exists
en disk, the user simply calls that program into memory and types
LIST#1 or LIST#3 depending on which port his cassette interface
is connected to.
This lists that program on that device.
To
output to a printer, the user simply types PRINT #4 and the output will be routed to the line printe r.
Memory output, device 5,
is useful for various experimenter situations such as directly
displaying information on the 540 video screen without scrolling.
This particular application is covered in the Character Graphics
Reference Manual.
Device 6 and device 7 are memory buffers for
use with disk files.
The use of these disk f:'.le buffers will
covered in the following section.
Care must be taken not to
route input or output to non-existent or turned off peripheral
devices since this will cause the computer system to "hang."
and
will require a reset which may destroy data in memory.
BASIC to DOS Interface
OS-65D Version 3.0 utilizes a stand alone command processor
for the disk operating system.
That is, disk operation can be
performed even if BAS IC is not present in memory.
Full discussion
of the disk operating commands are in another section of the manual
and in the User's Guide.
We have already covered some of these
commands such as LOAD and PUT.
The programmer can leave BASIC
and enter the DOS command mode by typing EXIT.
-20-
If he does not
alter the BASIC interpreter in memory or the work space he can
return to BASIC by typing RETURN BASIC or in shorthand form
RE BA.
The user can also execute a single DOS command without
leaving BASIC by utilizing the statement DISK! "string" where
string is an operating system command.
This statement can be
part of a BASIC program, thus, allowing the user to conveniently
utilize all the disk operating system commands as part of any
BASIC program.
-21-
Data Files in BASIC
In many applications it is a practical necessity to store
many va riables in such a way that they can be recalled at a
later date.
Speci f ically, after the powe r has been turned on and
off se veral times.
Such a collection of v ariables is referred
to as a data file.
There are two fundamental types of data files
a va ilable under OS-65D version 3.0; sequential files and random
files.
Sequential Data files
A sequential data file is a file in wh ich information is
output to the file sequentially, one item ri ght after another
fro m the beginnin g to end of the file.
To read information from
the file one must sequentially input it.
Examples of uses for
sequential files, would be store a large numeric array or to
store information that can be searched sequentially such as
names and phone numbers.
Let's walk through the process of
having a name and phone number in a sequential
a fi le of adequate length must be created.
file.
First,
Then a program must
be written which outputs names and phone numbers to this data file .
Another program can be written that reads the individual string
entries which are, in fact, names and phone numbers and compares
the m with a
tal~et
name which is the name a user is searching for .
If this name is found in the file, the next string from the
fi le wil l be the de sired phone number.
Ea ch file is terminated
by an "end of file" ma rker which the programmer can use or the
programme r may utilize o ther techniques for his own end of file.
For instance, in th e telephone program, the string "END" could
-22-
be utilized as the "end of file" indication.
This would be the
last string output to the file and could be checked for when
inputting information from the file.
OS-6SD allows the user
one or two disk buffers for use with one or two files.
This
means that the user can have one or two sequential files in use
in his program at any given time .
as devices 6 and 7.
These files are referred to
To utilize files as device 6 and 7, obviously
one must equate them to physical files on disk.
This is done by
use of the OPEN command which equates a name d f ile to a particular
device number.
For example, the statement, DISK OPEN 6, "TEST2"
opens the previously created disk file TEST2 and equates it to
device 6.
Once this statement has been executed, a statement
such as PRINT#6,A$ will print the string A$ to the file TEST2.
Likewise, information can be input from a file by the statement
INPUT#6,B$.
When this statement is executed, the next var iable
in the data file TEST2 will be read into string variable BS.
At the end of a program or when one has completed their use of
a particular data file, the statement DISK CLOSE ,6 shoul d be
executed which closes the data file and assures that all updates
to the file are made.
Two data files may be in use simultaneosly
by opening one on device 6 and one on device 7.
Then INPUTS and
PRINTS to device 6 and 7 can be made interchangeably.
More than
two data files can be used in a program by simply closing and reopening files, as needed.
Steps to Us ing Sequential Data Files
The following steps must be taken to create and fill a
sequential file with information.
-23-
1.
Using the CREATE utility, create a file to hold the
sequential output program with a name such as PROGI.
2.
Create a data file with a name such as TEST2.
3.
Execute the Change Utility by typin g RUN" CHANGE.
Use the Chan ge Utility to allocate space for one
disk buffer at the beginning of the BASIC program.
Refer to the section on disk utilities for explicit
information on using the Change Utility.
4.
When the CHANGE program is complete, the work space
has been reconfigured with space allocated for a disk
buffer.
The program for use of the single disk file
should be entered at this time.
The following program
may be used.
str~ngs
It will place four
in the disk
file TEST2.
5.
I'
DISK OPEN,6,"TEST2"
211
FOR 1=1 TO 4
311
PRINT #6,"STR1NG",1
4.0'
NEXT I
5.0'
DISK CLOSE,6
Store the program on disk under the name specified in
Step l .
6.
Run the program which should output the strings to the
disk file TEST2.
7.
Use the utility program SEQLST to list out the contents
of the data file TEST2.
Refer to the utilities portion
of the manual for directions.
B.
Make the following changes to the program to use it to
-24-
list out the file.
9.
30
INPtJr 16,D$
35
PRINT D$
Run the modified program.
The results should be the
same as they were when 5EQL5T was run.
Random Data Files
In may instances, sequential files become very impractical.
For instance, in an inventory application, one would like to be
able to quickly access an inventory item for reference or
change.
This requires the use of a random data file.
Random
data files differ from sequential files in that groups of entries
are combined into records.
These records can be randomly (non-
sequentially) accessed.
For instance, a random data file could
have a hundred records.
A program could quickly access anyone
of these records by record number.
For example, the contents of
record 58 could be brought in and the contents of record 72 could
be brought in without looking at any of the records in between.
05-65D Version 3.0 supports one random access file at a time as
device 6.
This can be used in conjunction with an optional
sequential file as device 7.
The length of individual records
within a random access file can be adjusted by the user but are
factory set at 128 bytes.
There can be any number of individual
variable entries within a record of 128 bytes and one record can
overflow into the next so that if the user wanted 256 character
records for instance, he would just utilize even record numbers.
The following example will use the same data file, TEST2, and use
it as a random file with a total of ten records.
-25-
To reuse this
sequential data file as a random file, we must first perform
some housekeeping.
Zero Utility.
This housekeeping is performed with the
The Zero Utility erases all information in a
To accomplish this, type RUN"ZERO.
file~
as the file to be erased.
Then specify TEST2
A more complete discussion on the
Zero Utility function is present in the utilities portion of
this manual.
After TEST2 has been zeroed, proceed with the
following steps.
Steps to Using Random Data Files
,
1.
Create a new program file or utilize the same program
file as in the sequential exercise.
2.
Execute the Change Utility and allocate space for one
disk buffer.
3.
4.
Type in the following program:
111
DISK OPEN, 6, "TEST 2"
2$6
FOR I=11 TO 9
3$6
DISK GET,I
411
FOR J=l TO 2
511
PRINTil6, "STRING" ; I;J
6$6
NEXT J
711
DISK PUT
8$6
NEXT I
911
DISK CLOSE,6
Save the program under the file name specified in
Step 1.
5.
Run the program to fill TEST2 with ten records of
information.
-26-
6.
Utilize the random file list utility RANLST to list
out the information placed in TEST2.
Note that RANLST
only lists one string per record so it does not list
the second string we wrote to each file record.
7.
8.
Modify the original program via the following lines:
5~
INPUT #6,D$
55
PRINT D$
7~
(deleted)
Execute the modified program to observe the output
,
information.
Output information should be the same
as was originally placed in the file.
Note that in the above example, an inner FOR loop is used to
write each of two strings to each record of the file.
Execution
of the PRINT statement for each string causes the data followed
by a
~arriage
return character to be written to the file.
Al-
though the carriage return character occupies a character of
file space, its use after each item written to the file greatly
simplifies inputting the data.
If a record were written as a single
long string, commas would ha ve to be wr itten out between each item
or the user would have to provide the detailed programming to break
the long string into its separate items whenever the string was
input.
It is much simpler to write each item with a separate
statement.
PRI~T
There is also another limitation preventing lon g strings
from being read.
The BASIC input buffer is 72 characters long.
Consequently, longer strings are truncated on input.
-27-
Using the Assembler/Editor
OS-65D version 3.0 supports an interactive Assembler/
Editor.
The Assembler/Editor can be brought in by proceeding
with the normal boot in procedure to BASIC's immediate mode.
Then type EXIT followed by ASM.
This brings in the Assembler/
Editor and place s the c omputer in the Editor's immediate mode.
Assembler/Editor's operation is as specified in the separate
Assembler/Editor Manual, except for the extensions to the
Assembler covered here .
cost option.
files.
The Assemble r/Edi tor is an extra
The Assembler/Editor utilizes two types of
Source files which contain the assembler code and
optional object files which contain the machine code generated
by the assembly.
Under OS-65D Version 3.0, source files can be
named or specified by track number.
Objec t files can be stored
in variable sector format for placeme nt anywhere in memory or
can be stored in named file mode if they are set up to resi de
in the standard work space.
In addit ion, the disk operatin g
system includes an execute object file command (XQT file name)
which allows the direct and convenien t execution of machine
code files providing they are linked to the operating system
and reside in the normal work space area.
Named files must be
created via the BASIC utility before the assembly process is
begun.
The user has the option of exiting from the Assembler
to the DOS for DOS level commands by the use of the EXIT command
and returning by typing RE ASM after completing a command.
Or,
a command can be sent di rectly to the DOS by simply preceeding it
with an exclamation poi nt (!).
-28-
For example, !LOAD file name
loads a source code file into the assembler's work space anc
returns control to the Assembler/Editor.
return to the Assembler if the
processor area.
BASIC is in the
Asse~hler
Note you can only
is in the transient
Likewise, you can only return to BJI.SIC if
transie~t
processor area.
So, if the
Jlsse~bler
was last used, you will ha ve to type the DOS cowmand BASIC to
reboot BASIC .
If BASIC was last used, you I.Till have to type
the DOS command ASM.
-29-
Using the Extended Monitor
OS-65D version 3.0 also includes an Extended Machine Code
Monitor for debugging programs at the byte level.
is particularly useful for assembler code work.
This utility
The Extended
Monitor can be entered by booting in the system, exiting BASIC
by typing EXIT and by typing EM which boots in the Assembler/
Editor and Extended Monitor and leaves the system in the extended
monitor command mode.
The OS-65D Version 3.0 User's Guide, at
the end of this manual, provides a complete list of the Extended
Monitor's commands.
-30-
System Overview
The OS-65D Version 3.0 is a highly refined super set of
the original OS-65D operating system which was first introduced
in 1976.
Version 3.0 is a compact, highly responsive operating
system for BASIC, assembler and machine code programming.
It is
suitable for all computer system uses except the most demanding
business applications where OS-65U and OS-OMS should be utilized.
System Architecture
Version 3.0 utilizes a stand-alone DOS complete with command
interpreter.
The DOS and command interpreter are part of the DOS
kernel and can be utilized without a programming language.
In
addition to the DOS kernel, the system contains an I /O distributor
which supports all standard Ohio Scientific I /O device s and can
route input and output through common locations to any combination
of these input and output devices.
The system supports a transient
processor area, specifically for Microsoft BASIC, the 6502 Assembler/
Editor and the Extended Monitor and can be used for any other 6502
language processors wh ich may be installed on the system.
The
principal source code or object file work space starts at 3l7E
hex for 8" floppies and 327E for mini-floppies.
The following
memory map shows the overall layout of the system.
-31-
System Memory Map
O-FF
6502 Page Zero
100-FF
6502 Stack
200-22FF
Transient Processor Area for BASIC or Assembler
or other language orocessor
2300-3178
OS-65D V3 . 0 (to 3278 on mini-floppy versions)
2300-265B
I/O Routines
265C-2A4A
,
2A4B-2E78
2F79-3178
317E up to BFFF
Disk Drivers
Operating System Kernel
Swapper
Source File Work Space (327E up for mini-floppy)
Disk buffers when present normally occupy from
317E up, offsetting the work space (327E on
mini-floppy versions)
-32-
Utility Program
A complete set of utility programs are provided in the OS-65
Version 3.0 for use in creating new files, copying files, printinq
directories of files or file contents, etc.
These programs may be
used without any knowledqe of their implementation.
However, they
are all written in BASIC and may be used by the interested reader
as sample programs demonstrating various programming and f i le
accessing techniques.
Description~
of the operation of the utility programs appear
on the following pages.
-33-
Create File Utility
This utility program is used to create new named files.
Note that a file must have been created with this program
before it can be referenced by any of the file commands.
To
create a file, type:
RUN "CREATE"
The program output and the kind of input you may enter
in response are as shown below.
Any unacceptable response will
result in an error message and/ o r a repeat of the request for
input.
FILE CREATION UTILITY
PASSWORD?
The program continues with an explanation of its
operation:
CREATES AN ENTRY IN DIRECTORY FOR A NEW FILE AND INITIALIZES
THE
~RACKS
THAT THE NEW FILE WILL RESIDE ON.
THE TRACKS
WILL CONTAIN NULLS WITH A RETURN AT THE END OF THE TRACK.
FILE NAME?
Enter a one to six character file name that is not a duplicate
of an existing file name.
It must start with a letter.
FIRST TRACK OF FILE?
Enter the number of the first track the file is to reside
on.
Note that a file always begins on a track boundary and
resides on a whole number of tracks.
NUMBER OF TRACKS IN FILE?
Enter the number of tracks on which the file is to reside.
All tracks ass igned to a file must not have been previously assigned.
-34-
The program then continues with:
12 (8 for mini-floppy) PAGES PER TRACK.
IS THIS OK?
Type YES if the specified number of pages per track is
acceptable; otherwise, type NO.
If you type NO, the following
question is asked:
HOW MANY PAGES PER TRACK THEN?
Enter the number of pages of storage you want each track
to contain.
Any number up to the default number of pages is
acceptable.
For full size diskettes this is twelve pages and
for mini-diskettes it is eight pages per track.
The file will now be created and its name and track
location will be entered into the directory.
Each of the
tracks of the file will be initialized to nulls with a return
character at the end of each track .
-35-
Change Parameter Utility
This utility program is used to change the systeM
Dara~eters
for terminal width and for the work space limits.
The defined terminal width value for the system is used by
the BASIC interpreter to provide automatic line rollover when
lines longer than the terminal width are output.
A carriage
return and line feed character are automatically inserted into
the output line when it hits the terminal wicth.
Thus, lon g
lines are output'as two or more lines rather than a single
truncated line.
Since some · serial terminals and all OSI video
systems automatically provide line rollov er, you may not need
to change this parameter.
Note that changing terminal width
with this utility program provides only a
terr.~orary
change.
Whenever the system is rebooted or BASIC is cold started (by
typing BAS), the terminal width is set back to its default
value 132.
If you write a BASIC program that requires a
different terminal width, then you must run this utility prograrr.
to appropriately change the terminal width p arameter prior to
running that BASIC program.
Or, you can include into the BASIC
program the following commands which setup terminal width (WD is
a BASIC variable which must contain t he desired terminal wid th) :
POKE 23,WD
NC = INT(WD/ 14) *14
POKE 24,NC
The second POKE, above, sets the column beyond whi·ch there are
no more 14 character output fields.
{Fourteen is the number of
character positions allotted to each output field when commas
-36-
are used to separate the variables in a PRINT statement.)
The "work space" is that RAM area where the assembler anc'.
BASIC source programs reside.
It is used to hold these source
programs and various tables, lists, etc., that are used during
assembly or BASIC program interpretation.
normally begins at 12670 (hex 3l7E)
systems and at 12926 (hex 327E)
The work space
for full size floppy disk
for mini-floppy d isk s y stems.
The end of the work space is normally the end of the main memory
(that memory which starts at address zero and is contiguous up
to some higher address) .
The BASIC command RUN "file name" and the DOS commands
LOAD and
PL~
provide a means to easily loa d a disk f ile into
the work space and to put a file that is in the work space back
onto disk either by name or by tr a ck number.
referred to as LOAD/PUT (or L/P)
Such fi les are
files.
The Change Parameter Ut ility Program permits changes to
the work space limits so that you can reser ve space in a LOAD/PUT
file for disk I /O buffers, assembly langua ge object code or
whatever.
The following diagram shows rele vant work space
addresses.
-37-
Mini-Floppy
Disk
System
Full Size
Floppy Disk
System
Normal End of Work Space
Depends on Size
of System Memory
or No. of Pages
Specified
User Defined
Room at the Top
(if present)
~
-------
- - - -
Depends of Size
of System Memory
or No. of Pages
Specified
User Defined
Changed End of Work Space
Source code,
tables, lists, etc.
storage used
by BASIC
Changed Start of Work Space
User Defined
- - - - - - - - - - - - -
-
User Defined
Additional Room
(if present)
18814 ( 49 7E)
----- --
12 Pages
15742 ( 3D7E)
Buffer Size is
3072 (COO) Bytes
12 Pages
12670 ( 317E)
-
--
-
- - -
Second Buffer
(if present)
-
-----------First Buffer
(i f present)
Normal Start of Work Space
17022 ( 427r.)
8 Pages
14974 (3A 7E)
Buffer Size is
2048 (800) Bytes
8 Pages
12926 ( 32 7E)
OS-65D V3.0 Work Space Addresses in Decimal (Hexadecimal)
-38-
To change system parameters, type:
RUN "CHANGE"
The program output and the kind of input you may enter in
response are as shown below.
Any unacceptable response will
result in an error message and/or a repeat of the request for
input.
CHANGE PARAMETER UTILITY
THE TERMINAL WIDTH IS SET FOR 132
DO YOU WANT TO CHANGE IT (Y/N)?
Enter YES or NO.
If you enter YES, the program requests
a new value for the terminal width.
NEW VALUE?
Enter a new value from 14 through 255.
The program continues with:
BASIC & ASSEMBLER USE xx K WORK SPACES (yyy PAGES)
WOULD YOU LIKE TO CHANGE THIS (YjN)?
This refers to the total amount of main memory available to
the system software.
pages.
Each K (1024 bytes) contains four 256 byte
A change to this parameter will make a portion of highest
memory unavailable to systems software.
Note that such memory
will not be included within LOAD/PUT files.
Enter YES or NO.
If you enter YES, the program requests
the number of pages to be used by system software.
HOW MANY PAGES SHOULD THEY USE?
Enter a number of pages from 50 through 191.
The program conLinues with:
r.HANGE BASI C'S WORK SPACE LIMITS (Y/N)?
Enter YES or NO.
If you enter NO, the program terminates.
-39-
If you enter YES, the program requests the following:
HOW MANY 12 (8 for mini-floppy) PAGE BUFFERS DO YOU
WANT BEFORE THE WORK SPACE?
Enter 0, 1 or 2 to reserve that many track buffers at the
beginning of the work space.
Note that device 6 memory buffered
I/O uses the first buffer by default while device 7 uses the
second buffer by default.
Of course, these defaults can be
changed with appropriate POKES.
If no buffers are specified,
the program asks:
WANT TO LEAVE ANY ROOM BEFORE THE WORK SPACE?
Enter YES or NO.
If you enter NO, the program outputs
the address of the start of the BASIC work space as shown
below.
If YES is entered, proceed to the "HOW MANY BYTES?"
question below.
If one or more buffers was specified, the program continues
with:
WANT TO LEAVE ANY ADDITIONAL ROOM?
Enter YES or NO.
If you enter YES, the following question
is asked:
HOW MANY BYTES?
Enter the number of additional bytes to be allocated
before the start of the work space.
The program then outputs the new address for the start
of the work space and the total number of bytes reserved for
buffers, etc.
THE BASIC WORK SPACE WILL BE SET TO START AT aaaaa
LEAVING bbbb BYTES FREE IN FRONT OF THE WORK SPACE
IS THAT ALRIGHT?
-40-
Enter YES or NO.
If you enter NO, the program requests
that you specify an exact lower limit address for the work space.
NEW LOWER LIMIT?
Enter a lower limit address.
The program then confirms this
value by outputting:
bbbb BYTES WILL BE FREE BEFORE THE WORK SPACE
The program then continues with:
YOU HAVE xx K OF RAM
DO YOU WANT TO LEAVE ANY ROOM AT THE TOP?
Enter YES or NO.
If you enter YES, the following question
is asked:
HOW
~~Y
BYTES?
Enter the number of bytes to be allocated between the top
of the wo rk space and the end of main memory.
The program then outputs:
THE BASIC WORK SPACE WILL BE SET TO END AT ccccc
LEAVING dddd BYTES FREE AFTER THE WORK SPACE
IS THAT ALRIGHT?
Enter YES or NO.
If yo u enter NO, the program requests
that you specify an exact number limit address for the work space.
NEW UPPER LI MIT?
Enter an upper limit address.
The program then confirms
this value by outputting:
eeee BYTES WILL BE FREE AFTER THE WORK SPACE.
Note that the reservation of space after the work space is
not recorded on disk with a program when it is saved in a file.
The allocation is only recorded as a RAM resident change to the
-41-
BASIC interpreter and remains in effect until explicitly
changed again, or BASIC is reloaded by typing BAS in the
DOS command mode.
Later, running a program that results
in an "Out of Memory" (OM) error may be the result of a
reduced work space that is no longer required.
Program output continues with:
YOU WILL HAVE fffff BYTES FREE IN THE WORK SPACE
IS THAT ALRIGHT?
Enter YES or NO.
If NO is entered, the Change Parameter
I
Utility Program restarts from the beginning.
Otherwise, the
requested changes are made, the work space contents are cleared
and the program terminates.
-42-
Delete File Utility
This utility program may be used to delete a named file
from the directory.
This frees the tracks on which that file
resided, but it does not actually alter the contents of th ose
tracks.
Consequently, until a new file is created residing
on thos e tracks or the tracks are otherwise changed, the
contents of the old (deleted)
file are still recoverable by
a direct track number access.
To delete a named file, type:
RUN "DELETE I'
The program output and the kind of input yo u may enter
in response are as shown below.
Any unacceptable response
will result in an error mes sag e and/or a repeat of the request
for input.
DELETE UTILITY
RE MOVES AN ENTRY FROM THE DIRECTORY
PASSWORD?
Enter the appropriate password.
The program continues with:
FILE NAME?
Enter the name of the file to be deleted .
The file will now be deleted from the directory.
-43-
Directory Utility
This utility program is used to output a list of all currently existing named files and the numbers of the tracks on which
they reside.
To output a directory, type:
RUN "DIR"
The program output and the kind of input you may enter in
response are as shown below.
LIST ON LINE PRINTER INSTEAD OF DEVICE #d?
Enter YES or NO.
(d is the current output device assignment.)
If you enter YES, the directory output will be on device 4; otherwise, it will be on the currently assigned device.
If you answer
YES and there is no device 4 on the system, the directory will
not be output.
A sample directory output appears below.
OS-6SD VERSION 3.0
DIRECTORY
FILE Nl>YJE
TRACK RANGE
OS-6SD3
BE XE C*
CHANGE
CREATE
DELETE
DIR
DIRSRT
RANLST
RENAME
SECDIR
SEQLST
TRACE
ZERO
AS AMP L
~-8
S~
9-9
l~-l~
13-14
IS-IS
16-16
17-17
18-19
2f1-2~
21-21
22-23
24-24
2S-26
27-27
ENTRIES FREE OUT OF 64
The above directory shows that the system software occupies
-44-
tracks zero through eight.
OS-65D3 is not a file in the
conventional sense, but appears in the directly solely to
delineate and reserve the tracks occupied by system software.
Track nine contains the BASIC Executive, BEXEC*.
This is a
BASIC program which always runs when the system is booted and
which may be customized as needed to suit your application.
In general, tracks ten through 26 contain the various utility
programs; however, note that tracks 11 and 12 are free.
Track
27 contains the sample assembler language program, ASAMPL.
-45-
Sorted Di re ctory Utility
This utility program may be used to output a list of all
currently existing named files and the numbers of the tracks
on which they reside.
This output can be in alpha numeric
order by f ile na me or by track nurrbe r.
To output a sorted
directory, type:
RUN " DIRSRT"
The program output and the kind of input you may enter in
response are as 6hown below .
Any unaccep table response will
result in an error messa ge an d / or a repeat of the request for
input.
SORTED DIRECTORY UTILITY
SORTED BY NAHE OR TRACK (N/T)?
Enter N or T to specify a named or a track sort, respectivel y .
The program continues with :
LIST ON LINE PRINTER INSTEAD OF DEVICE #d?
Enter YES or NO .
(d is the current output device assignment. )
If you enter YES, the directory output will be on device 4; otherwise, it will be on the currently assign ed output device.
If you
ans wer YES and there is no device 4 on the system, the directory
will not be output .
I f ne ither N or T was entered above
THEN IT WILL BE UNSORTED
is output and the direct o r y list wil l be in the same order as
the actual entries i n the directory .
Sample direct o ry outpu ts sorted by name and track number
appear on the next page .
-4 6 -
05-65D VERSION 3.0
DIRECTORY
FILE NAME
T RACK RANGE
27 - 27
9- 9
10'-1 0'
13-14
15 - 15
16-1 6
17-1 7
0'-8
18 - 19
21'- 20'
21-21
22-23
24 - 24
25 - 26
A5A~1PL
BEXEC*
CHANCE
CREATE
DELETE
orR
OIR5RT
05 - 6503
RA.l'JL5T
RENAI"IE
SEC OIR
5EQL5T
TPACE
ZERO
50' ENTRIES FREE OUT OF 64
OS - 650 VERS ION 3.0
01 Rr.CTORY
FILE NAl>'.E
TRACK RANGE
OS - 6503
BEXEC*
CHANGE
CREATE
DELETE
DIR
DIRSRT
RANL5T
P.ENAME
5ECDIR
SEQLST
TRACE
ZERO
ASAMPL
1'- 8
9-9
10'-l fl
13-14
15-15
16-16
17-17
1 8 - 19
20' -2 0'
21 - 21
22 - 23
24 - 24
25-26
27 - 27
50' ENTRIES FREE OUT OF 64
- 47-
Random Access File List Utility
This utility program may be used to list the contents of
a random access file either a single record at a time or in
groups of contiguous records.
records.
The program assumes 128 byte
To list a random file, type:
RUN "RANLST"
The program output and the kind of input you may enter in
response are as shown below.
Any unacceptable response will
result in an error message and/ or a repeat of the request for
input.
RANDOM ACCESS FILE READ
FILE NAME?
Enter the name of the random access file to be listed.
EXAMINE SINGLE RECORDS OR GROUPS (S / G)?
Enter S or G.
If S is entered, the number of the single
record to be listed is requested.
RECORD NUMBER?
Enter the number of the record to be listed.
numbered from zero through n.)
(Records are
The specified record is listed,
then the RECORD NUMBER question is again asked.
To terminate
the program, merely type a (return) to this question.
If G is entered , above, th~ range of record numbers to be
listed are requested.
FIRST RECORD?
Enter the number of the first record to be listed.
LAST RECORD?
Enter the numbe r of the last record to be listed.
-48-
The specified records are listed, then the "SINGLE RECORDS OR
GROUPS" question is again asked.
To terminate the program,
merely type a (return) to this question.
Note that this program reads and lists a single string
from the start of each record.
Random files with more than
one entry (an entry is a string of printing characters followed
by a return) per record will not be fully listed by this program.
-49-
Rename File Uti lity
This utility program may be used to change the name in the
c i recto ry of any file listed in the directory.
To rename a
f ile, type:
RUN "RENAME"
The program output and the kind of input you may enter in
response are as shown below.
Any unacceptable response will
result in an error message and/or a repeat of the r ,e quest for
input.
RENAME UTILITY
OLD NAME?
Enter the name of the file to be renamed as it currentl y
exists in the directory.
The program then outputs:
RENAME
"aaaaaa" TO?
(aaaaaa is the old name.)
Enter the new name for the file of one to six characters,
the first being a letter.
The name will be changed and the utility program will
terminate.
-50-
Sector Directory Utility
This utility program may be used to output the number
and size of each sector on each of a specified ran ge of track s .
To output a secto r directo ry , type:
RUN "SECDI R"
The progr am o utp u t
an d th e k in d of in put you may enter
in response are as shown b e low .
Any unacce p t ab le response will
result in an error message an d / or a repeat of the request for
input.
SECDIR
USES OS-65 D' S DI R COMMAND TO PRI NT
Ol~
A SECTO R MAP
OF A GIVE N RANGE OF T RACKS
FIRST TRACK?
Enter any v alid track number greater t han zero and less
than the total number of e x isti n g tracks ( 76 fo r f ull size d is k s
or 39 for mini-disks) .
LAST TRACK?
Enter any v alid track number greater th a n that entered for
the first track.
A sector ma p fe r the
s p eci f ~ed
tracks wi l l b e output, then
A sample of su ch i s shown below.
the program will t erminate.
SECTOR MAP DI RECTORY
TRACK In
.0'1 - .0' 5
.0'2 - .0'5
TRA CK .0' 2
iJ' l-0'B
e tc .
OK
-51-
In the
in length.
~amp1e,
track 1 has two sectors, both five pages
Track 2 has one sector of 11 (hex B) pages.
-52-
Sequential File Lister Utility
This utility program may be used to list the contents of
a sequential file.
A sequential file is one in which all entries
within the file are contiguous with no intervening gaps.
To list
a sequential file, type :
RUN "SEQLST"
The program output and the kind of input you may enter in
response are as shown below .
Any unacceptable response will
result in an error message and/ or a repeat of the request for
input.
SEQUENTIAL FILE LISTER
TYPE A CONTROL-C TO STOP
FILE NAME?
Enter the name of the sequential file to be listed.
The specified file is listed until you type a Control-C or
the end of the file is reached in which case the program terminates
with the following end-of-file message:
ERR #D ERROR IN LINE 100
OK
-53-
Trace Utility
This utility program may be used to initiate or terminate
a BASIC program line number trace.
To trace a BASIC program,
type:
RUN "TRACE"
The progra m output and the input you may enter in response
are as shown below.
Any unacceptable response will result in a
repeat of the request for input.
TRACE UTILIT Y
WHEN BASIC'S TRACE FEATURE IS ENABLED, BASIC WILL PRINT
OUT EACH LINE NUMBER OF THE PROGRAM BEFORE IT IS EXECtJrED.
ENABLE OR DISABLE (E/ D)?
Enter E to enable the trace or D to disable the trace.
If
the trace is being enabled,
160
OK
will be output.
utility program.
The "160" is a trace of the last line of the
Now· run the program y ou wish to test with
line number tracing.
Note that the e x ecution of any program - including utility
programs suc h as this one - will incl ude line number outputs
while the trace is enabled.
This will not adversely affect the
operation of the program.
-54-
....
File Zeroing Uti li t y
This utility program is us ed t o ze ro th e c onte n ts of a data
file .
This fills the enti r e data f i l e with null (hex
which are ignored (ski pped o ver) during BASIC inp u t.
~~ )
c har a c ters
You may
find it advantageous to "ze r o" random d a t a fil es be f o r e e nte ri ng
data into them in order to pro vide a "backg r o und " that is
"transparent" (not seen) b y a BASIC I NPUT command .
To zero a
file, type:
RUN "ZERO"
The program output and t he ki n d o f input you may enter in
response are as shown be l ow.
Any un acceptab le res p onse will
result in an error message and/ o r a repeat o f the request for
input.
FILE ZERO UTILITY
COMPLETE LY ERASES THE CONTENTS OF A DATA FILE
PASSWORD?
Enter the appropriate password.
FILE NAME?
Enter the name of the file to be zeroed.
The program continues with:
IS IT A NORMAL 12 (8 for a mini-floppy) PAGE DATA FILE?
Enter YES or NO.
If NO is entered, the following message
is output:
THEN HOW MANY PAGES PER TRACK?
Enter 1 through 12 (8 fo r a mini-floppy) to specify the number
of 25.6 byte- pages per tr a c k in the file.
The file will be ze r oed a n d the program will terminate.
-55-
05-650 V3.0 Kernel
The 05-650 V3.0 kernel contains its own cowmand interpreter
for handling those commands that are basic to the system.
These
include commands for initializing diskettes, selecting a disk
drive, transferring specific disk sectors and files, initiating
various language processors, etc.
All kernel commands are listed
in the User's Guide with brief descriptions of their function.
Those requiring further explanation are also covered below.
Accessing the Kernel
Upon initializing the system, type UNLOCK to the question
"FUNCTION?".
Then type EXIT.
The DOS kernel prompter A* then
appears and any kernel commands may be entered.
Changing I/O Distributor Flags
IO nn,mm
Changes input and output flag
IO nn
Changes input flag only
IO ,mm
Changes output flag only
This command changes I/O distributor flags to specify from
which device system input is to be taken and to which device or
devices system output is to be sent.
The values nn and mm shown
above in the command are taken from the following table:
-56-
I
nn
Input Device
mm
Output Device
~~
~l
~2
Null
Serial Port (ACIA at FC~~)
Keyboard on 440/540 Board
UART on 430 Board
Null
Memory
Disk Buffer 1
Disk Buffer 2
550 Board Serial Port
~~
~l
Null
Serial Port (ACIA at FC~0)
Video on 440/540 Board
UART on 430 Board
Line Printer
Memory
Disk Buffer 1
Disk Buffer 2
550 Board Serial Port
~4
~B
111
2~
411
B~
~2
~4
I1B
l~
211
411
B~
Note that the above values are hexidecimal numbers each of which
corresponds to the setting of one bit within the flag byte.
no bits in an I/O flag byte specifies the "null device".
Setting
Output to
I
the null device is thrown away.
undefined data.
Input from the null device yields
If more than one bit is set in the jnput flag,
input is taken from the lowest numbered device (other than null)
and the other bits are ignored.
More than one bit set in the
output flag results in output being sent to each device for which
the appropriate bit is set.
For example, the command "10 ,119"
would result in all output going to both the Serial ACIA Port
and the Line Printer.
Some of the above devices need further explanation.
Memory input is from RAM starting at the address contained
in locations 23BA (low) and 23BB (high) with an automatic incrementation of the address after each character is input.
Memory
output is to RAM starting at the address contained in locations
2391 (low) and 2392 (high) with an automatic incrementation of
the address after each character is output.
The addresses in
these locations can be changed b y the user in order to do memory
I/O to any available RAM area.
provided for this purpose.
The command MEM nnnn,mmmm is
The nnnn is a four hex digit address
-57-
for input, mf\'J1\m is an output address.
Disk buffer I / O operates similar to memory I/O described
above.
Howe v er, I / O to the disk buffers also results in automatic
disk transfers whenever a buffer (track) boundary is crossed.
In
order for this d is k I / O to pro perly take p lace, a few parameters
must be set up before performing any of the actual input/output
operations.
OPEN.)
(These parameters are set up in BASIC by the command
The parameters and their locations are:
Disk Buf!'er 1 Locations
2326 (low) , 2327 (high)
2328 ( low) , 2 3 29 (high)
232A
232B
232C
232D
Buffer start address (normally 317E)*
Buffer end a d dress +1 (normally 3D7E)*
First tr a c k o f file (BCD)
Last t r a ck o f file (BCD)
Current track in buffer (BCD)
Buffer dirty flag (0 ~ clean)
Disk Buffer 2 Locations
232E (low) , 232F (high)
2330 (low) , 2331 (high)
2332
2333
2334
2335
Buffer start address (normally 3D7E)*
Buffer end address +1 (normally 497E)*
First track of file (BCD)
Last track of file (BCD)
Current track in buffer (BCD)
Buffer dirty flag (0 ~ clean)
Locations of the current buffer addresses are:
Disk
Disk
Disk
Dis k
Buf f er 1 I nput
Buffer 2 Input
Bu ffe r 1 Output
Buffer 2 Ou t p ut
23AC
23FD
23C3
2416
( low) and
(low) and
( l ow) an d
( low) and
23AD
23FE
23CA
2416
(high)
(high)
(high)
(high)
Proper initialization of these pa rameters prior to disk I/O
includes:
- Setting the current buffer addresses to the buffer end
address +1
Sett i ng th e c ur rent track in buffer to the first track
o f file -1
After completing output to disk, the current buffer contents
may be left dirty .
(Data has been written to the buffer, but the
*Add h ex l~~ t o these addresses in mini-floppy systems.
-58-
J
disk hasn't yet been updated by transferring the buffer out to
disk.)
If this is so, as indicated by a non-zero buffer dirty
flag, the user must perform the final disk transfer.
This can
be done by reading past the end of the current buffer which will
cause a page fault and update the disk.
Transferring Disk Sectors
CALL address=track,sector
SAVE track,sector=address / page
These commands transfer a specified track, sector between
f
RAM and disk.
The address must always be four hexidecimal digits,
track must be two decimal digits and sector one decimal digit.
Pages must be one hexidecimal digit within the range I-D for
full size floppies and 1 through 8 for mini-floppies.
A qiven sector
can be referenced only if all lowered numbered secto rs exist on
the specified track.
NOTE:
.
This version of 05-650 contains more comprehensive
disk transfer error checks than
.
pre v ~ous
.
vers~ons.
As a result,
under some circumstances, error 9 will be reported when attempting
to read or write earlier version diskettes.
The 09 command should
be entered when this occurs to temporarily defeat the checks for
error 9.
The system should be reinitialized after completing the
transfer to restore error 9 checks.
Executing a Machine Code File
XQT file name
This command loads the file "file name" into the work space
at hex 3179 up (3279 up in mini-floppy systems) and transfers control
to location 317E (32 7E).
The" file name" can be either the name of
-59-
a previously defined file or a track number.
Relative location
four of the file (which loads into 3170) must contain the nupber
of tracks to be loaded.
Assembly language programs can be develo ped fo r use with
the XQT command by assembling them with an origin of 3l7E (327E)
and by entering the size of the program in tracks in location
3170 (3270) prior to saving the program on disk with the PUT
command.
Since the Assembler work space also resides at this
address, a two-step procedure must be used to create a program
I
with this origin.
1.
Assemble the program with an origin of 3l7E (327E),
but with a memory offset (set with the Assembler Mnn nn
command) that places the object code into some available
memory.
2.
Use the Extended Monitor move command to move the program
from the selected available memory area to the start of
the work space, enter the programs size in tracks then
save the program on disk with the PUT command.
For example, with available memory at hex 8000 up, yo u could use
an offset of 5000.
The program would then be placed into memory
at 8l7E up (317E + 5000).
A complete sample dialog for creatin g
such a program is shown below with user input underlined and
explanatory comments.
A*ASM
osr-b502 ASSEMBLER
COPYRIGHT 1976 BY OSI
.!LOAO file name
.M5000
.A3
• EXIT
A~EM
EM V2.0
:M317E=8l7E,1111
:@3170
3i70/dd ~2
:EXIT
A~ file name
Loads the Assembler
Loads the assembler source file
Sets memory offset
Assemble object code into memory
Exit Assembler
Enter the Extended Monitor
Moves the object code to work space
Set up size of program in tracks
e.g., 2 tracks
Exit the Extended Monitor
PUT machine language program on disk
-60-
Using Indirect Files
Often it is desirable to be able to merge two or mo re
BASIC or Assembler source files or transfer BASIC programs
between incompatible systems such as OS-65D and OS-65U.
The
Indirect File provides a mechanism for doing this.
In order to use an indirect file, you must have enou9h
RAM to hold the required program(s) in the BASIC or Asserr.blcr
work space and another copy of the program(s)
space.
The top
~f
above the work
the work space can be appropriately set up
with the Assembler Hnnnn command or the BASIC Change Utility
Program.
Then the indirect file mechanism is set up with
this address +1 by entering it into the following locations:
decimal
hex
9554
2552
Indirect file output address (high)
9368
2498
Indirect file input address (hinh)
The low part of these addresses is fixed at
~~.
Transfers to and from the indirect file are then
perfor~cd
as follows:
Dumping Source from the Work Space to an Indirect File
1.
Load the source into the BASIC or Assembler wo r k space
with the LOAD command.
2.
Output the source but type a [ afte r .typing LIST or
PRINT and before hitting the RETURN key. This turns
the indirect file output on.
3.
At the completion of the output type a 1. This ,oi 11
be echoed as 11 and will turn the indirect file output off.
Loading Source from an Indirect File to the Work Space
1.
Clear the work space by typing NEW in BASIC or INIZ,Y
-61-
.,
in the Assembler. Or, load the source file into the
work space into which the indirect file is to be merged.
2.
Type a Control-X. The indirect file data will be loaded
into the work space. When the 1 character is loaded at
the end of the file, the indirect file input will be
automatically terminated.
-62-
Kernel L'lilities
nor~al
ro r
will be
rq~ired
use, only two opera tions fro m the
K ERN~L
mode
- Initializing Diskettes and Copying Diskettes .
Initializing Di skettes
Once the kernel is entered, a new disket te can be
initialized for use by OS -65 D V3 .0 by rem ovi ng the operating
system disk and placing the diskette to be copied in the "A"
drive.
Then type
INT
The machine answers
ARE YOU SURE?
You ar.s wer
Y
After the initialization is complete, the prompter A* will reappear.
If an error message is reported during the initialization
process, the dis k ette i s prob ably b ad and should be discarded.
***************
* NOT E
*
***************
OS I mini-=loppy systems have write protect capability .
Write pr o tected diskettes have a label co vering a notch
on one si de of the disk. A write protected disk will
imrrejia tely report an error upon initialization or copying
at t. empts. S i r:lply remove the write protect label before
using.
Copying Diskettes
Diskettes can be c op ie d on d ual drive systems as f ollows:
1.
First initialize the n e w di skette as specified above.
2.
Place the
ne~lly
initialize d diskette in the "B" (or lower)
-63-
drive and the diskette . to be copied in the " A" drive .
3.
with the KERNEL mode prompter A* on the screen, ty o e
CA
~2~~=~1
CA
~2~jl'=13,1
,2 for B" floppies
or
for 5" floppies
4.
Type
5.
The disk copier will appear on the screen.
and copy from drive "A" to drive "B".
6.
Specify from track
track ~ to 76 on B"
7.
As each track is copied, its tra ck number will appear
on the screen.
B.
If an error is reported during copying , reinitialize
the B diskette and repeat the process.
If the error
persists , the new diskette is probably bad and should
not be used.
~
Select'
to 34 on mini -floppies and
floppi es.
fro~
t
NOTE:
OS-65D V3.0 can be used to initialize and copy diskettes
for all previous versions of OS-65D but not v ice versa .
In fact, the use of Version 3.0 is recommended over the
use of earlier versions for this purpose.
-64-
OS-65D Version 3.0 for the I-P
A version of OS-65D V3.0 is available for use wi th mi n ifloppies on the OSI I-P Personal Computer.
It i s identical
to that described throughout this manual with the followin g
e"xceptions:
- the device 4 line printer driver is not included
- the device 3 UART input / output drivers are not
included
- only the 440 style video is supported (.24 character
display) ~s appro p riate to the I-P d i splay
- the device 1 serial ACIA port address i s changed to
F~~~ as appropriate to the I-P
-65-
I-P pico DOS
A version of OS-65D V3.0 is available as a "Pico-DOS" for
use with mini-floppies on the OSI I-P Personal Computer.
This
system extends the 6-Digit BASIC LOAD and SAVE commands to permit
files to be saved on a diskette as well as on the usual cassette.
In order to use the pico DOS, insert a Pico DOS diskette
into the A mini-floppy drive and type a D in response to the
D/C/ W/M?j message.
The Pico DOS will boot up with
. ~he
following
message:
MINI-65D3 Vl.O
MEMORY SIZE? 8955
TERMINAL WIDTH?
Note that the memory size has automatically beer. specified.
This is because the Pico DOS occupies memory above this point.
Continue with the initialization by entering terminal width
as usual.
The new commands available under the Pico DOS are:
LOAD n
SAVE n
where n is a program, number I through 8.
-66-
USER/S GUIDE
08-650 V3. 0
DISK OPERATING SYSTEM
C:OMI"1ANDS
---------------ASM
LOAD THE ASSEMBLER AND EXTENDED MONITOR.
TRANSFER CONTROL TO THE RSSEMBLER .
BASIC
LOAD BASIC AND TRANSFER CONTROL TO
CALL NNNN=TT. S
LOAD CONTENTS OF TRACK, "TT" SECTOR .
TO M~MORY LOCATION "NNNN" .
D9
DISABLE ERROR 9 .
THIS IS REQUI RED TO READ SOME
EARLIER VERSION FILES (Vi . 5 , V2 . 0) .
PLEASE
REFER TO COMPATABLITY DISCUSSION LATER .
DIR NN
PRINT SECTOR MAP DIRECTORY OF TRACK "NN" .
EM
LOAD THE ASSEMBLER AND EXTENDED MONITOR.
TRANSFER CONTROL TO THE EXTENDED MONITOR.
EXAM NNNNaTT
EXAMINE TRACK .
LOAD ENTIRE TRACK CONTENTS,
INCLUDING FORMATTING INFORMATION, INTO LOCATION
"NNNN".
GO NNNN
TRANSFER CONTROL (GO) TO LOCATION "NNNN" .
HOME
RESET TRACK COUNT TO ZERO AND HOME THE CURRENT
DRIVE'S HEAD TO TRACK ZERO.
INIT
INITIALIZE THE ENTIRE DISK.
IE. ERASE THE
ENTIRE DISKETTE (EXCEPT TRACK 0) AND WRITE
NEW FORMATTING INFORMATION ON EACH TRACK.
INIT TT
SAME AS "I NIT",
IO NN,MM
CHANGE S THE INPUT I/O DISTRIBUTOR FLAG TO "NN",
AND THE OUTPUT FLAG TO "MM" .
IO .MM
CHANGES ONLY THE OUTPUT FLAG .
IO NN
CHANGES ONLY THE INPUT FLAG.
LOAD FILNAM
LOADS NAMED SOURCE FILE.
LOAD TT
LOADS SOURCE FILE INTO MEMORY GIVEN STAR TING
TRACK NUMBER "TT" .
~lEM
NNNN. MMMM
~1 .
"S"
BUT ONLY OPERATES ON TRACK "TT".
"FILNAW INTO MEMORY.
SETS THE MEMORY I/O DEVICE INPUT POINTER TO
"NNNN". AND THE OUTPUT POINTER TO "MMMM".
-1-
PUT FILNAM
SAVES SOURCE FILE IN MEMORY ON THE NAMED DISK
FILE "FILNAM" .
PUT TT
SAVES SOURCE FILE IN MEMORY ON TRACK "TT" AND
FOLLOWING TRACKS .
RET ASM
RESTART THE ASSEMBLER.
RET BAS
RESTART BASIC .
. RET
RESTART THE EXTENDED MONITOR .
E~l
RESTART THE PROM MONITOR (V IA RST VECTOR) .
RET MON
SAVE TT.S-NNNN/P SAVE MEMORY FROM LOCATION "NNNN" ON TRACK "TT"
SECTOR "S" FOR "P" PAGES.
SELECT X
SELECT DISK DRIVE, "X" WHERE "X" CAN BE;
A. B. C. OR D.
SELECT ENABLES THE REQUESTED
DRIVE AND HOMES THE HEAD TO TRACK 0 .
XQT FILNAM
LOAD THE FILE. "FILNAM" AS IF IT WAS A SOURCE
FILE. AND TRANSFER CONTRO L TO LOCATION $317E.
NOTE :
- ONLY THE FIRST 2 CHARACTERS ARE USED IN RECOGNIZING A
COMMAND.
THE REST UP TO THE BLANK ARE IGNORED.
- THE LINE INPUT BUFFER CAN ONLY HOLD 18 CHARACTERS INCLUDING
TI-IE RETURN.
- lHE COMMAND LOOP CAN BE REENTERED AT $2A51 .
- FILE NAMES MUST START WITH A "A"
E CHARACTERS LONG.
TO "Z"
AND CAN BE ONLY
- THE DICTIONARY IS ALWAYS MAINTAINED ON DISK .
THE INTERCHANGE OF DISKETTES.
.. THE FOLLOWING
CONTROL CONTROL CONTROL BACK ARROW
ERROR
THIS PERMITS
CONTROL KEYS ARE VALID :
Q
CONTINUE OUTPUT FRO M A CON TROL-S o
S
STOP OUTPUT TO THE CONSOLE .
U
DELETE ENTIRE LINE AS INPUT.
DELETE THE LAST CHARACTER TYPED.
NUMBERS
1 - CAN'T READ SECT OR (PARITY ERROR ) .
2 - CAN'T WRITE SECTOR (R EREAD ERROR) .
3 - TRACK ZERO IS WRI TE PROTECTED AGAINST THAT OPERATION .
4 - DISKETTE IS WRITE PROTECTED.
5 - SEEK ERROR (TRACK HEADER DOESN ' T MATCH TRACK) .
-2-
6 - DRIVE NOT READY .
7 - SYNTAX ERROR IN COMMAND LINE .
8 - BAD TRACK NUMBER.
9 - CAN ' T FIND TRAC K HEADER WITHIN ONE RE V OF DISKETTE
A - CAN ' T FIND SECTOR BEFORE ONE REQUESTED .
B - BAD SECTOR LENGTH VALUE .
C - CAN'T FIND THAT NAME IN DIRECTORY.
D - READ/WRITE ATTEMPTED PAST END OF NAMED FILE!
f
TRANSIENT
UTILITIES
BEXEC+ - PROGRAM WHICH GAINS CONTROL ON BOOT IN END USER SYSTEMS.
CHANGE - PERMITS ADJUSTMENT OF THE FOLLOWING!
- TERMINAL WIDTH FOR BASIC.
- THE HIGHEST PAGE OF MEMORY AVAILABLE. WHICH
IS WHAT BASIC AND ASM USE WHEN LOADED .
- THE ADJUSTMENT OF THE WORKSPACE LIMITS FOR
BASIC.
THE RESULT IS A EMPTY WORKSPACE TO
THE USER SPECIFICATIONS.
CREATE - ENTER A FILE NAME INTO THE DIRECTORY.
THE CREATED FILE ON DISK .
AND ZERO OUT
DELETE - REMOVE A FILE NAME FROM DIRECTORY.
DIR
- PRINT UNSORTED DISK DIRECTORY.
DIRSRT - PRINT SORTED <BY NAME OR TRACK ) DIRECTORY.
RANLST - GENERAL RANDOM ACCESS FILE LIST UTILITY.
RENAME - RENAME A FILE NAME IN DIRECTORY .
SECDIR - PRINT A SECTOR MAP DIRECTORY OF DISK .
SEQLST - GENERAL SEQUENTIAL FILE LIST UTILITY.
TRACE
- ENABLE OR DISABLE STATEMENT NUMBER TRACE FEATURE .
ZERO
- INITIALIZE CONTE NTS OF A DATA FILE TO ZEROS.
-3-·
FLAG
I~O
BIT
SETTINGS
INPUT:
BIT
BIT
BIT
BIT
BIT
BIT
BIT
BIT
0
1
2
3
4
5
6
7
-
ACIA ON CPU BOARD (TERMINAL) .
KEYBOARD ON 440/540 BOARD .
UART ON 430 BOARD (TERMINAL).
NULL.
MEMORY INPUT ( AUTO INCREMENTING).
MEMORY BUFFERED DISK INPUT.
MEMORY BU FFE RED DISK INPUT .
550 BOARD ACIA INPUT.
AS SELECTED BY "AINDEX"
AT LOCATION $23 23 ( 8995 DECIMAL) .
-
ACIA ON CPU BOARD (T ER MI NAL ).
VIDEO OUTPUT ON 440 /540 BOAR D.
UART ON 430 BOAR ( TERMI NAL).
LINE PRINTER INTERFACE .
MEMORY OUTPUT CAUTO INCREMENTING) .
MEMORY BUFFERED DISK OUTPUT .
MEMORY BUFFERED DI SK OUTPUT .
550 BOARD ACIA OUTPUT.
AS SELECTED BY "AINDEX"
OUTPUT:
BIT
BIT
BIT
BIT
BIT
BIT
BIT
BIT
0
1
2
3
4
5
6
7
SOURCE
FILE
RELATIVE DISK ADDRESS
FOR MAT
MEMOR', ADDRESS
$3179
$317A
$3178
$317C
$317D
$317E AND ON ...
0
1
2
3
4
5 AND ON .. .
DIF.:ECTORY
USAGE
SOURCE
SOURCE
SOURCE
SOURCE
NUMBER
SOURCE
START ( LOW)
START (HIGH)
END CLOW)
END CHI>
OF TRACKS REQ .
TEXT.
FORMAT
TWO SECTORS (1 AND 2) ON TRAC K 8 HOLD THE DIRECTORY.
REQUIRES 8 BYTES.
THUS THERE ARE A TOTAL OF 64 ENTRIES
TWO SECTORS.
THE ENTR I ES ARE FORMATTE D AS FOLLOWS:
0-5
6
7
ASCII 6 CHARACTER NAME OF FILE.
BCD FIRST TRACK OF FILE .
BCD LAST TRACK OF FILE (INCLUDED IN FILE) .
-4-
EACH ENTRY
BETWEEN THE
MEMORY
ALLOCATION
0000 - 22FF
BASIC OP ASSEMB LER / EXTENDED MONITOR .
2200 -
22FE
COLD ST RRT INITI ALIZATION ON BOOT.
2300 -
2658
INPUT / OUT PUT HANDLERS.
265C - 2A4A
FLOPPY DISK DRIVERS.
2A4B - 2E78
OS-65D V3 . 0 OPERATING SYSTEM KERNEL .
2E79 - 2F78
DIRECTORY BUFFER .
2F79 - 3178
PAGE 0/1 SWAP BUFFER.
3179 - 317P
SOURCE FILE HEADER.
317E -
SOURC~ FILE .
DISKETTE
ALLOCATION
o
OS-65D V3 . 0 ( BOOTSTRAP FORMAT LOADS TO 2200 FOR 8 PAGES ) .
1
SECTOR 1
REMAINDER OF OS-65D V3 . 0 (LOADS TO 2AOO FOR
5 PAGES) .
SECTOR 2 - TRACK ZERO READ/WRiTE UTILITY AND COPIER .
CLOADS TO 0200 FOR 5 PAGES) .
2 - 4
9 DIGIT MICROSOFT 6502 BASIC.
5 - 6
6502 RESIDENT ASSEMBLER/EDITOR.
7
EXTENDED MONITOR .
8
SECTOR 1 - FIRST PAGE OF DIRECTORY .
SECTOR 2 - SECONP PAGE OF DIRECTORY.
SECTOR ~ - OVERL AY PAGE FOR 3 DIGIT BASIC.
SECTOR 4 - PUT/GET OVERLAY FOR 3 DIGIT BASIC.
9 - 76
USER PROGRAMS AND OS-65D UTILITY BASIC PROGRAMS.
9
DIGIT
BASI C
EXTENT IONS
INPUT PNDSGN<DEVICE NUMBER ) .
(INPUT IS SET TO NEW DEVICE.
OUTPUT IS SET TO NULL DEVICE
IF DEVICE NUMBER> 3 • . AND
NULL INPUTS ARE IGNORED IF
DEvICE NUMBER > 3. )
-5-
INPUT "TEXT";PNDSGN <DEVICE NUMBER>. ( PRINT " TEXT" AT CURRENT
OUTPUT DEVICE, THEN FUNCTION
AS ABOVE)
PRINT PNDSGN<DEVICE NUMBER>.
(PRINT OUTPUT FOR THIS COMMAND
AT NEW DEVICE)
LIST PNDSGN<DEVICE NUMBER >,
(LIST PROGRAM OR SEGMENTS OF
PROGRAM TO NEW DEVICE)
WHERE <DEI/ICE NUMBER> FOR OUTPUT IS :
1. -
2
3
4
5
6
-.
J
7 8 9 -
ACIA TERMINAL
4413/5413 VIDEO TERMINAL
4313 UART PORT
LINE PRINTER
MEMORY OUTPUT
MEMORY BUFFERED DISK OUTPUT (BIT 5 )
MEMORY BUFFERED DISK OUTPUT (BIT 6 )
5513 ACIA OUTPUT
NULL OUTPUT
<DEVICE NUMBER> FOR INPUT IS :
1
2
3
4
5
6
7
8
9
-
ACIA TERMINAL
4413/540 KEYBOARD
4313 UART PORT
NULL DEVICE
MEMORY INPUT
MEMORY BUFFERED DISK INPUT CBIT 5)
MEMORY BUFFERED DISK INPUT CBIT 6)
550 ACIA INPUT
NULL INPUT
AND WHERE PNDSGN IS A POUND SIGN .
EXIT
EXIT TO OS-65D V3. 13
RUN <STRING>
LOAD AND RUN FILE WITH NAME IN
<STRING>.
DISK ! (STRING)
SEND <STRING> TO OS-65D V3. 13 AS A
COMMAND LINE.
DISK OPEN,(DEVICE>.(STRING) OPEN SEQUENTIAL ACCESS DISK FILE
WITH FILE NAME. (STRING>. USING
MEMORY BUFFERED DISK 1/0 DISTRIBUTOR
DEVICE NUMBER 6 OR 7. READS
FIRST TRACK OF FILE TO MEMORY AND SETS
UP THE MEMORY POINTERS TO START
OF
BUFFER.
DISK CLOSE. (DEVICE)
FORCES A DISK WRITE OF THE CURRENT
BUFFER CONTENTS TO CURRENT TRACK.
DISK GET. <RECORD NUMBER)
USING LAST FILE OPENED ON THE LUN
6 DEVICE. A CALCULATED TRACK IS READ
INTO MEMORY. WHERE THAT TRACK IS:
INT«REC. NUM. )/24)+BASE TRACK GIVEN
IN LAST OPEN COMMAND
-6-
IT ALSO SETS BOTH MEMOR¥ POINTERS TO :
129'" «REC. NUM. >-INT «REC. NUM. ),"24 ))
+BASE BUFFER ADDRESS FOR LUN 6 DEVICE .
DI SK PUT
E N D
WRITE DEVICE 6 BUFFER OUT TO DISK .
THE EFFECT IS THE SAME AS A
" DISK CLOSE.· 6" .
USER
POKES
TO
BASIC
OLD
NE~J
FUNCTION
2972
2 976
58
44
13
13
DISABLE
2 073
173
96
IGNORE CONTROL-C
2 893
2994
55
0S
28
11
DISABLE BREAK ON NULL INPUT.
"REDO FROM START"
7 41
750
76
7S
10
10
REMOVE KE¥WORDS,
LOCATI ON
OTH ER
LO CAT ION
23
POKES
TO
, AND : TERMINATORS ON STRING INPUT
"NEW" AN[> "LIST"
BASIC
FUNCTION
TERMINAL WIDTH
2889, 9722 IF BOTH ARE 0 A NULL INPUT TO A "INPUT" STATEMENT
¥IELDS AN EMPT¥ STRING OR A 0 .
IF BOTH ARE 27 THEN
THE INPUT STATEMENT FUNCTIONS AS NORMAL .
8917
USR(X) DISK OPERATION CODE:
o - WRITE TO DRIVE A
3 - READ FROM DRIVE A
6 - WRITE TO DRIVE B
9 - READ FROM DRIVE B
9826
TRACK NUMBER FOR USR(X) DISK OPERATION
9922
SECTOR NUMBER FOR USR(X) DISK OPERATION
9823
PAGE COUNT FOR US R(X) DISK WRITE, OR
NUMBER OF PAGES READ IN BY DISK READ
9 82 4
LOW BYTE OF ADDRESS OF MEMORY BLOCK FOR USR(X)
DISK OPERATION
9 925
HIGH B'rrE OF ADDRESS OF MEMORY BLOCK FOR
USR(X) DISK OPERATION
-7-
8954
LOCATION OF JSR TO A USR FUNCTION.
PRESET TO
JSR $22D4.
IE. SET UP FOR USR ( X) DISK OPERATION
8993
I/O DISTRIBUTOR INPUT FLAG
8994
I/O DISTRIBUTOR OUTPUT FLAG
8995
INDE X TO CURRENT ACIA ON 550 BOAR D.
IF NUMBERED
FROM 0 TO ~5 THE VALUE PO KED HERE IS 2 TIMES THE
ACIA NUMBE R.
8996
LOCATION OF A RANDOM NUMBER SEED.
THIS LOCATION
IS CONSTANTL Y I NCREMENTED DURING KEYBOARD POLLING
8960
HAS PAGE NUMBER OF HIGHEST RAM LOCATION FOUND ON
OS-65D
' S COLD START BOOT IN.
THIS IS THE DEfAULT
.
,
HIDH MEMORY ADDRESS FO R THE ASSEMBLER AND BASIC
9098
9099
LOW BYTE ADDRESS FOR MEMORY I NPUT
HIGH BYTE ~DDRESS FOR MEMORY INPUT
9~05
LOW BYTE ADDRESS FOR MEMOR Y OU TPUT
BYTE ADDRESS FOR MEMORY OUTPUT
9~06
~IGH
9~32
LOW BYTE ADDRESS FOR MEMORY BUFFERED DISK INPUT
HIGH BYTE ADDRESS FOR MEMORY BUFFERED DISK INPUT
BIT 5 DEVICE. DEFAULTS TO $ 3~7E .
9~33
9~55
9~56
92~3
92~4
LOW BYTE ADDRE SS FOR MEMORY BUFFERED DISK OUTPUT
HIGH BYTE ADDRESS FOR MEMORY BUFFERED DISK OUTPUT
BIT 5 DEVICE. DEFAULTS TO $ 3~7E .
LOW BYTE ADDRESS FOR MEMORY BUFFERED DISK INPUT
HIGH BYTE ADDRESS FOR MEMORY BUFFERED DISK INPUT
BIT 6 DEVICE . DEFAULTS TO $3D7E .
9238
9239
LOW BYTE ADDRESS FOR MEMORY BUFF ER ED DISK OUTPUT
HIGH BYTE ADDRESS FOR MEMORY BUFFERED DISK OUTPUT
BIT 6 DEVICE . DEFAULTS TO $ 3D7E .
8998
MEMORY BUFFERED
899B-B999 9000-900~ 9002
9003
900 4
9005
-
DIS K I/O BIT 5 DEVICE PARAMETERS :
BUFFER STA RT ADDRESS ( $3~7E)
BUFFER END ADDRESS ( $3D7E)
FIRST TRAC K OF FILE
LAST TRACK OF FILE
CURRENT TRACK IN BUFFER
DIRTY BUFFER FLAG ( 0=CLEAN)
9006
MEMO RY BUFFERED
9006-900 7 9008-90 09 90~ 0
9 0 ~~
9 0 ~2
9 0 ~3
-
DI SK I/O BIT 6 DEVICE PARAMETERS:
BUFFER START ADDRESS ($3D7E)
BUFFER END ADDRESS ($497E)
FIRST TRACK OF FILE
LAST TRACK OF FILE
CURRENT TRACK IN BUFFER
DIRTY BUFFER FLAG ( 0=CLEAN)
~2042
LOCATIO N OF THE 24 USED BY THE RANDOM ACCESS FILE
CALCULATION ROUTINES.
THIS LOCATION SHOULD ONLY
BE ALTE RED AFTER THE OPEN HAS OCCURRED FOR THE
RANDOM ACCESS FILE BECAUSE THE PUT GET CODE IS LOAD-8-
ED INTO THE DIRECT ORY BUFFER.
THIS IS WHERE THIS
24 RESIDES.
MRKING IT A 48 GIVES ONE 64 BYTE RECORD S .
9368
HIGH BYTE ADDRESS FOR INDIRECT FILE INPUT CLOW=00 )
9554
HIGH BYTE ADDRESS FOR INDIRECT FILE OUTPUT (LOW=08 )
EXTENTIO NS
TO
ASS EMBLER
E
EXIT TO OS-6SD V3 . 0 .
H<HEX NUM::>
SET HIGH MEMORY LIMIT TO <HEX NUM::> .
M<HEX NUM>
SET MEMORY OFFSET FOR A3 ASSEMBLY TO <HEX NUM::> .
!<CMD LINE::>
SEND <I1MO LINE::> TO OS-6S0 V3. e AS A CO~lMANO TO
BE EXECUTED AND THEN RETURN TO ASSEMBLER.
CONROL-I
TAB 8 SPACES.
ALSO:
CONTROL-U
CONTROL-Y
CONTROL-T
CONTROL-R
CONTROL-E
CONROL-C
7 SPACES.
6 SPACES.
5 SPACES .
4 SPACES.
3 SPACES.
ABORT CURRENT OPERATION
EXTENDED
MONITOR
'TEXT
SENT "TEXT"
@NNNN
OPEN MEMORY LOCATION "NNNN" FOR EXAMINATION .
SUBCOMMANOS :
LF - OPEN NEXT LOCATION.
CR - CLOSE LOCATION.
DO - PLACE "DO" INTO LOCATION .
" - PRINT ASCII VALUE OF LOCATION.
/
- REOPEN LOCATION.
UPARROW - OPEN PREVIOUS LOCATION .
A
PRINT AC FROM BREAKPOINT.
BN, LLLL
PLACE BREAKPOINT "N" (1.-8) AT LOCATION,
C
CONTINUE FROM LAST BREAKPOINT .
DNNNN . MMMM
DUMP MEMO RY FROM "NNNN"
EN
ELIMINAT E BR EAKPOINT "N" .
EXIT
EXIT TO 05-65D V3 . 0 .
FNNNN,
MM~lM=D[)
TO OS-6SD V3. 0 AS A COMMAND.
FILL MEMORY FROM "NNNN"
-9-
"LLLL" .
TO "MMMM" .
TO "MMMM"-1. WITH "DO" .
TRANSFER CONTROL TO LOCATION "NNNN"
GNNNN
H
tm N n. t·,~1t.1t-1( 0 F' >
HE XD ECIMAL CALCULATOR PRINTS RESULT OF
"NNNN"COP>"MMMM" WHERE COP > IS + - • /
8REAK~OINT
I
PRINT BREAK INFORMATION FOR LAST
v
PRINT S TA CK POINTER FROM BREA KPDTNT
L
LOAD MEMOR Y FROM CASS ETTE .
MNNNN=MMMM . LLLL MOVE MEMORY BLOCK "MMMM"
"NNNN" AND UP IN MEMORY
NHEX ) NNNN , MMMM
TO "LI.LL·'-l TO LOCAT ION
SEARCH FOR STRING OF BYTES "HE X" ( 1-4) BETWEEN
MEt10R',' LO CATION "NNNN" ArW "mmt·'"-· J .
o
PRINT/OVERFLOW / REMAINDER FROM HEX CAI.CULATOR .
P
PRINT PROCESSOR STATUS WORD FROM BREAKPOINT .
QNN~m
DISAS SEMBLE 23 LINES FROM LOCATION "NNNN"
A LINEFEED CONTINUES DISASSEMBLY FOR 23 MORE
RMMMM=NNNN.LLLL RELOCATE "NNNN"
SMMMM ..
NNW~
TO "LLLL"-1 TO LOCATION "MMMM".
SAVE MEMORY BLOCK .
"MMM~"
T
PRINT BREAKPOINT TABLE .
'./
VIEW CONTENTS OF CASSETTE .
TO "NNNN"-1 ON CASSETTE .
WTEXT>MMMM ,N NNN SEARCH FOR ASCII STRING "TEXT"
AND "NNNN"-1 .
BETWEEN "MMMM"
x
PRINT X
y
PRINT Y INDEX REGISTER FROM LAST BREAK .
INDE~
AN ~
REGISTER FROM LAST BREAK
NOTE : ALL COMMANDS ARE LINE BUFFERED BY 05-65D .
THUS ONLY 18 CHARACTERS PE R LINE ARE ALLOWED
AND CONTROL-U AND BACKARROW APPLY .
DISKETTE
COPIER
THE DISKETTE COPY UTILITY IS FOUND ON TRACK 1
SHOULD BE LOADED INTO LOCATION 200 WITH A "CA 0200=01 .
TYPE. "GO 02e0" .
TO SELECT THE COPIER TYPE A "1"
AUTOMATICALLY FOR MA TS THE DESTINATION DISKETTE BEFORE
:-1.0 :c _
SECTOR 2 .
IT
2" .
TO START IT
.
THE COPIER
WRITING ON IT
TRACK
0
READ/WRITE
UTILITY
---------------------------------------------------THIS UTILITY PERMITS THE READING OF DATA ON TRACK e ANYWHER5
INTO MEMORY. ALSO THE CAPABLITY IS AVAILABLE TO WRITE ANY BLOCK OP
MEMORY TO TRACK 0 SPECIFYING A LOAD ADDRESS AND PAGE COUNT.
THE TRACK ZERO FORMAT IS AS FOLLOWS :
- 1 MILLISECOND DELAY AFTER THE INDEX HOLE.
- THE LOAD ADDRESS OF THE TRACK IN HIGH-LOW FORM.
- THE PAGE COUNT OF HOW MUCH DATA IS ON TRACK ZERO.
TRACK
FORMATTING
-------------------------------THE REMAOCNING TRACKS ARE FORMATTED AS FOLLOWS :
- 1 M~LISECOND DELAY AFTER THE INDEX HOLE.
- A 2 BYTE TRACK START CODE, $43 $57.
- BCD TRACK NUMBER.
- A TRACK TYPE CODE, ALWAYS A $58.
THERE CAN BE ANY MIXTURE OF VARIOUS LENGTH SECTORS HEREAFTER.
THE TOTAL PAGE COUNT CAN NOT EXCEED 12 PAGES IF MORE THAN ONE SECTOR
IS ON ANY GIVEN TRACK.
13 PAGES CAN BE PLACED ON A TRACK IF ONLY ONE
SECTOR RESIDES ON A TRACK. EACH SECTOR IS WRITTEN IN THE FOLLOWING
FORMAT:
- PREVIOUS SECTOR LENGTH (4 IF NONE BEFORE) TIMES
800 MICROSECONDS OF DELAY.
- SECTOR START CODE, $76.
- SECTOR NUMBER IN BINARY.
- SECTOR LENGTH IN BINARY.
- SECTOR DATA.
COMPATABILITY
WITH
EARLIER
OS-65DS
-------------------------------------------------------------------THE EARLIER VERSIONS OF OS-65D (IE. EARLIER THAN 3. 0) HAD A
QUIRK OF . OPERATION. WHEN THEY ATTEMPTED TO DO A READ THE HEAD WAS
LOADED AND THE ACIA. INITIALIZED AT THE RISING EDGE OF THE INDEX HOLE.
SINCE THE EARLIER 6~D'S FORMAT INCLUDED NO GAP AFTER THE INDEX ' HOLE,
THE ACIA MAY BE INITIALIZED IN THE MIDDLE OF A BYTE. THIS WOULD SET
THE ACIA OUT OF SYNC WITH THE DATA.
IT WOULD THEN TAKE SEVERAL
REVOLUTIONS OF THE DISKETTE BEFORE THE ACIA GOT BACK IN SYNC AND THE
TRACK HEADER FOUND. FOR THIS REASON THERE MAY BE PROBLEMS IN READING
EARLIER VERSION FILES. THE ERROR ENCOUNTERED IS ERROR 9. THIS ERROR
INDICATES THAT THE TRACK HEADER WAS NOT FOUND IN ONE REVOLUTION.
SO
THAT EARLIER VERSION FILES CAN BE COPIED OVER TO THE NEW SYSTEM, THE
D9 COMMAND IS AVAILABLE. IT PREVENTS THE ERROR 9 ERROR CHECKING.
-11-