background image

Here are some sample program segments which use the above commands:

Example program 1 — writing data

10 OPEN1,1,1,"TEST FILE"

20 FORX=1T010
30 PRINTS 1,X
40 NEXT
50 CLOSE1

Line 10 OPENs file 1 for WRITE as TEST FILE.
Line 20 Do everything between "FOR"&"NEXT" 10 times.
Line 30 PRINTS the variable 1 on to the tape.

Line 40 Goes back to line 20 for 10 times.
Line 50 CLOSES the file.

Example program 2 — reading data using INPUT

10 OPEN1,1,0,'TEST FILE"

20 INPUT#1,D$
30 PRINT D$

40 IFST=OGOT020

50 CLOSE 1

Line 10 OPENS the file for READ as TEST FILE.
Line 20 Reads a string from the tape into D$.
Line 30 Prints the value of D$ on the screen.
Line 40 Checks the status of the cassette. If the tape is OK then GOTO line 20.
Line 50 CLOSES the file.

Example program 3 — reading data using GET

10 OPEN1,1,0,'TEST FILE"

20GET#,1,D$
30 PRINT D$
40 IFST=OGOT020
50 CLOSE1

Line 10 OPENS the file for READ as TEST FILE.
Line 20 GETs a character into D$.
Line 30 Prints the character in variable D$ on the screen.
Line 40 Checks the status of the cassette. If the tape is OK then GOTO line 20.

Line 50 CLOSES the file.

Summary of Contents for 1531 Datassette

Page 1: ......

Page 2: ...INTERFERENCE IN A RESIDENTIAL INSTALLATION HOWEVER THERE IS NO GUAR ANTEE THAT INTERFERENCE WILL NOT OCCUR IN A PARTICULAR INSTALLATION IF THIS EQUIPMENT DOES CAUSE INTERFERENCE TO RADIO OR TELEVISIO...

Page 3: ...ce for storing and recalling computer programs on ordinary cassette tapes It can be used for saving programs you have written and want to recall for later use It can also be used to read pre recorded...

Page 4: ...and the DATASSETTE communicate through the cord as well TURN OFF THE COMPUTER BEFORE CONNECTING THE DATASSETTE TO IT ForCOMMODOREcomputerusers The COMMODORE 1531 DATASSETTE was designed for use on th...

Page 5: ......

Page 6: ...hecks which are described below STEP 1 Turn off the computer and plug in the DATASSETTE STEP 2 Ensure that the DATASSETTE motor is off by checking that all of the function keys are up If any are not p...

Page 7: ...button The tape heads should remain in the inactive position and the supply spindle should move rapidly clockwise STEP 7 Press STOP again and then F FWD The tape heads should still remain in the inac...

Page 8: ......

Page 9: ......

Page 10: ......

Page 11: ...ay be used in emergency but is not recommended for long term use NOTE Do not use trichloroethane or any other plastic or rubber solvent 2 Cotton swabs 3 Tape head demagnetizer Unit must have protectiv...

Page 12: ...TTE heads STEP 5 Slowly move demagnetizer up to RECORD PLAY head and around on head surface Rate of motion should be approximately one inch per second during this time STEP 6 Slowly move demagnetizer...

Page 13: ......

Page 14: ...o skip through a tape in order to SAVE a new program at the end of other programs The technique to use is described here When you are ready to store the new program that is in your computer give the c...

Page 15: ...se the counter to find a SAVEd program quickly 1 Make sure your tape is rewound to the beginning 2 Reset the counter to 000 by pressing the black button beside the 3 digit display 3 Note the counter n...

Page 16: ...ecifies whether the program will WRITE to or READ from this file coded as follows if C 0 read from tape C 1 write to tape with an End Of File marker to be written when the file is CLOSED C 2 write to...

Page 17: ...logical file 5 Data will be read from the cassette and assigned to the variable A GET is an alternative to INPUT GET will get one character letter at a time GET can read commas colons etc whereas INPU...

Page 18: ...E 20 INPUT 1 D 30 PRINT D 40 IFST OGOT020 50 CLOSE 1 Line 10 OPENS the file for READ as TEST FILE Line 20 Reads a string from the tape into D Line 30 Prints the value of D on the screen Line 40 Checks...

Page 19: ...MS If you are experiencing problems with your DATASSETTE either mechanically or electronically return it to the dealer from whom it was purchased If the DATASSETTE is faulty and in warranty he will re...

Page 20: ......

Reviews: