CGC_7900_Preliminary_DOS_Manual_Jul1981 CGC 7900 Preliminary DOS Manual Jul1981

CGC_7900_Preliminary_DOS_Manual_Jul1981 CGC_7900_Preliminary_DOS_Manual_Jul1981

User Manual: CGC_7900_Preliminary_DOS_Manual_Jul1981

Open the PDF directly: View PDF PDF.
Page Count: 212

DownloadCGC_7900_Preliminary_DOS_Manual_Jul1981 CGC 7900 Preliminary DOS Manual Jul1981
Open PDF In BrowserView PDF
CHROMATICS
'.

CGC 7900 COLOR GRAPHICS COMPUTER SYSTEM
PRELIMINARY DOS MANUAL
(with Assembler and Text Editor)
July, 1981

Copyright (C) 1981 by Chromatics, Inc.
2558 Mountain Industrial Boulevard
Tucker, Georgia 30084
Phone (404) 493-7000
TWX 810-766-8099

This document is an advance release, provided for
informational purposes
only.
The
specifications
contained herein are subject to. revsion prior to
shipment of the product.

PUBLICATION COMMENT FORM
~ase use this
sheet to give us feedback on the enclosed
:umentation. Your comments on errors or omissions, suggested
anges, format of presentation, etc., will be helpful .in
eparing future manuals. Wherever possible, refer to specific
ge numbers in your comments below.
After completing this
rm, mail to:

Chromatics, Inc.
2558 Mountain Industrial Boulevard
Tucker, GA 30084
Attn:

R&D Department

Name:

Date: ____________

Company Name:
Name/Model Number of Product: ___________________________
Title of Publication:
Preliminary?_____

Date of Publication Release:
Page No.

Comments

CONVENTIONS USED IN THIS DOCUMENT
1. Any keys which have labeled caps will be called by their
full names, capitalized and underlined.
For example,
the
carriage return key will be denoted by
RETURN
2. The modifier keys, ~, SHIFT, Mi, and HZ, must be held
down while striking the key they are to modify. Note that these
four keys do not generate any characters on their own, but
simply modify the character which is struck simultaneously.
This process of holding down a modifier key while striking
another key will be denoted by the modifier AND the key being
underlined together. For example,
CTRL F

would indicate that the ~ key should be held down while
striking the· F key.
If two or more modifiers are needed
simultaneously, they will all be underlined together:
CTRL SHIFT T
mean that BOTH modifiers, SHIFT
30wn while striking the T key.

~ould

and~,

should

be

held

Variable parameters will be enclosed in angle brackets, < >.
items enclosed in th~se brackets will be explained in full
In the text which immediately follows.

5.

~y

Optional parameters will be enclosed in square brackets [ ].
items which may be repeated will be followed by an ellipsis
:three dots).

l.

~y

:xample of (3) and (4):
, [,, ••• ]
'he parameter  is required. The parameters , , and
:0 on, are optional.
Any number of these may be included.
All
,hree types of parametOers would be explained immediately beneath
,he example which contained them •
•

Zeros will be slashed (8), alphabetic 0 will not be slashed.

TABLE OF CONTENTS
SECTION 1 - THE DISK OPERATING SYSTEM
INTRODUCTION
DISKETTES
ENTRY INTO DOS
DOS COMMAND LINE
DISK FILE NAMES
DISK DRIVE NUMBERS
SECONDARY FILE NAMES
FILE NAME PATTERNS
TRANSIENTS
DIR
COPY
FORMAT
INITIALIZING A NEW DISKETTE
RENAME
KILL
COMPRESS
DELETE
BUFF
DRAW
APPEND
PICTURE
REFRESH
IMPLODE
EXPLODE
STORE
FETCH
DEBUG
VERSION
SUMS

XREF
DOS ERROR MESSAGES
SECTION 2 - THE EDITOR

1- 1

1- 3

1- 4

1- 7

1- 9

1- 19

1- 13
1- 14
1- 15
1- 17

1111-

18
23
27
29

1- 39
1- 33
1- 35
1- 37
1- 39

1- 49
1- 41
1- 42
1- 44
1- 45
1- 46
1- 47
1- 49
1- 59
1- 51
1- 52
1- 53
1- 55

2- 1

INTRODUCTION TO THE EDITOR
INLINE

2- 3
2- 5

EDITOR COMMANDS
OPEN
GET
LIST
PRINT
INSERT
MODIFY
DELETE
FIND
SUBSTITUTE
LAST

2- 7

2- 8
2- 9
2- 19

2222-

11
12
14
16

2- 17

2- 18
2- 29

PUT
CLOSE
PAGE
DRIVB
EXI'!'

,

ABOR~

SECTION 3 - THE ASSEMBLER

.

222222-

21
22
23
24
25
26

3- 1

INTRODUCTION TO THE ASSEMBLER
ASSEMBLER COMMAND LINE

3- 3
3- 4

SOURCE FIL.E FORMAT
LABELS
INSTRUCTIONS
OPERANDS
COMMENTS

33333-

7
8
9
18
11

INSTRUCTION EXAMPLES
ARITHMETIC'
COMPARE
LOGICAL
SHIFT AND ROTATE
BIT OPERATIONS
EFFECTIVE ADDRESS
MOVE DATA
MOVE MULTIPLE
BRANCH, JUMP
DECREMENT AND BRANCH
SET
SYSTEM CONTROL

3333333333333-

13
14
15
16
16
17
17
18
19
28
22
23
24

INSTRUCTION TYPES

3- 25

EXPRESSIONS

3- 27

PSEUDO-INSTRUCTIONS
ORG (ORIGIN)
EQO (EQUATE)
SET
DC (DEFINE CONSTANT)
DS (DEFINE STORAGE)

3- 29
3- 38
3- 31
3- 32
3- 33
3-35
3- 36
3- 37
3- 37
3- 38
3- 38

END

PAGE
LLEN
NOLST
LIST
ADDRESSING MODES
REGISTER DIRECT
ADDRESS REGISTER INDIRECT
ADDRESS REGISTER INDIRECT/POST INCREMENT

3333-

39
39
4-8
48

ADDRESS REGISTER INDIRECT/PREDECREMENT
ADDRESS REGISTER INDIRECT/DISPLACEMENT
ADDRESS REGISTER INDIRECT WITH INDEX
ABSOLUTE SHORT
ABSOLUTE LONG
PC WITH DISPLACEMENT
PC WITH INDEX
IMMEDIATE
ASSEMBLY ERRORS
APPENDIX A - PROGRAMMING THE CGC 7999

33333333-

41
41
42
43
43
44
45
46

3- 47
A- 1

MODULES
THE LINKING PROCESS
MODULE CONSTRUCTION
BOOT MODULES
INPUT/OUTPUT MODULES
ARGUMENT PARSING
MODE MODULES
PLOT MODULES
ESCAPE AND USER MODULES
REGISTER SETUP FOR MODULES

AAAAAAAAAA-

4
6
7
8
9

WINDOW TABLE
WINDOW STATUS AND ESCAPE CODE STATUS

A- 21
A- 24

JUMP TABLES
PLOTTING FUNCTIONS
DOS JUMP TABLES
INLINE CALLING SEQUENCE

AAAA-

CMOS MEMORY ALLOCATION
LOW RAM ALLOCATION
THE USER FILE TABLE

A- 43
A- 45
A- 47

WRITING TRANSIENTS

A- 49

CUSTOM CHARACTER SETS

A- 57

INSTALLING A NEW CURSOR

A- 61

DOS ERROR MESSAGES

A- 65

II

12
15
18
29

25
32
37
42

CGC 79l:HJ

Preliminary DOS Manual

,-

SECTION 1 - THE DISK OPERATING SYSTEM

Page 1-1

CGC 7999

Preliminary DOS Manual

Page 1-2

Preliminary DOS Manual

:GC 7900

Page 1-3

INTRODUCTION
rhis is the manual for the Chromatics CGC 7900 Disk Operating
;ystem (DOS), an optional feature of the 7900 series of color
~raphic
computers.
The Disk
Operating
System
uses
two
jouble-density flexible disk drives for program
and
datastorage. A fixed disk drive with 10 megabytes of storage is
also available. The DOS option consists of these parts:
Disk drives
PROMs (firmware)
A diskette with system programs
This manual
The disk drives and PROMs are factory-installed, and should
require no attention by you· (except that the fixed disk may
require special unpacking; instructions for this· ·are attached to
your unit if applicable).
The diskette contains programs which provide an
interface
between the disk drives and your programs or data. Routines are
provided to save data onto a disk, to retrieve data from a disk,
and to manipulate the contents of the disks.
This diskette
should be handled carefully as you are learning to use the DOS.
You should make a copy of this diskette at your earliest
opportunity. Instructions for copying a diskette are included
in this manual (see the FORMAT. and COpy commands).
This manual begins by describing the commands and utility
routines available in DOS. In later sections, the Text Editor
and MC68000 Resident Assembler are discussed.
These
two
programs allow you to create text files and assembly language
programs on the disk, and to generate executable binary machine
code for the 68000 processor.
Detailed descriptions of the CGC 7900 special features, such as
the color graphics plotting capability, are not provided here.
Please refer to your User's Manual for information on other
aspects of the CGC 7900.

CGC 7908

Preliminary DOS Manual

Page 1-4

DISKETTES
DOS stores information on the surface of disks, which are coated
with a magnetic material.
Flexible diskettes, or
-floppy
disks,- area very reliable and convenient way to store data.
A
flexible disk will perform well for many hours of use, if a few
simple precautions are observed:
HANDLING - DO NOT touch the exposed surface
which is visible through a slot on either side
DO NOT attempt to remove the circular diskette
dark envelope. Handle the diskette carefully,
it.

of the diskette,
of the diskette.
from its square,
and do not fold

LABELING - A diskette is provided with adhesive labels which
should be used to note the contents of the diskette.
Write on
these labels BEFORE attaching the label to the diskette. If you
must write on a label after it has been attached to the
diskette, use a felt-tip pen and press gently. A ball-point pen
will crease the disk and may cause permanent damage.
INSERTING - To insert a diskette into a drive, first remove the
diskette from its paper sleeve. Hold the diskette gently, with
the label UP, and the arrow on the label aiming toward the
drive. Open the drive door by pressing the rectangular button
until the door snaps open. GENTLY slide the diskette into the
drive until it is completely inside the door (it may seat with a
soft -click-). Press the door shut.
To remove the diskette,
press the rectangular button again.
STORAGE - When a diskette is not in use, it should be removed
from the drive and stored in its paper sleeve.
Store the
diskette away from dust, away from extremely high or low
temperatures, away from moisture, and AWAY FROM MAGNETIC FIELDS.
Protect the diskette from magnets, motors, transformers, or
anything else which could create magnetism.
OPERATION - When a disk drive is in use, the red light in the
drive door will illuminate.
It is extremely important that
nothing interfere with the disk while this light is on. While a
disk is in use, removing the disk, pressing BESET on the
keyboard, or turning the power off, may damage the "data on a
disk.

:GC 7900

Preliminary DOS Manual

Page 1-5

rhe fixed disk is a sealed unit, located in the base of the 7900
=hassis. It is not subject to many of the restrictions above,
since it is hidden away from normal view. But the warning about
interrupting a disk operation in progress is still valid: if you
bave any reason to believe the system is accessing your fixed
disk, DO NOT press RESET or otherwise interrupt the process.
If
you give the system a command to access the fixed disk, be sure
the command has been completed before turning the system off or
pressing RESET.
WRITE-PROTECTION - A flexible diskette may be protected from
accidental destruction by uncovering its write-protect notch.
Some diskettes are shipped with the notch covered, and some have
it uncovered when you receive them. In either case, the notch
must be covered or DOS will not be able to write on the disk.
The write-protect notch is a small (1/4-) hole on the front edge
of the disk.

CGC 79""

Preliminary DOS Manual

Page 1-6

Preliminary DOS Manual

CGC 7900

Page 1-7

ENTRY INTO DOS
The Disk Operating System is entered by pressing the labeled key,

The DOS log-on message should immediately appear on the screen.
If this does not happen, it can be because the state of the
system is not what DOS expects to find (for example, if the
screen is not connected as the proper output device).
You can
optionally enter the Disk Operating System by striking three
keys,
RESET

CTRL BOOT

This sequence initializes
cause entry into DOS.

~

the

entire

system

and

will

always

The DOS log-on message should now appear:
CGC Disk Operating System --- Version 1.4
Copyright (c) 1981 by CHROMATICS, INC.
ENTER USER PASSWORD =
DOS will print its version number. This number should be
in any communications to Chromatics concerning the DOS.

noted

The DOS log-on message will request your User Password. At this
point, you may enter a 2-character password and press the RETURN
key, or you may simply press RETURN.
If you do not enter a
password, you will only have access to Public files which are
not assigned a password. If you do enter a password, you will
have access to all Public files, as well as any files whose
password matches yours.
Legal characters for a User Password are: digits 8-9, upper and
lower case alphabetic characters, and these special characters:

[ \ 1

~

_ ' { I } -

Entering any other characters may cause the
your password and assign you to Public files.

system

to

ignore

CGC 790.

Preliminary DOS Manual

Page 1-8

NOTE: The User Password system in DOS is not· designed
to offer a high level of protection. Its main purpose
is to help organize files into groups, so that a user
will see only the files he must work with.
This is
especially important in the case of the hard disk,
where several hundred files may exist in the directory.
After completing the log-on procedure,
asterisk (*) as its prompt character. The
DOS is ready to accept a command.

DOS prints a green
asterisk means that

Preliminary DOS Manual

CGC 7909

Page 1-9

DOS COMMAND LINE
When you are entering commands to DOS, all of the text editing
functions labeled on the cursor keypad may be used to edit your
input line. The left and right arrow keys move the cursor.
around on the input line. the ~ key moves the cursor to the
beginning of the input line. The functions labeled in blue are
accessed by holding the ~ modifier and pressing the indicated
key: these functions are Insert Character, Delete Character,
Clear Line, and Clear EOL. Pressing RECA~L brings back a copy
of previous lines. RECALL and SHIFT RECALL may be used to
retrieve any line from the "Recall Buffer." Once recalled, a
previously entered line may be edited with the other functions.
Regardless of where the cursor is on the input line, ALL
characters visible on the input line are accepted when the
RETURN key is pressed. DOS does nothing with your commands until
you press RETURN.
If you press PELETE instead of RETURN, DOS
ignores the line you typed.
(All of these functions are a part of the Inline Editor, used
for DOS, the Monitor, and other 7900 programs.
The Inline
Editor is discussed in more detail in the 7900 User's Manual, and
in Section Two of this manual.)

DOS commands are described in detail in this
simple words or abbreviations, such as
DIR

manual.

Most

are

files

on

(followed by RETURN)

which lists the directory of a disk (the names of
that disk).

the

You may enter several DOS commands on the same line, separating
them by a colon (:). For example, the following command would
list the disk directories from drives I and 2:
DIR/l:DIR/2
(No space should be typed on either side of the colon.)· You may
type as many commands as will fit on a single line of the
screen. If any command causes an error, DOS will not process
the rest of the commands on that line.

CGC 7999

Preliminary DOS Manual

Page 1-19

DISK FILE NAMES
DOS is a file oriented system. When you type a command . to DOS,
you are actually entering the name of a disk file.
DOS looks
for the' file, and if the file is found (and is executable), it
is loaded into memory and executed.
A file name may have several parts:
The primary name, which may be one to eight
characters, and may contain the special characters
[

\

]

",

alphanumeric

, { I ,} -

The secondary name, which
is
always
three
alphanumeric
characters. The secondary' name is separated from the primary
name by a period (decimal point).
The secondary name is
optional. If it is omitted, DOS will usually append a secondary
name to the file name (depending on what the file name is to be
used for).
A password, which must match the password assigned to the file.
The password is separated from the name by a dollar Sign ($) •
If a password is entered, it must precede the drive number.
The
password is optional. If it is omitted, it is assumed to be the
password under which you logged onto DOS.
A drive number, identifying the disk drive on which the file
resides. The drive number is separated from the name by a slash
(f). The drive number is optional. If it is omitted, it will
be assumed this file resides on the same drive which responded
to the last DOS command (the drive from which the last command
was loaded).
The four parts of a file name (primary name, secondary name,
password, drive number) must occur in the order listed.
If any
of the optional parts are omitted, the remaining parts must
occur in the required order.

CGC

Preliminary DOS Manual

79~"

Page 1-11

Examples of legal file names:
FILEname
STORY.SRC
PROGRAM/2

USRT29NE$PW
LISTING.OBJ/l
HardLuck.BUF$ED/3

Examples of improper file names:
THISISTOOLONG

Too many characters in primary name only the first eight characters would
be recognized, so this is equivalent
to THISISTO. It would, however, still
be accepted.

oops/A

Illegal drive number.

NOWAYl.SYS

Illegal character in primary name.

BADone.GO

Secondary name too short.

Wrong/l.SRC

Incorrect order.

CGC 7998

•

Preliminary DOS Manual

Page 1-12

Preliminary DOS Manual

CGC 7900

Page 1-13

DISK DRIVE NUMBERS
The CGC 7900 supports up to three disk drives: two flexible disks
and a hard disk. Many disk commands require specifying the drive
number of the disk to which the command refers.
The followin~
numbers apply:
Drive 1:

the left-hand flexible disk

Drive 2:

the right-hand flexible disk

Drive 3:

the hard disk

You may always specify the drive number if you wish.
Anytime
you do not specify a drive number, DOS assumes you are still
using the same drive you used in a previous command.
'--

If a drive number of B (zero) is entered, it implies that DOS
should search all drives to locate the requested file.
The
search begins with drive 1. (If a new file is being created,
the drive number must be implicitly or explicitly specified, so
a drive number of zero is not allowed.)
When you enter DOS, immediately after pressing the DOS key, the
system does not know which drive you want to use.
The FIRST
command you enter to DOS acts as if you had specified a drive
number of zero, so DOS will search all drives in your system in
an attempt to execute the command. If this search succeeds, DOS
now knows which drive you want to use, and it will stay with
that drive until you specify a different drive number.
On the other hand, if your first command to DOS fails (as it
would if you misspelled a command), DOS will display an error
message. DOS will now default back to drive 1.
The next
command you enter will assume that drive 1 is
in
use.
Therefore, if an error occurs in your FIRST command to DOS, let
your SECOND command specify a drive number unless you want to
use drive 1.
The feature of -remembering- the current drive applies' only to
commands. DOS only remembers where the last COMMAND carne from,
not the last filename. If you type:
KILL/2 filename/3
The KILL command is coming from drive 2, so DOS remembers drive
2 and will search it for the next command (unless you specify a
different drive number).

CGC 7900

Preliminary DOS Manual

Page 1-14

SECONDARY FILE NAMES
The following secondary file names are recognized by DOS:
.SYS

"System" file. These are executable by DOS, simply
by typing the file name as a DOS command. .SYS files
are not listed by the OIR command unless specifically
requested. .SYS files are called "transients" since
they are part of the set of DOS commands, but do not
reside in memory at all times. .SYS files are listed
in the directory in YELLOW •

• KIL

"Killed" file.
These are files which have been
removed from active status by the KILL command. A
.KIL file will be removed by COMPRESS, however it may
be recovered before COMPRESS by using RENAME.
.KIL
files are not listed by the OIR command unless
specifically requested. .KIL files are listed in the
directory in RED.'
All of the file types below are
listed in GREEN in the directory •

• SRC

"Source" file. These files contain ASCII text,
as the source code of an assembly program.

.BUF

"Create"Buffer" files. These files are created by
the BUFF command and recalled with DRAW.
They
contain commands used to draw pictures •

• PIC

"Picture" files. These files contain a dump of up to
two megabytes of image memory. They are created with
PICTURE and recalled with REFRESH •

• RLE

"Run-Length Encoded" files.
These files contain a
compacted version of the data from image memory.
They are created with IMPLODE and recalled with
EXPLODE •

• ABS

"Absolute" binary files.
These files contain a dump
of bytes from selected areas of memory.
They are
created with STORE and recalled with FETCH.-

such

CGC 79'H'

Preliminary DOS Manual

Page 1-15

FILE NAME PATTERNS
DOS allows a "pattern- to be u.sed in place of a file name under
many conditions. A pattern permits a single command to affect
several files at once, or permits a command to affect any file
meeting a set of criteria. Depending on the command, using a
pattern will either affect the FIRST file on a disk which
matches the pattern, or ALL files which match.
Details are
given in the descriptions of the individual commands.
A pattern may consist of any combination of these items:
A primary name
A secondary name

(example: .SYS)

A wild card -.- in either the primary or secondary name
A password
A drive number
If the primary
The asterisk -.- performs a special function.
name is an asterisk, it will match any file name.
If the
secondary name is an asterisk, it will match any secondary name.
If either field CONTAINS an asterisk (in addition to other
characters), the asterisk will match any single character in a
file name. If the asterisk is in the last position of a field
(in addition to other characters), it will match any set of zero
or more characters.
If the primary name is blank, an asterisk is assumed to be
inserted in place of the blank. This means that the following
two patterns are equivalent:
*.SRC
.SRC
Either of these patterns would match
name is .SRC (a text file).

any

file

whose

secondary

If the secondary name is blank, it will match any file EXCEPT a
.SYS or a .KIL file. These files are never matched except when
specifically asked for, by using a .SYS, .KIL, or .* pattern.

Preliminary DOS Manual

CGC 7998

Page 1:-16

Some examples of patterns:
A*

Matches any file beginning with -Aexcept .SYS and .KIL files

A*.*

Same as -A*-, but includes .SYS and .KIL

*.BUF

Matches any .BUF file

*.*

Matches ANY file

Patterns can be very convenient, but they should be used with
caution. Suppose a program created a set of scratch files, and
named them Xl, X2, and so on. They could all be removed at once
with the command
KILL X*
but this would also KILL any other files whose names
the letter X.

began

with

Preliminary DOS Manual

CGC 7999

Page 1-17

TRANSIENTS
Transients, or transient programs, are the files which make up
the set of commands DOS recognizes. By typing the name of a
command, you tell DOS to search the disk for the file with tha
same name. If the file is found, it is loaded and executed,
causing your command to be carried out.
This system of swapping commands in and out of memory as needed
gives DOS great flexibility. The entire DOS need never reside
in memory at once; only the current command is occupying space
in memory. Further, it is simple for you (or Chromatics) to add
commands to the set of commands DOS recognizes, by writing
assembly language programs to carry out the command.
Transients
are stored on the disk with a secondary name of .SYS, and are
not visible in the disk directory unless you specifically ask to
see them.
This section discusses the transients, or commands, supplied
with DOS. When typing in a command to DOS, the various parts of
the command line must be separated by delimiters.
Valid
delimiters are:
SPACE
comma (,)
Certain control-characters and punctuation marks will
as delimiters, but their use is not recommended since
make the command line difficult to read.

also act
it would

If a command line contains several file names, delimiters must
occur between the names. Only a SINGLE delimiter should be used
to separate each pair of items on the command line; i.e., you
should NOT type a comma followed by a space. This would usually
cause a RSyntax Error R message.

Preliminary DOS Manual

CGC 7991

Page 1-18

DIR
Format:
DIR

[]

[,]

RETURN

Where:
 is a file name, or a pattern
which may contain wild cards.
 are described below.
The DIR (Directory) command lists the files in the directory of
a disk. Several options can be specified to tell the DIR
command which files you are interested in.
Typing DIR by itself will give you a list of most files on the
disk whose password matches yours. Files with either a .SYS or
a .KIL secondary name are not listed when you type DIR.
If  is included, only files matching the pattern are
listed. Some examples of using a pattern with DIR are shown on
the following pages.
If you want to examine the files of another user, you may enter
that user's password as part of the pattern.
It should be
separated from the rest of the pattern by a dollar sign ($).

~

You may use the DIR transient, residing on one disk, to examine
the files of another disk. This is normally done only if the
second disk does not contain the DIR transient.
It
is
accomplished by specifying the drive number of the .disk whose
directory is to be listed. This number is preceded by a slash
(I).

Preliminary DOS Manual

CGC 790S

Page 1-19

In the examples below, and on the following pages, the RETURN key
has been omitted, and a space bas been used as a delimiter, so
that the example will closely resemble what you will see on the
7900 screen.
DIR

List all except .SYS and .KIL files

DIR .*

List ALL files (including .SYS and .KIL)

DIR .SYS

List all .SYS files

DIR *.SYS

List all .SYS files (same as above)

DIR BR*

List all files whose names begin with
the letters BR. Possible matches would
be BR, BREAK, BROWN, etc.

DIR T*N

List all files whose names are three
characters long, begin with T, and end
with N (TEN, TON, etc.)

DIR $XY

List

DIR .*$XY

List all files under password ·XY·

DIR/2

List files on drive 2

DIR/l /2

List files on drive 2, using the DIR
transient living in drive 1

DIR/l .KIL/2

List all killed files on drive 2, using
the DIR transient from drive 1

fi~es

under password ·XY·

Preliminary DOS Manual

CGC 7900

page

~-~~

You can also append some options to the DIR command, using a
semicolon (;) to separate them from the pattern. These options
are:
P

List Public Files only, not the files under your
password (if you logged in with no password, this
is equivalent to listing the normal directory).

L

Give Long version of the directory, including the disk
name, address of next available space on the disk,
address and length of each filel and -attributeflags pertaining to each file.

S

Give Short version of the directory, with file names
only. Note: LONG version is default.

A

List files stored under ALL passwords.

Examples:
DIR ;P

List public files

DIR .*;P

List all public files

DIR .*;L

List all files, with details

DIR/3 .*;LP

List all public files on drive 3, with
details

DIR ; A L i s t files under all passwords (except
.SYS and .KIL files)
DIR .*;A

List files under all passwords, including
.SYS and .KIL files

NOTE: A SPACE must be present after the command DIR.
No space is used between a pattern (if any) and the
semicolon. This is illustrated in the examples above.

Preliminary DOS Manual

CGC 7909

Page 1-21

The disk directory is displayed in this form:
Free Address: $nnnn

DISKNAME

Free Length: $xxxxx

------------------------------------------------------ ---~-------

Filename
Prefix
Sfx

Status
••••••••

File
. File
Address Length

Samp1e12.SRC

w.......

$4999

File Origin
Date
Time

Last Accesa
Date
Time

$298

The disk is named ·DISKNAME.- The first free byte on the disk is
byte number $nnnn, and the length of the free space located at
that byte is $xxxxx bytes. (All numbers prefixed by the dollar
sign are in hexadecimal, base 16.)
One file is listed in this directory. It is named Samp1e12, and
has .SRC as a secondary name. The file begins at byte $4999 and
occupies $299 bytes of the disk.
It is write-protected (see
below).
The ·Status· column of a directory may show any of the
characters:

following

w

The file is write-protected.

d

The file is delete-protected and cannot be
destroyed by COMPRESS.

e

The file is execute-only.

o

The file is odd length. A file will only occupy
exactly the number of bytes it requires, unless
it contains an odd number of bytes. In this case,
a single extra byte of storage is used by DOS to
cause the file to occupy an even number of bytes.
Note the efficiency of this scheme, in comparison
with other disk operating systems which use blocks
of 128 or 256 bytes, regardless of the actual file
length.

k

The file has been KILLed.

CGC

79~'"

Preliminary DOS Manual

Page 1-22

If your system contains the optional Real-Time Clock, DOS will
also display time and date information in the directory.
The
last columns of the directory will show when a file was created,
and when it was last accessed.
The ·Free Length- entry in the directory always shows the length
of the largest free space available on the disk. If this number
approaches zero, the disk is getting full and should
be
COMPRESSed. See the COMPRESS command for details.

Preliminary DOS Manual

CGC 7999

Page 1-23

COpy
Format:
COpy





RETURN

Where:
 and  are each file names, or file name
patterns. Wild cards are allowed.

COpy produces a copy of a file, on the original disk or on
another disk. The name of the copy may be the same as the
original, or different. It is NOT legal to copy a file to the
same disk and retain the same name, however.
If a pattern is used instead of a file name, all files matching
the pattern are copied. This provides an easy way to transfer
only .SYS files to a new disk, for example.
NOTE: If  is located on the same
, a wild card is not allowed in the
name.

drive as
secondary

NOTE: If the secondary names and the drive numbers of
 and  are identical, only ONE file is
copied regardless of any wild cards in the file names.
This rule, and the one above, are required to prevent
DOS from copying a copy (of a copy of a copy ••• )
.KIL and .SYS files are not recognized
specifically requested (see examples).

by

COpy

unless

The new file produced by COpy will have the same password as the
'old file, unless the command line specifically changes the
password (by providing a password on the destination name).
The new file produced by COpy will always have the same status as
the old file (execute-only, delete-protected, etc.). See DIR for
a discussion of status attributes.

CGC 7998

Preliminary DOS

Manua~

Page 1-24

Examples:
COpy AX BX

Make a copy of AX, call it BX, and
put it on the same disk with AX.

COpy AX/l /2

Copy AX from drive I to drive 2.

COpy AX/l BX/2

Copy AX from drive 1 to drive 2, and
call the copy BX.

COpy T*/l /2

Co~y all files beginning with the
letter T, from drive 1 to drive 2
(except .SYS and .KIL files)

COpy *.SYS/l /2

Copy all .SYS files from drive 1 to
drive 2

COpy AZ BZ$aa

Make a copy of AZ, call it BZ, and
give it password waa w•

COpy AZ$aa $bb

Copy file AZ from password waa w to
password wbb w•

COpy .SRC .BUF

Copy all text files into .BUF files.

The destination disk should always be formatted before you try
to COpy anything onto it. Formatting prepares a disk to receive
data. (The FORMAT command is discussed after we complete the
description of COpy.)

Preliminary DOS Manual

C 7909

Page 1-25

only the drive numbers are specified, and no file name
ttern is given, a special full-disk
COpy occurs.
This
pies all data from the source disk to the destination disk,
lcluding the disk name and the entire directory. This kind of
IPY is normally used to produce a backup copy of an entire disk._
FULL-DISK COPY DESTROYS ALL DATA ON THE DESTINATION DISK.
cample:
COpy /1 /2

Copy the entire disk in drive 1
onto the disk in drive 2.

NOTE: A SPACE must occur between the COpy command and
the source drive number. If drive 1 contains the COpy
transient, the command above is equivalent to
COPY/1 /1 /2
In this case, the drive ~umber of the disk
the COpy transient is - specified. . The
command would NOT be legal:

containing
following

COPY/l /2
This command specifies the transient drive and the
source drive, but does not specify the destination
drive. The result is an -Argument Error- message.

r~e~~m~nary

UU5

Manual

Page 1-26

When a diskette (floppy disk) is FORMATted, it is defined to be
either single-density or double-density.
A single-density
diskette can hold up to 256,256 bytes and a double-density
diskette can hold up to 599,184 bytes. The 7909 normally uses
only double-density diskettes.
If you attempt a full-disk COpy between two disks
different densities, a warning will be displayed:
Density mismatch.

which

have

Continue (YIN) ?

Press the ·Y· key if you want to proceed. If you asked DOS to
copy from a single-density diskette
to
a
double-density
diskette, the -density mismatch· will not be a problem, since
all the data on a single-density diskette can easily fit onto a
double-density diskette. If, however, you asked DOS to copy
from a double-density diskette onto a single-density diskette,
you will get an error after the disk has been halfway copied.
A similar situation arises '--if you attempt a full-disk COpy
The capacity of a
between a diskette and the hard disk.
diskette is approximately 256K bytes Or 5l2K bytes, depending on
the density. The hard disk capacity is 10M bytes. You will see
this warning:
Capacity mismatch.

Continue (yIN) ?

If you press the ·Y· key, copying will proceed. BEWARE: If you
asked DOS to copy from a diskette to the hard disk, EVERYTHING
on the diskette will be copied and no errors will be displayed.
However, the hard disk directory will now be a copy of the
diskette directory, and will reflect a disk size of 5l2K bytes
instead of 19 Mbytes. This will render 95' of the hard disk
inaccessable until the hard disk is reformatted.
If you asked DOS to copy from the hard disk to a diskette, an
error will occur as DOS attempts to write past the end of the
diskette.

Preliminary DOS Manual

CGC 79""

Page 1-27

FORMAT
Format:

I

FORMAT

[]

[;]

RETURN



is the name given to the disk being formatted.
If omitted, the revision level of DOS is used
to form the'disk name.



is the number of the disk drive containing the
disk to be formatted.  is required.



are options, desribed below.

Where:

FORMAT initializes a disk, preparing it for data.
A new disk
must be formatted before it can be used. Formatting destroys all
data on a disk.
After a disk has been formatted, it contains a
blank directory, and no files.
The blank. directory shows only
the disk's name, its size, and allows POS to determine the disk's
density (single or double).
If  is specified, the disk is given this name.  may
be one to eight alphanumeric characters.
If  is not
specified, the disk is named ·DOSRevXX· where XX is the version
of DOS which initialized the disk. A disk formatted by DOS 1.4
would be named ·DOSRev14·.
FORMAT prints the message:
Format drive n.

Continue (yIN) ?

where n is the drive number FORMAT will initialize.
You are
given this chance to abort the process. Press the ·Y· key to
continue, or any other key to abort.
You may also insert a
different diskette in the drive before pressing ·Y·.

Preliminary DOS Manual

CGC 799"

Page 1-28

When DOS begins formatting the disk, it prints
Formatting drive n.
If successful, control returns to DOS with no further messages.
If an error occurs, such as a bad block detected on . the
diskette, ~rror messages are printed and the FORMAT should be
tried again.
If errors continue, the diskette should
be
discarded.

Options may be included in the  field, separated from the
rest of the FORMAT command by a semicolon. Allowed options are:
;D

double density

;S

single density

;y.

·Yes,· proceed with formatting

The default format for diskettes is double density. If desired,
a single density diskette may be formatted using the ·S· option.
A diskette created for Single density may be used on any CGC
799" system, and may possibly be useful in exchanging data with
other computer systems using single density diskettes.
However,
the directory of any 7999 disk will be different from that used
by other disk operating systems, so it will not generally be
possible to insert a CGC 799" disk into any other computer
system. Nor is it generally possible for the 79"9 to read a
diskette created by another computer system.
Option ·Y· prevents the system from asking the ·Continue?·
question above. If option ·Y· is used, the disk or diskette
will be immediately formatted with no questions asked.
Option
·Y· should be used with caution.

CGC 7gee

Preliminary DOS Manual

Page 1-29

INITIALIZING A NEW DISKETTE
Formatting prepares a disk for data, but does not store anything
on it. A freshly formatted disk has a blank directory. Here is
a sample procedure which might be used to format a brand new
diskette:
Load a disk containing the FORMAT command, and other
into drive·l. Load a blank disk into drive 2.

transients,

Enter the following:
FORMAT/l NewDisk/2
and press RETURN.

The FORMAT transient responds:

Format drive 2.

Continue (Y/N) ?

Press the wyw key. The formatting proceeds. When complete, and
no error messages have been printed, you can assume the new disk
is now formatted properly. It has the name wNewDisk w•
Now you
may wish to copy the DOS transients onto this disk, so that it
will be useable without referring to other disks. Enter:
COPY/l *.SYS/l /2
and press RETURN. All system transients
copied to the new disk.

(.SYS

files)

will

be

Prel~minary

CGC 7999

Page 1-39

DOS Manual

RENAME
Format:
RENAME



[1

[,]

RETURN

Where:
 is the name of an existing file,
 is the new name to be given to the file.


are options, described below.

RENAME alters a file's name. The primary name, secondary name,
or both, may be altered in the RENAME process.  must not
specify a drive number, since the file itself does not move from
the disk where it currently resides.
,If  specifies a
drive number, that number is ignored.
RENAME may also be used to change a file's attributes, such as
write-protection (see below). If you want to change a file's
attributes and leave its name the same, you may omit the 
name. It is NOT legal to omit both  and .
At
least one of these must be present.
RENAME is not allowed to change a file's password.
be used for this purpose.

COpy

should

If  contains wild cards, any files matching the pattern
are renamed. If  contains wild cards, characters are
pulled from the name of  to substitute for *'s in .
If  specifies only a primary name, all files with that
name (regardless of their
secondary
name)
are
renamed.
Likewise, if  specifies only a secondary name, a~~ files
with that name are renamed (regardless of their primary name).
This can result in more than one file having exactly the same
name. If this occurs, you can rename the files again (giving
them different names) by specifying the primary AND secondary
name of the file to be renamed. If  completely specifies
a file name, RENAME will only act on one file.
RENAME will not affect .SYS or .KIL files unless y.oo specify a
secondary filename of .SYS', .KIL, or .'. in .
RDlAME can
change a .SYS file to a .KIL, and can revive a ,.Xn. Lile into
its original type. BE CAREFUL.

Preliminary DOS Manual

CGC 79""

The option field may be used to alter
attributes (see DIR). Allowed options are:

-w

W

Write-protect
Write-enable

D
-D

Delete-protect
Delete-enable

E

Page 1-31

the

file's

status

Execute-only

If no options are specified, the file
retains
its
old
attributes. Note: for security reasons, RENAME will not remove
the execute-only status from a file. Once a file has the -estatus, that status may not be altered.

Examples:
RENAME AX BX

Rename file AX to BX, giving
it the same attributes AX had.

RENAME AX BX;W

Same as above, but writeprotect the file.

RENAME DATA OLDATA;WD

Rename DATA to OLDATA, writeand delete-protecting it.

RENAME ZOO;-W-D

Remove Wand D attributes from
the f.il e zoo.

RENAME SECRET;E

Make file SECRET execute-only.

RENAME XXll n/2

File XX on drive 1 is renamed
to YY; the -/2- is ignored.

RENAME XX

This produces -Argument Error.-

RENAME AB* CD*

Any file beginning with -ABwill now begin with -CD.-

RENAME can also change the name of a disk (the name given to
disk when it was FORMATted). Use this form of the command:
RENAME 12 Newname
The disk in drive 2 will be renamed to -Newname-.

the

CGC 79""

Preliminary DOS Manual .

Page 1-32

Preliminary DOS Manual

CGC 7900

Page 1-33

KILL
Format:
KILL



RETURN

Where:
 is the file to be KILLed.
The KILL transient changes a file's secondary name to .KIL
(except if the file is a .SYS file, it cannot be killed by KILL).
KILL is used to remove a file from Wactive Wstatus, and mark it
for eventual destruction with COMPRESS (see below).
After a
file has been killed, it is still recoverable, but is not
recognized unless specifically requested. The DIR command will
not display killed files unless the .KIL or .* pattern is
included. Most programs will ignore killed files.
.SYS files may be killed using the
their secondary name to .KIL (this
great care).

RENAME
should

command,
only be

to change
done with

After a file has been killed, it 1s still recoverable until the
disk is compressed (see COMPRESS). A .KIL file may be recovered
using the RENAME command, to change the secondary name to
something other than .KIL (.BUF, .SRC, etc.). After a COMPRESS,
the file is NOT recoverable.
If a pattern is used instead of a filename, ALL files matching
the pattern are KILLed.
Wild cards (*) may be included in the
pattern.

Preliminary DOS Manual

CGC 7998

Page 1-34

Examples:
KILL DATA

Kill the file named DATA

KILL DATA/2

Kill DATA on drive 2

KILL DATA$XY/2

Kill DATA on drive 2, passworded

KILL X*

Kill any file beginning with

KILL TEST

Kill any file with primary name TEST

KILL .SRC

Kill any file with secondary name .SRC

·Xl~

·X·

Preliminary DOS Manual

CGC 7930

Page 1-35

COMPRESS
Format:
COMPRESS

[$1

(/]

(iA]

RETURN

Where:
 is the two-character password of the files to
be COMPRESSed. If omitted, the password under
which you logged onto DOS will be assumed.


is the number of the drive containing the disk
to be compressed. If omitted, the disk which
contains the transient is compressed.

The COMPRESS transient disposes of all files whose secondary
name is .KIL (killed files). The space on the disk formerly
occupied by these files is now available for use again.
The
disposed files are NOT recoverable. COMPRESS also reclaims the
space formerly occupied by deleted files (see DELETE).
If a file is delete-protected, it
COMPRESS even if it has been KILLed.

will

If the iA option is given, ALL files
of their passwords.

are

not

be

compressed

affected

by

regardless

It is advisable to make a backup copy of important files, or of
the entire disk, before executing COMPRESS.
If COMPRESS is
interrupted by pressing Reset, by a power failure, or by
removing the diskette during COMPRESS, all data on the disk may
be lost.
COMPRESSing the hard disk (drive 3) may take several minutes.

Preliminary DOS Manual

CGC 79""

Page 1-36

Examples:
COMPRESS

Remove .KIL files

COMPRESS/2

Compress the disk in drive 2

COMPRESS/l /2

Compress the disk in drive 2, using the
COMPRESS transient from drive 1

COMPRESS $AB

Remove .KIL files under password -AB-

COMPRESS ,A

Remov~

.KIL files under ALL passwords

Preliminary DOS Manual

CGC 7900

Page 1-37

DELETE
Format:
DELETE



RETURN

Where:
 is the name of the file to be deleted.
DELETE removes a file from the disk directory.
This
immediately frees up the disk space formerly occupied
file. THE CONTENTS OF THE FILE ARE NOT RECOVERABLE.

process
by the

The DELETE command is different from KILL. KILL simply renames
a file with a .KIL secondary name, thus the file still exists.
After a file has been deleted, however, the disk directory no
longer shows the file's existance.
,
.

When the Disk Operating System is asked to create a new file, it
always takes the largest currently available chunk of disk
space. This means that it is not useful to DELETE a small file,
since the small chunk of space formerly occupied by that file
would never get used. DELETE is primarily useful for times when
you need to remove a large file (one occupying over 25' of the
disk, for example). DELETE allows you to reclaim the disk space
without going through the (time-consuming) process of KILLing
the file and then COMPRESSing the disk.
A pattern may be used in place of a
matching the pattern will be DELETEd.

file

name.

All

files

Example:
DELETE OLDdata

The space formerly occupied by deleted files is reclaimed when
the disk is COMPRESSed.
If you DELETE several small files
(going against the advice above), you will have to COMPRESS the
disk to make that space available for use again.
If a file is delete-protected, it cannot be deleted.

CGC 799"

.

Preliminary DOS Manual

Page 1-38

Preliminary DOS Manual

CGC79""

Page 1-39

BUFF
Format:
BUFF



RETURN

Where:
 is the name to be given to the file being
created by BUFF.
The BUFF command stores the contents of the Create Buffer into a
disk file. The secondary name .BUF is given to the file.
If
the file name already exists on this disk, the old file is
automatically KILLed •
• BUF files can be called back into the
DRAW transient.

Create

Buffer

with

the

Examples:
BUFF ANDWAX

Create a file called ANDWAX.

BUFFII FUDD/2

In this case the .BUF file is created
on a drive other than the drive where
the BUFF command resides.

When creating a picture to be
following hints may be helpful:

stored

as

a

.BUF

file,

the

1. Turn on CREATE before transmitting any other commands which
are necessary to set up the system for your picture.
For
example, if your picture will be drawn in the Bitmap, your .BUF
file should include the ·Overlay Off- and -Overlay Transparentcommands. Remember that the best .BUF files can be drawn
directly from DOS, requiring no setup by the user.
2. Turn the cursor off at the start of
makes a picture redraw faster.

your

.BUF

file.

This

~

Preliminary DOS Manual

CGC 7900

Page 1-48

DRAW
Format:
DRAW



RETURN

The file named  is called up from the disk and stored
the Create Buffer.  must have a .BUF secondary name.

into

After using the DRAW command, pressing the REDRAW key will cause
the picture in the Create Buffer to be redrawn.
Pressing XMIT
will cause the Create Buffer contents to be sent out Logical
Output Device 1, normally the RS-232 serial port.

Examples:
DRAW POKER

The file POKER.BUF is loaded into
the Create Buffer.

DRAW/3 Fliesll

The DRAW transient from drive 3 is
invoked to call up the file Flies.BUF
from drive 1.

NOTE: For best results, you are advised to pres~ the
TERMINAL key (leaving DOS and entering the Terminal
Emulator) before pressing REDRAW. If you do not press
TERMINAL before REPRAW, you will find that you are
still in DOS after your picture is redrawn, and
anything you type may obliterate your picture.
To
re-enter DOS after the picture finishes redrawing,
press SOFT BOar and pas. This will leave any picture
in the Bitmap intact.

If  was created on a CGC 7900 containing a different
number of image memory planes, the picture you generate may not
look the same as the original picture.
.

Preliminary DOS Manual

CGC 790"

Page ,1-41

APPEND
Format:
APPEND



RETURN

The APPEND command is similar to DRAW, except that the 
specified by APPEND is added to the end of the Create Buffer,
instead of replacing whatever was previously in the Create
Buffer. By performing a DRAW followed by one or more APPENDs,
several .BUF files may be concatenated. Then the BUFF transient
may be used to store the entire series as a single file.
....

Example:
DRAW Partl

load part one of a picture

APPEND Part2

add the second part

APPEND Part3

and the third part

BUFF ALLofit

store the whole thing

See also BUFF and DRAW.

CGe 791rJ1I .

PICTURE
Format:
PICTURE



[,l

RETURN

Where:
 is the name of a file to be created by
PICTURE. If a file with that name already
exists, the old file is KILLed.


is a hex number (s,ee below).

PICTURE stores an image from Bitmap memory into a disk file.
This requires up to two megabytes of storage, depending on the
number of Image Memory planes installed in your system, and thus
consumes a large amount of disk space. If the disk becomes full
while PICTURE is storing data, an error occurs and no data is
saved on the disk.
PICTURE also stores the contents of the Color Lookup
that the current colors on the Bitmap screen can be
later.

The file created by PICTURE has a .PIC secondary name.
Example:
PICTURE THIS

Table so
recreated

:GC

7900

Preliminary DOS Manual

Page 1-43

rhe optional argument  allows you to specify which planes of
Bitmap memory will be stored. You can store only the planes
~hich are applicable to your picture, and save disk space by
not
storing unneeded planes.  is a hexadecimal number between I
and FFFF. Each bit in  which is SET corresponds to a plane
~hich
will be stored.
The least significant bit of corresponds to plane 0, the most significant bit to plane 15. If
you enter more than four hex digits, only the last four are used.
Example:
- PICTURE FRAME

J 87 ~

::

The hex number 87 bas bits 0, 1, 2, and 7 set.
This command
stores the four planes which are normally installed in a
four-plane system. If your system contains only four planes,
this example is equivalent to using PICTURE without the optional
.
NOTE: Each plane stored by PICTURE occupies l28K bytes
of a disk, or $20000 hex bytes.
The -Free Lengthentry in the directory must be enough to accomodate
this length (plus 1024 bytes for the Color Lookup
Table), or PICTURE will generate an error message.

Example:
PICTURE BOOK ;7
This example stores only planes I, 1, and 2, a total of 385K
bytes.
If a picture was drawn on a four-plane system and the
blink plane was not in use, this command would store all
information necessary to reproduce the picture. Note that this
file would fit on a floppy diskette, but if four planes had been
stored, it would not fit.

For most applications, BUFF, DRAW and APPEND are much more
efficient methods of storing images.
See the preceding pages
for descriptions of these transients.
See also IMPLODE and
EXPLODE.

CGC

Preliminary DOS Manual

79S8

Page 1-44

REFRESH
Format:
REFRESH



RETURN

Where:
 is the name of a .PIC file to be brought in
from the disk, and displayed in image memory.
REFRESH is the opposite of PICTURE. REFRESH brings in up to two
megabytes of data from the disk and displays them on the screen.
The Color Lookup Table is also loaded by REFRESH.
See the
description of PICTURE for details.

If the .PIC file specified in the REFRESH command was created" on
a CGC 79SS containing a different number of Image Memory planes,
the image produce by REFRESH may not look exactly like the
original image stored by PICTURE.

Example:
REFRESH Yourself

CHROMATICS

D.t:

CGC 7900
Color Graphics Computer
Preliminary DOS Manual
(including Assembler
and Text Editor)
July, 1981

Page 1-45

Preliminary DOS Manual

:GC 7900

IMPLODE
Format:
IMPLODE



[;]

RETURN

Where:
 is the name of a file to be created by the
IMPLODE command. If a file by that name
already exists, the old file is KILLed.


is a hexadecimal number (see below).

IMPLODE stores an image from Bitmap memory,
However, IMPLODE uses a data compression
significantly reduce the amount of storage
Like PICTURE, IMPLODE also stores the Color

similar to PICTURE.
technique which can
a picture requires.
Lookup Table.

The file produced by IMPLODE has a .RLE secondary name.

The advantage of IMPLODE over PICTURE depends on the complexity
of the image, and in extreme cases, IMPLODE can actually use
more disk space than PICTURE. IMPLODE will display the number of
bytes it stored, and will also display the number of bytes
PICTURE would have used. You can then decide whether to try.
PICTURE instead.

 is a hexadecimal number which tells IMPLODE which planes to
store. It acts exactly like the optional  argument in the
PICTURE command. See the description of PICTURE.

Examples:
IMPLODE Baseball
IMPLODE CRT ;7

Preliminary DOS Manual

CGC 7998

Page 1-46

EXPLODE
Format:
EXPLODE



RETURN

Where:
 is the name of a .RLE file to be displayed
in Bitmap memory.
EXPLODE is the oPposite-- of· IMPLODE.
The data produced by
IMPLODE will be expanded back into its original form and
displayed in Bitmap memory.
The Color Lookup Table will be
restored to the colors it had at the time the picture was stored
by IMPLODE. See ~he description of IMPLODE for details.

If  was created on a CGC 7988 containing a different
number of Bitmap memory planes, the image produced by EXPLODE
may not look the same as the original image.

Example:
EXPLODE Dynamite

....

Page 1-47

Preliminary DOS Manual

CGC 7900

STORE
Format:
STORE





[+-]



[@]

[;]

RETURN

Where:
 is the name of the file to be created by STORE.
 and  are the starting and ending (hex)
addresses of the range to memory to be stored.
 is an address offset (hex) specifying the
difference between the address the data was
STOREd from and the address it will be loaded
into.  must be preceded by a + or sign.
 is the address at which execution of the data
must begin (assuming the data is a program)
 are described below.
STORE creates a disk file containing all bytes from the range of
memory  thru , inclusive.
The file created by
STORE may contain an absolute binary image of memory, or it may
be an image in executable form (readable by the DOS loader).
STORE decides which type of file to create, based on the
secondary name of .
STORE will allow you to specify any secondary name.
If you do
not specify a secondary name, the default secondary name of .SYS
is used and a load module is generated. If you specify .OBJ as
a secondary name, a load module is also generated.
Any other
secondary name causes an absolute binary image to be stored into
the file.

The arguments to STORE are affected
:

by

the

secondary

If the file type is .SYS, the default value for
zero, and the default value for  is .

name

of



is

Preliminary DOS Manual

CGC 790"

Page 1-48

If the file type is .OBJ, the default value for  and
 is zero. If the .OBJ file will be renamed to a .SYS
file,  must be specified at this time: a .OBJ file whose
 is zero cannot be executed.
If the file type is neither .SYS nor .OBJ,  and 
are not a1iowed. An absolute binary file is generated which
stores data in an unformatted form, storing just the bytes and
no addressing information. This type of file may be given any
secondary name, although .ASS is recommended.

A file created by STORE may be brought back into memory by FETCH
or DEBUG. If-STORE is used to create a .SYS file, the file may
be executed directly by typing its name as a DOS command.

Examples:
STORE/1 BOUSE.ASS/2 400" 4FFF
STORE Program 14000 14FFF-10"""@4400
Note that the + or - sign, and the @ sign, act as delimiters
the command line and should not be preceded by a space.

in

.p.

The option
makes a file ·proprietary· by setting the executeonly status in the file's attributes:
STORE SECRETS 11C3C 12AF0-10"00;P
....

The 7900 expects .SYS files to load and execute in the DOS
transient program area (TPA) or the DOS buffer.
The size of
these areas is set with the 7900 ·Thaw· command, but will
normally be at least 16K bytes. The DOS areas begin at memory
address $lC3C, and user programs should normally be arranged to
run in this area.
The STORE transient also runs in the OOS area, and would
overwrite any data in this area you are trying to STORE.
That
is the reason for the  parameter. Data to be STOREd can
be moved to a higher address with the Monitor ·Move Memory"
function, then the STORE command with an offset can be. used to
move the data back to its original addresses in the DOS area.

Preliminary DOS Manual

CGC 7930

Page 1-49

FETCH
Format:
FETCH



[] [+-]

RETURN

Where:
 is the name of the file to be loaded
into memory.
 is the address where the data from  is
to be loaded.  is required if the
file is NOT a .SYS or .OBJ file.
 is a displacement, to be added to the
normal load address of . 
is required for a .SYS or .OBJ file.
FETCH is the opposite of STORE.
It may be used to retrieve
bytes saved by the STORE transient, or to load a .SYS or .OBJ
file into memory.
FETCH will not load an execute-only file.
If the file read in by FETCH happens to over-write
areas of system memory, the system may hang.

important

Examples:
FETCH PGM.SYS/2+2000

FETCH BYTES.ABS lF000

Load the file PGN from drive 2,
at memory addresses 2000 (hex)
higher than it occupied when
it was STOREd.
Load the file BYTES into memory
beginning at address lF000 (hex)

Preliminary DOS Manual

CGC 7999

Page I-51

DEBUG
Format:
DEBUG



[]

RETURH

Where:
 is the name of a .SYS file to be
loaded i~to memory


are the arguments expected by the
.SYS file

DEBUG loads a .SYS file into memory, just as if the file had
been executed by DOS. After loading the file, DEBUG jumps to
the Monitor. If the file normally expects any arguments to be
present on the command line, they may be entered as .
DEBUG will not load an execute-only file.
To avoid having to use an offset when loading the .SYS file,
DEBUG relocates itself to the top of the DOS Transient Program
Area before loading . However, the TPA must be large
enough to accomodate both DEBUG and your file.
(DEBUG occupies
about 512 bytes.) If necessary, the ·Thaw· command can be used
to change the DOS memory allocation. See the 7999 User's Manual
for details.
Example:
DEBUG Process
DEBUG Gnats 6 12
In the second example, 6 and'12 are arguments
the program Gnats.

to

be

passed

to

Since the current Monitor (version 1.1) reloads the stack
pointer, it will not be possible for your program to execute a
normal return to' DOS. After using DEBUG to load your program,
you may use the Monitor to trace program execution up until the
point where your programatteapts to retUt'D to DOS.

Prel~rninary

CGC 790B

DOS Manual

Page 1-51

VERSION
Format:
VERSION



RETURN

VERSION displays the release date of the transients matching
. You may use VERSION to see whether you have the
latest set of transients from Chromatics, or to indicate the
release date of a transient when reporting a bug to Customer
Service.

You must enter at least the disk number as .
VERSION by itself causes an -Argument Error.-

Typing

Example:
VERSION /2

Display the release date of all
transients on the disk in drive 2.

Preliminary DOS Manual

CGC 7908

Page 1-52

SUMS
Format:
SUMS

RETURN

SUMS performs a checksum of all PROMs in the 7908 system.
This
is normally used as a check on the integrity of a PROM, or to
determine which version of firmware is installed in a system.
SUMS also displays the software revision level of the PROMs in
your 7900 system, by searching for the ASCII string ·VERi· in
each PROM. If your system contains PROMs version 1.1 or higher
(DOS version 1.4 or higher), SUMS will display the version
number of these programs.

Example:
SUMS

.~

Preliminary DOS Manual .

C 7900

Page 1-53

XREF
)rmat:
XREF

[A]


«file2> ••• , , etc. are ASCII files containing
an MC680"0 assembly language program.
 are described below.
~EF is a
program designed to be used with the Chromatics
IC68000 Assembler (discussed in Section 3 of this manual).
XREF
)roduces a cross-reference list of all labels in an MC68000
lssembly language source file. The line at which a label is
3efined is flagged with an asterisk (*).

(options> may include any of the following characters:
L

Transmit output to Logical Device I (normally
the screen)

T

Transmit output to Logical Device 1 (normally
the RS-232 serial port, assumed to connect to
a printer)

P

Print  lines per page (including 4 lines
used as a header)

W

Print lines up to  characters wide «m> may
range from 81 to 132)

-R

Don't cross-reference registers (AI, Dl, etc.)

If  are omitted, the default is ATP61Wl32+R.
This
causes listing to be directed to the printer, 61 lines per page,
132 columns per line, and registers are included in the XREF
listing.
Example:
XREF Program
XREF ALW85 Program

."

List on the screen, limit lines
to 85 characters wide.

•

CGC 79B8

Preliminary DOS Manual.

Page I-54

:GC 7909

Preliminary DOS Manual

Page 1-55

DOS ERROR MESSAGES
DOS will report errors which occur as a result of illegal
commands, faults in the disk system, or programming errors.
One
of the messages below will be displayed when a DOS error occurs.
When possible, DOS will display the drive number where the erroroccurred.

No index signal detected

No seek complete

Write fault
Drive not ready
Drive not selected
No track 000 detected
ID read error
Uncorrectable data error found during a read
ID address mark not found
Data address mark not found
Block not found
Seek error
No host acknowledgement
Diskette write protected
Data field error found and corrected
Bad track found
Format error
Invalid disk controller command
Illegal logical block address
Illegal function for the specified drive
Diagnostic RAM error
Disk controller not ready
Controller time out error
Unable to determine controller error
Undefined controller state
Controller protocol sequence error
Undefined load error state
Record cound error
Checksum error
Premature EOF during load
DOS buffer too small
Transient program size too small
End of file reached
File is write protected
Attempted to read thru density barrier
Attempted to transfer data on odd address

.....

CGC 79""

Preliminary DOS Manual

Unable to find requested file
Unable to create new file space
Unable to close requested file
Empty slot found
Unable to update the directory
No run address
Unable to find disk name
Argument error
Attempt to access a non-existant drive
Unable to initialize drive I
Unable to initialize drive 2
Syntax errorl Missing argument
Premature format termination
Error mapping routine not implemented
Unable to fetch this file
File is delete protected
File type error
File is execute only
File is to big to append
Insufficient stack size
/8 mode is not allowed in argument filenames
Undefined DOS error.

Page.I-56

:GC 79"0

Preliminary DOS Manual

Page 1-57

CGC 7988

-

Preliminary DOS Manual

Page 1-58

CGC 7ge0

Preliminary DOS Manual

Page 2-1

"",

SECTION 2 - THE EDITOR

CGe 79""

Preliminary DOS Manual

Page 2-2

....
•

CGC

Page 2-3

Preliminary DOS Manual

79"'"

INTRODUCTION TO THE EDITOR
The Chromatics' CGC 7900 Text Editor is a disk-based program used
for creating and maintaining text files. It is primarily used
in conjunction with the Assembler, for
creating
programs
executable by the Me68""" processor. The editor is also good
for workinq with other types
of
text
files,
such
as
correspondence or documentation.
This manual was, in fact,
written on a text editor.

The editor executes under DOS, the Disk Operating System, which
was described in Section One of this manual. If the DOS prompt
(a green asterisk) is not currently visible, press the ~ key.
Enter your password and press RETURN (or simply press RETURN).
Make sure that the system contains a disk which has the editor
on it, the program EDIT.SYS. Then type:
EDIT

RETURN

It may be necessary to specify the
containing the EDIT program, as:

number

of

the

disk

drive

EDIT/n
Where n is the number of the drive where EDIT.SYS resides.
This
will only be necessary if another drive, not containing the
editor, has been in use.

When the editor expects input, it will prompt you in one of three
ways. If the editor expects a command, the prompt is a 4-digit
line number followed by a question mark. If, it expects a line
of text to be inserted into the file, the prompt is a 4-digit
line number followed by an -I- and a question mark. If you are
in MODIFY mode, the prompt is a number followed by the letter -Mand a question mark.
8888

?

Command prompt

8888 I ?

Inse,rt prompt

8888 M ?

Modify prompt

CGC 7908

Preliminary DOS Manual

Page 2-4

The line number is a pointer position within the file.
The
editor refers to lines by number, and maintains an internal
pointer somewhere within the file. Commands are provided which
will explicitly move the pointer around, and many commands will
implicitly move the pointer. For example, if the pointer is on
line 3, and you LIST lines 3 thru 28 of the file, the pointer iJ!
now on line 28.
NOTE: When the edit pointer is at the beginning of the
file, the line number is displayed as "B". When it is
at the end, the line number is displayed as wEw.
When you see the command prompt, you may enter any of the legal
editor commands described in this manual.
The INSERT command
will take you out of command mode and put you into insert mode.
When you see the insert prompt, anything you type will be
inserted into the file at the current pointer position.
Hitting
the DELETE key will return you from insert mode to command mode.

Each of the commands in this section may be abbreviated to the
smallest number of characters which will uniquely identify that
command. For example, the OPEN command may be abbreviated to
the letter "0·, since no other command begins with that letter.
However, the command PRINT can only be abbreviated to two
characters, PR, so that it won't be confused with the PAGE
command (both begin with .p.).
In general it is safe to
abbreviate commands to two or three characters •

....

:GC 7900

Preliminary DOS Manual

Page 2-5

INLINE
-INLINE W is the standard subroutine used by the editor for
fetching a line of input from the keyboard.
This routine is
also used by other CGC 7900 programs, such as DOS.
INLINE
accepts a line of input, and allows editing, inserting and
deleting characters, and overstriking characters. When the line
is completed to your satisfaction, press RETURN.
Note: the
cursor can be anywhere on the input line when RETURN is struck,
but the entire visible line will always be accepted as input.

The left and right arrow keys move the cursor around within the
line currently being typed. The Home key moves the cursor to the
left edge of the current line. The cursor position is used to
determine where text will be inserted, or where other commands
will take effect.

INLINE supports the editing commands printed in blue on the
front of the cursor control keys: Insert Character, Delete
Character, Clear Line, Clear to End Of Line, Recall Last Line.
These blue functions are accessed by holding down the ~
(control) key and pressing the indicated key.
Del Char (Delete Character) removes one character at the current
cursor position. All characters to the right of the cursor move
left one position.
Clear Line erases the line currently being typed.
Clear EOL (Clear to End Of Line) erases all characters
current cursor position to the end of the line.

from

the

Recall (Recall Last Line) replaces the line currently being
typed with the last complete line that was typed. This function
is useful for repeating a command, perhaps altering it slightly
with the other functions. Press Recall more than once to bring
back earlier lines; this moves backward into the recall buffer.
Press SHIFT with Recall to move forward· in the recall buffer.

CGC

790"

Preliminary DOS Manual

Page 2-6

Ins Char (Insert Character) puts the routine into insert mode.
and
any
The character under the cursor begins blinking,
characters typed are now inserted, forcing characters to the
right of the cursor to move out of the way.
To leave insert
mode, use one of the arrow keys to move the cursor. This places
the routine in its normal (overstrike) mode, and any characters
typed now will simply overwrite existing characters under the
cursor.

INLINE is designed to be a general-purpose rQutine for ALL user
input in the CGC 7900.
The Appendix describes the calling
sequence for INLINE, for users who wish to use it in their own
programs. It is STRONGLY SUGGESTED that all programs use INLINE
to accept input from the user.
This means that all programs
will support character editing as described above, and the user
will become accustomed to using the same editing sequence for
all program input.

:GC 7900

Preliminary DOS Manual

Page 2-7

EDITOR COMMANDS
rhis section discusses the commands accepted by the editor.
E:ach of these commands m.ay be entered at the command prompt.

In each command, one or more delimiters may be present to
separate the various parts of the command. A delimiter may be a
space or comma. For convenience, we will always use a space in
our exampl es.

If the editor cannot interpret a command, or if for any reason
an error occurs during a command, the command line is re-printed
on the screen with the cursor positioned over the error.
You
may then edit the command line, using the INLINE editing
functions on the cursor keypad. This avoids retyping the entire
input line, and also illustrates exactly where the
error
occurred.

pre~iminary

CGC 7908

DOS Manual

Page 2-8

OPEN
Format:
OPEN



RETURN

Where:
 is the name of an existing disk file containing
ASCII text.  is assumed to have. the
secondary name .SRC, unless a different
secondary name is entered.
Before a.file can be edited, it must be OPENed as an input file.
The OPEN command searches for a specified file and returns an
error if the file cannot be located. If the file does exist,
OPEN simply returns to command mode.
Note: OPEN does not
actually cause any text to be read in from the file!
See GET
below.
.

The file is assumed to contain ASCII text.
Each line of the
file is terminated by a Carriage Return character, and no Line
Feed. The editor will provide a Line Feed after each Return
when LISTing or PRINTing the text.
Examples:
OP DOOR
OP WINDOW

...

OP ThatFile/2

Preliminary DOS Manual

CGC 7909

Page 2-9

GET
Format;
GET

RETURN

GET

<.> RETURN

Where:

<.> is a decimal number.
GET reads in text from the currently open input file (the file
most recently specified by OPEN). If the GET command is used
without an argument, enough text is read in to approximately
half fill the available memory. If a <.> is specified, only
that many lines are read in. The text is appended to the end of
the text already in memory.

If the GET command causes the entire file to be read in, the
message -End Of Input Data- is printed, and no more text may be
read in from the input file.

If the GET command causes memory to be filled with text, the
message -Workspace Full- is printed, and no more text is read
in. It is now necessary to PUT some text back on disk, to make
room for more of tpe file~
See PUT and PAGE for examples.
Note: Using GET without arguments is recommended, since it will_
never totally fill the workspace.

Examples:
GET
GET 39

Preliminary DOS Manual .

CGC 790.

Page 2-10

LIST
Format:
LIST

RETURN

LIST

<11>

RETURN

LIST

<11>

<12>

RETURN

Where:
<11> and <12> are line numbers.
LIST displays lines of text from the contents of memory.
If no
line numbers are entered, LIST begins at the current pointer
position. If one line number is given, listing begins at that
line and continues thru the end of the file.
If two line
numbers are given, listfng begins at the first line number
entered and continues thru the second line number.
LIST may be paused by typing a Control-S, and restarted with
Control-Q. LIST may be stopped at any time by pressing DELETE.
The output from LIST is always directed to Logical Output Device
0, normally the screen or a part of the screen.
Each line
displayed by LIST is shown with its line number, for reference.
Examples:
LI
LI 20"

Preliminary DOS Manual

CGC 7908

Page 2-11

PRINT
Format:
PRINT

RETURN

PRINT

<.1>

RETURN

PRINT

<.1>

<.2>

RETURN

PRINT performs the same function as LIST, but sends its output
to Logical Output Devices 0 and 1. Since Logical Output Device
1 is normally connected to a printer, this produces a hardcopy
of the lines listed. Unlike LIST, PRINT does not display line
numbers in front of each line.

Examples:
PR
PR 100 190

CGC 79SS

Preliminary DOS Manual

Page 2-12

INSERT
Format:
INSERT

RETURN

INSERT

<.> RETURN

Where:

<.> is a line number.
'--

INSERT takes the editor from command mode to insert mode.
in insert mode, the prompt is in the form:

While

NNNN I ?
The wI- indicates that material is being inserted into text.
If <.> is entered with the INSERT command, insertion begins at
the line specified. All lines from <.> up will move up in the
file to make room for lines being inserted.
If <.> is not
specified, insertion begins at the current pointer position.

INSERT is the most important command in the editor.
It allows
you to enter text to create a new file. While in inse~t mode,
any of the INLINE editing features may be" used, such as insert
and delete character.

Insert mode remains in effect until the DELETE key isstruek,
which time the editor returns to command mode.

at

Preliminary DOS Manual

CGC 7ge9

Page 2-13

NOTE: The INSERT command causes the line numbers of
part of the text in memory to be changed, as all lines
past the insertion move up in memory. It is advisable
to LIST the file after leaving insert mode, before
performing any operations which are dependent on line
numbers.

Examples:
IN
IN 15

If you enter a Mode code sequence (such as a ·Set Color·
command) into the input line, the sequence is displayed in
compressed form, using special characters. It is not executed
until you press the RETURN key. If you enter a tab character
(CTRL I) into the line, it too is displayed but not executed.
The Mode character resembles a double tilde (-), and the tab
character resembles a right-pointing arrow.
(These characters
are taken from the ·A7· character set, described in the CGC 7999
User's Manual.) Pressing RETURN will redisplay the input line
with all Mode codes executing as they normally would when
printed from a program. Tabs will be executed according to the
current tab stop spacing in effect (normally 4 characters apart).
Using the up and down arrow keys or the Delete Line function,
you can move from "INSERT mode into MODIFY mode. - Modify can also
be entered by giving the MODIFY command, as discussed next.

Page 2-14

Preliminary DOS Manual

CGC 7998

MODIFY
Format:
MODIFY

RETURN

MODIFY

<.> RETURN

Where:

<.> is a line number.
MODIFY is the editor's most flexible mode.
MODIFY, the editor's prompt is in the form

When

you

enter

NNNN M ?

and is displayed in magenta.
in magenta.

The current line is also

displayed

MODIFY allows you to use the INLINE editing features on existing
text in memory. You can insert or delete characters using the
labeled functions on the cursor keypad. When you have finished
altering a line, you must press RETURN to store that line in its
new form. If you move the cursor up or down using the arrow
keys, the line you modified will NOT be stored, but will return
to its previous condition.

Using the Insert Line and Delete line functions, you can move
between MODIFY mode and INSERT mode at will.
When in MODIFY,
the prompt will be displayed in magenta and will be in the form
-NNNN M?- While in INSERT mode, the prompt is in yellow, and is
in the form -NNNN I ?Pressing DELETE moves you back to command mode.
Examples:
MO

MO 25

CGC 7900

Preliminary DOS Manual

Page 2-15

When in MODIFY, as in INSERT, a special compressed form is used
to display Modes, tabs, and other control-characters.
In
MODIFY, the line containing the cursor is always displayed in
compressed form so that any control-characters in the line will
be visible and may be edited. Other lines on the screen during
MODIFY are displayed normallYJ only the line with the cursor isdisplayed in this special form.

CGC 7991

Preliminary DOS Manual

Page 2-16

DELETE
Format:
DELETE

RETURB

~ELETB

<.1>

RETURN

DELETE

<.1>

<.2>

RETURB

DELETE removes a set of lines from the text.
If DELETE is
entered with no arguments, only the current line is deleted.
(The curr'ent line is the line whose number is printed in the
prompt.)

If DELETE is entered with one argument <.1>, the single line
whose line number is <.1> is deleted. If DELETE is entered with
both <.1> and <12>, all lines within the range <11> thru <12>,
inclusive, are deleted.

NOTE: The DELETE command causes the line numbers of
part of the text to be changed, as all lines past the
lines deleted are moved down in memory.
After a
DELETE, it is advisable to LIST the file before doing
any other operations which are dependent on line
numbers.

Preliminary DOS Manual

CGC7909

Page

2-17

FIND
Format:
FIND

\\

RETURN

FIND

<11>

\\

FIND

<11>

<12> \\

FIND

<11>

<12>



RETURN
RETURN

\\

RETURN

FIND locates a string. The range of lines to be searched, and
the number of searches to perform, are specified in the command:
FIND with no arguments other than  begins searching
the current pointer position, and reports all occurances
 until the end of the file.

at
of

FIND with <11> is the same as above, but begins searching
line <11> rather than at the current pointer position.

at

FIND with <11> and <12> searches all lines
inclusive.

from

<11>

FIND with <11>, <12> and  begins searching at line
terminates when it reaches line <12> OR if it has
occurances of .

to
<11>,
found

<12>,
and


The backslash character W\W is used as a delimiter to define the
search string. Any non-numeric character (except WlW) could be
used as a delimiter, provided it does not occur in . The
terminating delimiter (just before RETURN) is not required.

Examples:
FI \8\

Find all zeroes from the current
pointer to the end of the file.

FI 1 999\.\

Find all decimal points in the file
(through line 999)

FI 1 999 l8\the\

Find up to 18 occurances of the
word Wthe W, between lines 1 and 999.

During a FIND, you may press CTRL S to pause the display, and
then CTRL 0 to continue. DELETE returns you to command mode.

Page 2-18

Preliminary DOS Manual

CGC 7998

SUBSTITUTE
Format:
SUBSTITUTE \\\

RETURN

SUBSTITUTE

<11>

\\\ RETQRN

SUBSTITUTE

<11>

<12> \\\ RETURN

SUBSTITUTE

<11>

<12>

\\\ RETURN SUBSTITUTE <11> <12>

\\\ B~TQBH SUBSTITUTE performs a search-and-replace enter a number of options to specify substitution takes place: function. exactly You how can the SUBSTITUTE with no arguments affects only the current line, and if is on that line, it is replaced by . Only one occurance of will be replaced. SUBSTITUTE with <11> affects only the line one occurance will be replaced. specified, and only SUBSTITUTE with <11> and <12> begins at line number <.1> and continues thru line number <.2>. If is found on any line, it is replaced by , but only the first occurance of per line will be affected. SUBSTITUTE with <11>, <12> and

affects all. lines from to <.2>, inclusive, and replaces

occurances per line. .... <11> SUBSTITUTE with <11>, <12>,

and

affects all lines from <11> to <.2>, inclusive, replaces

occurances per line, but begins at occurance on each line. The backslash W\W is used as a delimiter to define the beginning and end of each string. Any non-numeric character (except W(W) could also be used as a delimiter, provided it does not occur in either or . The terminating required. delimiter (just before the RETURN) 1s not Preliminary DOS Manual CGC 799" page. 2-19 Examples: Change the first occurance of RA" to "B" on the current line (if any). SU \A\B\ SU On line 54, change "123" to ·321" (one occurance at most) 54\123\321\ SU 1"9 2"8\me\I\ Change "me" to "I· everywhere between lines 188 and 288 (not more than once per line). SU 188 2"8 99\me\I\ Same as above, but up to 99 times per line (effectively changes all occurances on each line in the range). SU 1 188 1 2\this\the\ Between lines 1 and 188, change the second occurance "this· to ·the· on each line. SU 1 188 99 2\this\the\ Same as above, but changes all occurances EXCEPT the first occurance on each line. SU 18 55.\./. Change backs1ash to slash using a period as a delimiter), once per line, between lines 18 and 55. SUBSTITUTE displays each line it changes. To abort the SUBSTITUTE process, press the DELETE key. You will return to command mode, and any lines which have not already been displayed by SUBSTITUTE will not be affected. SUBSTITUTE can be very destructive, if not used carefully. It is good practice to use FIND before SUBSTITUTE, to see exactly what will be affected by SUBSTITUTE. For example, PI 1 99 1\A\ Find the first occurance of "A· and display the line. so \A\B\ Change "A· to "B· at thi' line By using the Recall Last Line function, you can repeat these commands as often as required, examining each occurance of before changing it to "8". two "A· Preliminary DOS Manual CGC 7988 Page 2-28 LAST Format: LAST RETURN Each time the command prompt is printed, the current pointer position is memorized. The LAST command moves the pointer to its most recent location in memory. Using LAST more than once will flip back and forth between the current location and the most recent location. Here is a sample session with the LAST command: 7988's Output 8818 ? User's Input LIST 28 38 (Lines 28 thru 38 are listed) 8838 ? LAST 8818 ? LAST 8838 ? Preliminary DOS Manual CGC 79"9 Page 2-21 PUT Format: PUT RETURN PUT <11> RETURN PUT <11> <12> RETURN PUT removes text from memory, and writes it back to the disk. If PUT is entered with no arguments, all text in memory is written out to the disk. If one argument <11> is entered, all lines from the beginning of text thru line <11> are written out to the disk. If two arguments are entered, only lines between line <11> and line number <12> are written out to the disk. number PUT is primarily useful for dividing up a file into smaller files. By doing a PUT followed by a CLOSE, a new file is created which contains only the lines which were POT. PAGE and EXIT are more general-purpose editing session. Examples: PO PO 69 99 commands for ending an Preliminary DOS Manual CGC 7999 Page 2-22 CLOSE Format: CLOSE RETURN CLOSE RETURN CLOSE enters the output file into the disk directory, and closes the file. If CLOSE is entered without a , the new file has the same name as the old file; the editor will then automatically KILL the old file. The If a is specified, the new file has that name. file will have .SRC as a secondary name unless you specify a different secondary name. Once a file has been closed, either by CLOSE or by EXIT, it exists on the disk and can be re-opened by OPEN as an input file. Examples: CL CL MIND CL NEWFILE PAGE and EXIT are more general-purpose editing session. commands for ending an Preliminary DOS Manual 3C 7900 Page 2-23 PAGE ormat: PAGE RETURN ~he PAGE ~o large command is used when editing large files. If a file is that it cannot all fit into memory at once, it is lecessary to bring in a portion of the file, edit that portion, ~hen go on to the next. PAGE dumps all of the text in memory ~ack to the disk, then brings in enough text from the input file to half fill the available memory. PAGE is thus equivalent to doing a PUT of followed by a GET. Example: PA all text in memory, Preliminary DOS Manual CGC 7998 Page 2-24 DRIVE Format: DRIVE (N) RETURN The output-from the editor normally goes onto the same disk from which the input file was read. You may alter this with the DRIVE command, forcing the editor's output onto another disk. DRIVE causes the editor to create a new output file, on the specified disk. Example: DR 2 If you have already written some text to the output file, using PAGE or PUT, DRIVE is not allowed until you CLOSE the currently open output file. (If it were allowed, the text you had written to the disk would be lost.) Preliminary DOS Manual :GC 7900 Page 2-25 EXIT Format: EXIT RETURN EXIT RETlJRN EXIT is the proper way to end an editing session. EXIT first PUTs all text in memory onto the disk. Then it performs a series of GETs and PUTs (if necessary) to insure that the entire input file has been written to the output file. When no text remains in the input file, the output file is closed. If EXIT is entered with no , the output file has the same name as the input file. The editor then automatically KILLs the old input file. If EXIT is entered with a , the output file is given that name. The file will have .SRC as a secondary name unless you specify otherwise. Example: EX EX RAMP Preliminary DOS Manual CGC 7991 Page 2-26 ABORT Format: ABORT RETURN The ABORT command ends an editing session, but does the output file. If any changes had been made in the changes are lost. not close file, the ABORT is used if you decide that you don't want to alter the file after all. If you had been using the editor simply to examine a file (rather than making changes), ABORT would be the logical way to end the session. Example: AB NOTE: Pressing the nas, MONITOR, or TERMINAL keys will also result in leaving the editor. To Ie-enter the editor after an abort, execute the key sequence SHIFT USER W this will -warm-start- the editor, memory intact. with the data in :;C 7900 Preliminary DOS Manual Page 2-27 CGC 7999 Preliminary DOS Manual Page 2-28 CGC 7909 Pre~iminary DOS Manual Page 3-1 "'. SECTION 3 - THE ASSEMBLER CGC 790e Preliminary DOS Manual Page 3-2 CGC 7999 Preliminary DOS Manual Page 3-3 INTRODUCTION TO THE ASSEMBLER The Chromatics MC68099 resident assembler is used to produce source machine-readable object code from assembly language files. The assembler executes under the Chromatics Disk Operating System, described in Part I of this manual. The full MC68090 instruction set is supported by the assembler. In this manual, it is assumed that you understand the MC68990 processor architecture, as described in the Motorola MC68900 Userls Guide (available from Chromatics). The examples provided in this manual are intended only to demonstrate .proper syntax, and do not necessarily show useful programming techniques. It is assumed that you are familiar with basic techniques used in the CGC 79901 if not, consult the Userls Manual before attempting to use the assembler. operating CGC 7900 Page 3-4 Preliminary DOS Manual tGC 7999 ASSEMBLER COMMAND LINE FiQrmat: ASMB ["] ASMB ["] ["] RETURN ••• RETURN Where: ,, etc. are the names of source files to be assembled are characters which specify assembly options (see below) Yhe ASMB command invokes the file ASMB.SYS, the Chromatics resident assembler. The ASMB command must be entered at the DOS prompt, the green asterisk (*). ~C68999 The assembler expects its input files to be in ASCII Input files must have the secondary name .SRC. text form. The assembler produces an output file of type .SYS, which may directly executed by DOS. If you enter the command line be ASMB PROGRAM and press the RETURN key, the file PROGRAM.SRC would assembled and an output file named PROGRAM.SYS would produced. This .SYS file can be directly executed by typing name as a DOS command: PROGRAM be be its GC Preliminary DOS Manual 79"" Page 3-5 rhen the assembler closes its output .SYS file, any old .SYS :ile with the same name is KILLed. Thus, a program can be !dited, assembled, re-edited and re-assembled any number of :imes, but only the most recent version of the source and object :ode will be active on the disk. Several options are available to control the assembly and the output listing. The option field is indicated by the ·caratcharacter, The options may be entered in any order. A. C -C T -T L Close output file, producing an executable program file as output. Do not close output file. Type listing on prin~er (through Logical Output 1). Display listing on screen (through Logical Output "). Follow LIST/NOLST commands in source file. The listing is on until a NOLST is encountered. +L Force listing ON regardless of source file. -L Force listing OFF regardless of source file. The default conditions for options are C and L. If no options are specified, this will result in the output file being closed, listing on the 79"" screen, and listing being controlled by LIST or HOLST commands in the program source file. If you do not specify any options, you must not enter (A) • the carat Preliminary DOS Manual CGC 79"" All options are valid at the start of the command line, before the first file name . You may repeat any of the -Loptions prior to other files, in order to control listing of the various files indi~idually. Examples: ASMB TEST Assemble the file TEST, close output file, listing on the screen. Output file is named TEST.SYS. ASMB A_C TEST Assemble, list to screen, do not close output file. ASMB A_L TEST Assemble and close, no listing. ASMB AT-C+L TEST Assemble, list on printer, do not close output file, listing ON. ASMB AT_L TESTI A+L TEST2 The last example assembles the program which is contained in both files, TESTI and TEST2. The output file is clos~d, and is given the name TEST2.SYS. This file is created on the same drive which contained the file TEST2. Listing is supressed for file TESTI and is forced on for TEST2. (Options other than the -Lfamily would not be valid prior to TEST2.) ..... If a program is contained in more than one file, each have its own END statement. file must Preliminary DOS Manual :;C 79"" Page 3-7 SOURCE FILE FORMAT he text editor is used to create program source files, which re processed by the assembler. Source files have a secondary ame of .SRC, and are stored in ASCII text form. ~he general form of a line in the source file is: [ [] [] rhe four fields may be separated by spaces or tabs.


Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Create Date                     : 2017:09:08 10:35:38-08:00
Modify Date                     : 2017:09:08 10:46:53-07:00
Metadata Date                   : 2017:09:08 10:46:53-07:00
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:d3ef61b5-f5f0-5947-8a06-af274569dd21
Instance ID                     : uuid:6b783611-c0c8-3e4f-9baa-f9bc393510fb
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 212
EXIF Metadata provided by EXIF.tools

Navigation menu