[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

System Specification for C65Fred BowenMarch 1, 1991

from the earliest DATA statement in the program to.the last DATA statement in the program.

The list of constants can contain both numeric data (integer or floating point) and string data, but cannot contain expressions which must be evaluated (such as 1+2, DEC("1234"), or CHR$(13)). Items are separated by commas. String data need not be enclosed in quotes unless it contains certain characters, such as spaces, commas, colons, graphic characters, or control codes. If two commands have nothing between them, the data will be READ as 0 if numeric or a null string.

The RESTORE command allows you to position BASIC's data pointer to a specific line number. If the program tries to read more DATA than exists in the program, an 'OUT OF DATA' error results. If a READ statement's variable type does not agree with the DATA being read, a 'TYPE MISMATCH' error results.

    DATA 100, 200, FRED, "HELLO, MOM", , 3.14, ABC123, -1.7E-9

DCLEAR - Clear all open channels on disk drive

                     DCLEAR  [Ddrive]  [<ON|,>Udevice]

DCLEAR sends the indicated disk drive an 'I'nitialize command. This clears all open channels, closes all open files, and causes the DOS to re-read the diskette's Block Allocation MAP (BAM). Note that DCLEAR DOES NOT close open channels on the computer's side (see the DCLOSE command). There are some other side affects caused by this command with different types of drives- refer the DOS manual for your disk drive for specific details.

DCLOSE - Close a disk file, or close all channels on a device

    DCLOSE [#logical_file_nuber] [<ON|,>Udevice]

DCLOSE is intended to close a file opened with the DOPEN command. Specific files can be closed by specifying a logical file number, or all files on a particular drive can be closed by Fot specifying a particular logical-file number.

It is possible to close channels on non-disk devices with this command by specifying only the device number.

    DCLOSE#1                   Closes the file associated with logical
                               logical file number 1.
    DCLOSE                     Closes all files currently open on the
                               default system drive.
    DCLOSE U(U2)               Closes all channels open to device U2.

DEC - Decimal value function

                              DEC (hex-string)

This function return the decimal value of a string representing a hexadecimal number in the range "0000" to "FFFF". The result is in the range 0-65535., If the string contains a non-hexadecimal digit or is more than four (4) characters in length an 'ILLEGAL QUANTITY' error is reported.

    VIC = DEC("DOOO")           Result is VIC=53248,
                                the address of the VIC chip


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated April 07, 2006.