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

System Specification for C65Fred BowenMarch 1, 1991

Loops may be nested. if too many are nested, an 'OUT OF MEMORY' error is reported (depends upon stack size, room for about 28 nested loops).

The index variable can be omitted from the NEXT statement, in which case the NEXT will apply to the most recent FOR statement". If a NEXT statement is encountered and there is no preceeding FOR statement, the error 'NEXT WITHOUT FOR' is reported.

             10 FOR L = 1 TO 10
             20 PRINT L
             30 NEXT L
             40 PRINT "I'M DONE! L = "L

This program prints the numbers from one to ten, followed by the message I'M DONE! L = 11.

             10 FOR L = 1 TO 100
             20 FOR A = 5 TO 11 STEP .5
             30 NEXT A
             40 NEXT L

This program illustrates a nested loop.

FOREGROUND - Set the text color of the display

    FOREGROUND color

Sets the text co lor to the given.color index. Color must be in the range (0-15). See the Color Table. COLOR must be ON (see the COLOR command).

FRE - Free byte function

    FRE (x)

This function returns the number of available ("free") bytes in a specified area.

        PRINT FRE(0)    Shows the amount of memory left in the program area,
                        C64DX bank 0

        X = FRE (1)     X= the amount of avaliable memory in variable area,
                        C64DX bank 1. This causes a "garbage collect" to
                        occur, a process which compacts the string area.

        X = FRE (2)     X= the number of expansion RAM banks present.

GCOPY - Copy a graphic area

    GCOPY x,y,dx,dy

[*** NOT YET IMPLEMENTED ***]

GENLOCK - Enable or disable video sync mode & colors

    GENLOCK ON  [,color#]...
    GENLOCK OFF [,color#,R,G,B]...

To enable video sync mode and specify which colors are affected, use the GENLOCK ON command, and list the palette color indices (0-255) which will display external video.

To disable video sync mode and restore the associated palette colors, use the GENLOCK OFF command, and list the color index and its RGB values to restore them (see the SET PALETTE command for details). Also see the PALETTE RESTORE command.


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