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

System Specification for C65Fred BowenMarch 1, 1991

DMODE - Set graphic display mode

    DMODE   jam, comp, inverse, stencil, style, thickness

[*** THIS COMMAND IS SUBJECT TO CHANGE ***]

    jam             0-1
    complement      0-1
    inverse         0-1
    stencil         0-1
    style           0-3
    thickness       1-8

DO/LOOP/WHILE/UNTIL/EXIT - Program loop definition and control

    DO [UNTIL boolean-expression | WHILE boolean-expression]
                .
                .      statements [EXIT]
                .
    
    LOOP [UNTIL boolean_expression | WHILE boolean-expression]

Performs the statements between the DO statement and the LOOP statement. If no UNTIL or WHILE modifies either the DO or the LOOP statement, execution of the intervening statements continues indefinitely. If an EXIT statement is encountered in the body of a DO loop, execution is transferred to the first statement following the nearest LOOP statement. Do loops may be nested, following the rules defined for FOR-NEXT loops. If the UNTIL parameter is used, the program continues looping until the boolean argument is satisfied (becomes true). The WHILE parameter is basically the opposite of the UNTIL parameter: the program continues looping as long as the boolean argument is TRUE. An example of a boolean argument is A=1, or G>65.

            DO UNTIL X=0 or X=1                     This loop will continue
                    : statements                    until X=O or X=l. If
            LOOP                                    X=0 or 1 at beginning,
                                                    the loop won't execute.
    
    10  A$="": DO GETKEY A$: LOOP UNTIL A$="0"      This will loop until
                                                    the user types 'Q'
    
    10  DOPEN#1,"FILE"                              This program will
    20  C=0                                         count the number of
    30  DO: LINEINPUT#1,A$: C=C+1: LOOP UNTIL ST    lines in FILE
    40  DCLOSE#l
    50  PRINT"FILE CONTAINS";C;" LINES."

DOPEN - Open a disk file

    DOPEN#lf, "filename[,<S|P>]" [,L(reclen)] [,W] [,Ddrive] [<ON|,>Udevice]

This command OPENs a file on disk for reading or writing. Lf is the logical file number, which you will use in PRINT#, INPUT#, GET#, RECORD#, and DCLOSE# commands to reference the channel to your file. The filename is required. The defaults are to OPEN a SEQuential file for Reading, in which case the file must exist or a 'FILE NOT FOUND' error results. To create an file and write to it, use the 'W'rite option. 'FILE EXISTS' error is report if an output file already exists. To read or write a RELative file, use the 'L'ength option. The 'reclen' record length is required only when creating a relative file. For more information regarding Relative files, see the RECORD command and refer to your DOS manual. See also APPEND.

See the OPEN command for a discussion about channel and device numbers.


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