KEMBAR78
Color Computer Disk System - Quick Reference Guide (Tandy) | PDF | Computer File | Data Buffer
0% found this document useful (0 votes)
96 views14 pages

Color Computer Disk System - Quick Reference Guide (Tandy)

Uploaded by

manonpiano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views14 pages

Color Computer Disk System - Quick Reference Guide (Tandy)

Uploaded by

manonpiano
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

TANDY®*

Color
COlllllllter

Disk System

* TRADEMARKS OF TANDY CORPORATION


Color computer Disk BASIC
Quick Reference Guide:
Copyright 1987, InterTAN Canada Ltd.,
Barrie (Ontario)
All Rights Reserved.

Reproduction or use, without express written permis-


sion from Tandy Corporation, of any portion of this
manual, is prohibited. While reasonable efforts have
been taken in the preparation of this manual to as-
sure its accuracy, Tandy Corporation assumes no lia-
bility resulting from any errors in or omissions from
this manual, or from the use of the information con-
tained herein.
Color Computer
Disk BASIC

Quick
Reference
Guide
Introduction
Once you connect a floppy disk drive to your Color Com-
puter, you automatically start up in Disk BASIC whenever
you turn on the computer. You can verify that you have
properly connected your disk interface cartridge and disk
drive by looking at the screen. If everything is connected
properly, the screen displays the DISK EXTENDED
COLOR BASIC copyright message. If it is not, the screen
displays the EXTENDED COLOR BASIC message.

This guide summarizes the commands you can use while


in Disk BASIC. It also lists error messages you might
receive.
Disk BASIC Commands
BACKUP source drive TO destination drive
Duplicates the contents of the disk in the source drive
on the disk in the destination drive. If you have only
one drive, specify it as the source drive.
BACKUP 0 TO 1 BACKUP 0

CLOSE # buffer, ...


Closes communication to the buffers specified. If you
omit the buffer, the computer closes all open files.
CLOSE#1 CLOSE#1,#2

COPY "fllename1" TO "fllename2"


Copies the contents of filename 1 to filename2. Each
filename must include an extension.
COPY "FILE/BAS" TO "NEWFILE/BAS"
COPY "ORG/DAT:0" TO "ORG/DAT:1"

CVN(strlng variable)
Converts a 5-byte coded string (created by MKN$)
back to the number it represents.
X=CVN(A$)

DIR drive number


Displays a directory of the disk in the drive you specify.
DIR0 DIR
Sample display:
MYPROG BAS 0 B 3
YOURPROG BAS 0 A 1
HERDATA OAT 1 A 5
USPROG BIN 2 B 2
From left to right, the columns contain:
• The filename
• The extension

°
The file type
= BASIC program
1 = BASIC data file
2 = machine-language file
3 = editor source file
• The storage format
A = ASCII, B = binary
• The length of the file, in granules

DOS
With the OS-9 system diskette in Drive 0, the DOS
command boots the OS-9 operating system.
DOS

3
Disk BASIC Commands

DRIVE drive number


Changes the default drive to the drive you specify.
If you do not use the DRIVE command, the computer
uses Drive 0 as the default.
DRIVE 1

DSKI$ drive number, track, sector, string variable 1,


string variable2
Inputs data from a particular sector within a particu-
lar track on the disk in the drive you specify.
DSKU 0,12,3, MS, NS

DSKINI drive number


Formats a disk in the drive you specify. Executing this
command erases memory:
DISKINI0 DISKINI1

DSKO$ drive number, track, sector, string1, string2


Writes string data on the sector, track, and drive num-
ber you specify.
!lSKOS 0,2,1, "FIRST DATA,"
"SECOND DATA"

EOF(buffer)
Returns a value of 0 if there is more data to read in
the buffer and a value of -1 if there is no more data in it.
IF EOF(1) = -1 THEN CLOSE 111

FIELD #buffer, field size AS field name,...


Organizes the space within a direct access buffer into
fields. Specify the size and name of each field.
FIELD 111,10 AS AS, 12 AS BS, 5 AS CS

FILES number of buffers, size


Tells the computer the number of buffers to reserve
in memory, and the total number of bytes (size) to
reserve for these buffers. If you do not specify the size,
the computer reserves a total of 256 bytes.
FILES1,1000 FILES 5

FREE (drive number)


Returns the number of free granules on the disk in
the drive you specify.
PRINT FREE (0)

GET # buffer, record number


Gets the next record or the record you specify, and
puts it in the buffer.
GETII1,5 GETII2,3

4
Disk BASIC Commands

INPUT #buffer, variable name, ...


Inputs data from the buffer you specify, and assigns
each data item in the. buffer to the variable name you
specify.
INPUT #1, AS, BS

KILL "filename"
Deletes the filename you specify from the disk direc-
tory. You must include the extension with the filename.
KILL "FILE/BAS" KILL "FILE/DAT:1"

LINE INPUT # buffer, data


Inputs a line (all data up to the ENTER character) from
the buffer you specify.
LINE INPUT #1, XS

LOAD "filename",·R
Loads the specified BASIC program file into memory
from disk. If you include the R, the computer runs the
program immediately after loading it.
LOAD "PROGRAM", R
LOAD "ACCTS/BAS: 1"

LOADM "filename", offset address


Loads the specified machine language program file
from disk. You can specify an offset address to add
to the program's loading address.
LOADM "PROG/BIN", 3522

LOC(buffer)
Returns the current record number of the buffer you
specify.
PRINT LOC(n

LOF(buffer)
Returns the highest-numbered record of the buffer you
specify.
FOR R = 1 TO LOF(1)

LSET field name = data


Left-justifies the data within the field you specify.
LSET AS="BANANAS" LSET BS';TS

MERGE "filename", R
Loads the specified program file from disk, and
merges it with the program that exists in memory. If
you include the R, the computer runs the program
immediately after merging it.
MERGE "SUB/BAS" MERGE "NEW", R

5
Disk BASIC Commands

MKN$(number)
Converts the specified number to a 5-byte coded
string, for storage in a formatted disk file.
lSET BS = MKNS(536789111l)

OPEN "mode", #buffer, "filename", record length


Opens a buffer that transfers data to and from a par-
ticular device. If you don't specify the record length,
the computer uses 256 bytes.
Mode Allows
I Data input from a sequential access
file.
o Data output to a sequential access file.
D Data transfer to or from a direct access
file.
Buffer Communicates With
-2 The printer.
- 1 The tape recorder.
o The screen or printer. (It is not neces-
sary to open this buffer.)
1 -1 5 The disk drives.

OPEN "0", #1, "FILE", 15


OPEN "I", #2, "CHGE/oAT"

PRINT #buffer, data list


Prints the data to the buffer. Use a comma or a semi-
colon to separate each item in the list.
PRINT #1, "DATA"

6
Disk BASIC Commands

PRINT # buffer, USING format; data list


Prints the data to the buffer, using the format you
specify. The format is a string; enclose it in quotation
marks.
The format commands are:
# Holds a space for one digit.
Prints a decimal point.
Prints a comma immediately preceding
every third digit (counting to the left from
the decimal point).
Fills leading spaces with asterisks.
$ Prints a leading dollar sign.
$$ Prints a floating dollar sign.
+ Prints the sign of the number. To print
the sign in front of the number, place
the plus sign at the beginning of the for-
mat string. To print the sign following
the number, place the plus sign at the
end of the format string.
Prints the number in exponential format.
Prints a minus sign after the number if
the number is negative. This command
does not print a sign if the number is
positive. Place the minus sign at the
right end of the format string.
! Prints the first character of the string.
%spaces% Sets the field for the string. The length
of the field is the number of spaces pluo
2.

PRINT #1, USING "##.#"i 53.76


PRINT #2, USING "**$#.##-"i-3.678
PRINT #1, USING "!"i "WHITE"

PUT #buffer, record number


Assigns a record number to the data in the buffer you
specify. If you do not specify a record number, the
computer assigns it to the current record.
PUT #2. 3 PUT #1. 4

RENAME "old filename" TO "new filename"


Renames a disk file. You must specify the extension
of both filenames.
RENAME "MFILE/DAT:1"
TO "BFILE/DAT:1"

RSET field name = data


Right-justifies the data within the field you specify.
RSET M$ = "SOAP"

7
Disk BASIC Commands

RUN "filename", R
Loads filename from disk, and runs it. If you include
the R, all open files remain open.
RUN "FILE"· RUN "PROG/BAS"'-R

SAVE "filename", A
Saves filename on disk. By using the A option, you
save the program in ASCII format.
SAVE "PROG/BAS" SAVE "TEST:1", A

SAVEM "filename", first address, second address,


third address
Saves filename, a machine-language program resid-
ing in the memory location that begins at first address
and ends at second address. The third address is the
execution address.
SAVEM "FILE/BIN:1", &H5200,
&H5800, &H5300

UNLOAD drive number


Closes any open files on the disk in the drive you
specify. If you do not specify a drive number, the com-
puter uses Drive 0 (or the drive you specified in the
DRIVE command).
UNLOAD 0 UNLOAD

VERIFY ON VERIFY OFF


Turns the verify function on or off. When VERIFY is
on, the computer verifies all writes to the disk.
VERIFY ON

WRITE # buffer, data list


Writes the data to the buffer you specify. Use a comma
to separate each data item in the list.
WRITE #1, AS, BS, C

8
Error Messages
Error No. Description
10 Division by zero
AE 33 File already exists
AO Attempt to open a data file that is already open
BR 27 Bad record number
BS Bad subscript
CN Cannot continue
DO Attempt to redimension an array
OF 28 Disk full
ON Drive number or device number error
OS Direct statement
ER 37 Write or input past end of record (direct access
only)
FC Illegal function call
FD Bad file data
FM Bad file mode
FN 31 Bad filename
FO 34 Field overflow
FS 32 Bad file structure
HP High-resolution print error (Color Computer 3
only)
HR High-resolution graphics error (Color Computer
3 only)
10 Illegal direct statement
IE Input past end of file
10 Input/output error
LS String too long
NE 26 Cannot find the disk file
NF NEXT without FOR
NO File not open
OB 29 Out of buffer space
00 Out of data
OM Out of memory
OS Out of string space
OV Overflow
RG RETURN without GOSUB
SE 35 Set to non-fielded string
SN Syntax error
ST String formula too complex
TM Type mismatch
UL Undefined line
VF 36 Verification
WP 30 Write-protected disk

9
CUSTOM MANUFACTURED FOR
RADIO SHACK DIVISION, InterTAN CANADA LTD.
BARRIE, ONTARIO. L4M 4WS

8A? Printed in Korea


Cat. No. 26-3133 811019890A

You might also like