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

System Specification for C65Fred BowenMarch 1, 1991

CHR$ - Character string function

                                CHR$ (value)

This function returns a string of one character having the PETSCII value specified. This function is the opposite of the ASC function. it's often used in PRINT strings to output data that is not visible, such as control codes and escape sequences. Refer to the Table of PETSCII Character Codes.

    PRINT CHR$(27)"Q';          CHR$(27) is the escape character.
                                This statement performs the
                                clear-to-end-of-line escape function.

CIRCLE - Draw a circle on a graphic screen

                 CIRCLE x_center, y_center, radius [,solid]

The CIRCLE command will draw a circle with the given radius centered at (x_center,y_center) on the current graphic screen. The circle will be filled if SOLID is non-zero.

    CIRCLE 160,100,50

The above example will draw a circle in the center of a 320x2OO pixel screen (160,100) having a radius of 50 pixels. The aspect ratio of the screen may cause it to appear as an ellipse, however. See also the ELLIPSE command.

CLOSE - Close a logical 1/0 channel

                        CLOSE logical_channel_number

This command closes the input/output channel associated with the given logical Y channel number, established by an OPEN statement. In the case o buffered output (such as the serial bus or RS232) any data in the device's buffer will be transmitted before the channel is closed. Refer to specific I/O operations for details.

The logical channel number is required; to close all channels on a given device, use the DCLOSE command. Note that RUN, NEW, and CLR commands will initialize the logical channel tables but will not actually close any channels.

CLR - Clear program variables

                                    CLR

This statement initializes BASIC's variable list, setting all numeric variables to zero and string variables to null. It also initializes the DATA pointer, BASIC runtime stack pointer (i.e., clears all GOSUBs, DO/LOOPs, FOR/NEXT loops, etc.), and clears any user functions (DEF FNx). Any OPEN channels are forgotten (but a CLOSE is not performed- don't use if there are any open disk output files). A CLeaR is automatically performed by a RUN or a NEW command.

CMD - Set default output channel

                    CMD logical-channel-number [,string]

CMD changes the default output device, normally the screen, to that specified. The logical-channel-number can be any previously OPENed


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