home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
ref
/
ba01h.do
< prev
next >
Wrap
Text File
|
2006-10-19
|
9KB
|
215 lines
Title: CASSETTE (CAS)
All files are the result of digitized input, at one time or another. Files
are written-to, and read-from. Reading from a file is non-destructive,
whereas writing to a file may be destructive. Destructiveness depends on
whether the process of writing to a file is replacing the given file's current
contents, or appending to those contents.
Files stored on cassette are more permanent than those stored in RAM. Any
serious loss of power, corruptive power surge, or uncontrolled process may
damage, or eliminate the contents of files stored in RAM. It is imperative
that this last statement be understood. The practice of writing the contents
of RAM files to a less electrically active storage media, like cassette tape,
is highly recommended.
Cassette (CAS) filenames consist of a string of one to six characters, the
first of which is a letter. There is no need for an extension. However,
files saved in ASCII (.DO files, or BASIC programs saved with the A attribute)
may be loaded directly into the TEXT program, or transmitted out either the
serial or modem ports via the TELCOM program.
The Model 100 computer was originally designed to use a cassette player, and
tape, as its primary storage media. After the introduction of the Model 100,
Tandy introduced the Disk Video Interface, a unit incorporating 1, or 2, 5.25
inch disk drives, and monitor. Then, they brought out the the Tandy Portable
Disk Drive, in two versions (TPDD 1, 100K bytes per disk, and TPDD 2, 200K
bytes per disk) - both units uss the new 3.5 inch disks. During this same
time, a company called Holmes Engineering built, and sold, through the
Portable Computer Support Group (PCSG), a disk drive called the "Chipmunk."
In all cases, disk drives need additional programming to allow the Model 100
to use them as a storage device. This additional program is called a Disk
Operating System (pronounced DOS, as in the, "wizard of Oz"). Fortunately,
the manufacturers of the disk drives include a DOS. Unfortunately, with the
exception of the DVI and the Chipmunk, the TPDD series may not be access
directly from BASIC or TEXT, unless one uses one of several 3rd party DOSes,
i.e TS-DOS by Traveling Software, Power-DOS by Acroatix, Disk Power by
UltraSoft Inovations, or the public domain program called Disk Manager
(DSKMGR). In these later cases, commands for loading, or saving to the
CAS:filename may be modified to read 0:filename.
Lastly, the TPDD drives may not be accessed while using the modem via the
TELCOM program because they [the TPDD drives] connect to the serial port.
Both the modem and the serial port are controlled by a UART (universal
asychronous receiver transmitter). The UART can control only one device at a
time, not both. However, it is possible, for qualified electrical tinkerers
only, to add an additional UART to their Model 100, dedicating each UART to a
given device, thus allowing for drive access while using the modem. Adding a
second UART will void the warranty.
CLOAD"filename"
Clears the current BASIC program and loads a BASIC program from cassette
tape. R, if present, tells BASIC to run the program after it is loaded.
CLOAD?"filename"
Compares the cassette file filename with the BASIC program currently in
memory. If there are any differences, BASIC displays the message "verify
failed" on the screen; otherwise, BASIC simply prints OK.
CLOADM"filename"
Loads the machine-language program called filename from cassette tape into
memory, at the address used when is was written to the cassette tape.
CLOSEfilenumberlist
Closes the files OPEN'ed as filenumber.
CSAVE"filename",A
Stores the current BASIC program on cassette tape as filename. A, if
present, tells BASIC to save the program in ASCII format. If omitted, BASIC
stores the program in a compressed binary form, also known as tokenized.
CSAVEM"filename",startaddress,endaddress,entryaddress
Writes the machine-language program stored from startaddress to endaddress
with the entryaddress onto cassette tape, under the name filename.
EOF(filenumber)
Tests for an end-of-file condition on the cassette file OPEN'ed as
filenumber. The function returns a "logical" answer, either "true" (-1) if
you have reached the end of the file, or else "false" (0) if you have not
reached the end of the file.
INPUT#filenumber,variablelist
Inputs data sequentially from the cassette file OPEN'ed as filenumber.
INPUT$(numericexpression,filenumber)
Returns a string of a length given by numericexpression from the cassette
file OPEN'ed as filenumber.
LINEINPUT#filenumber,stringvariable
Reads a line of text into stringvalue from device named as filenumber.
LOAD"CAS:filename",R
Loads a BASIC program from cassette. If R is present, BASIC runs the program
after it has been loaded.
LOADM"CAS:filename"
Loads the machine-language program filename from cassette at the address
specified when it was saved.
MAXFILES
Stores the current maximum number of files. You may access MAXFILES line any
numeric variable.
MERGE"CAS:filename"
Merges the lines from the ASCII formatted cassette file called filename with
the lines of the current program.
MOTORONorOFF
Starts or stops cassette player motor.
OPEN"CAS:filename"FORmodeASfilenumber
Allocates a buffer, filenumber, for a cassette file called filename. Mode
can be OUTPUT, specifying data will be written sequentially to the file,
starting at the beginning of the file, INPUT, specifying data will be read
sequentially from the file, starting at the beginning of the file, or APPEND,
specifying that data will be written sequentially to the file, adding records
to the end of the file.
PRINT#filenumber,expressionlist
Writes the values of expressionlist to the cassette file OPEN'ed as
filenumber.
PRINT#filenumber,USING"format";expressionlist
Formats the data in expressionlist and sends it to a cassette file OPEN'ed
as filenumber. Format consists of one of more of the following "field
specifiers":
Prints first string character.
PRINT#1,USING"!";"Tandy"
Prints 2+n characters from a string.
PRINT#1,USING"\\";"Tandy"
Print one digit for each #.
PRINT#1,USING"#####";5
Inserts the algebraic sign of the number.
PRINT#1,USING"+####";-13
Inserts a minus sign either at the beginning or end of negative numbers.
PRINT#1,USING"-####";14
Converts leading blanks to leading asterisk blanks.
PRINT#1,USING"**#####";145
Inserts a dollar sign to the immediate left of the formatted number.
PRINT#1,USING"$$#####";450
Changes leading spaces to asterisks except for the space to the immediate left
of the number, where is inserts a dollar sign.
PRINT#1,USING"**$###";12
Inserts a decimal point.
PRINT#1,USING"#####.##";14.5
Inserts a comma before every three printed digits to the left of the decimal
point.
PRINT#1,USING"#########,";14432
Prints the number in exponential format.
PRINT#1,USING"###.##^^^^";342200
RUN"CAS:filename",R
Clears all variables, loads the BASIC program called filename from cassette,
and then executes the program. If R is present, BASIC keeps all open files
open. If R is omitted, BASIC closes all open file before loading filename.
RUNM"CAS:filename"
Loads and executes the machine-language program stored as filename. The
program must be one executable from the menu, not a BASIC subroutine. In
addition, when the program is loaded, BASIC closes all open files.
SAVE:CAS:filename",A
Writes the current BASIC program to the cassette file called filename. A is
optional; if used, BASIC saves the file in ASCII format. Otherwise BASIC
saves the file in a compressed binary format (also called tokenized) If
filename already exists on cassette, BASIC writes over the old file.
SAVEM"CAS:filename",startaddress,endaddress,entryaddress
Writes the machine-language program stored from startaddress to endaddress
onto cassette, under the name filename. Entryaddress is optional; if not
present, then BASIC assumes that the program entryaddress is the same as the
startaddress.
TAB(numericexpression)
Writes numericexpression spaces before writing the next data item.
Numericexpression spaces between 0 and 255.
<EOF>