SCNCLR

From C64-Wiki
Jump to navigationJump to search
BASIC keyword
Keyword: SCNCLR
Abbreviation: S Shift+C
Type: Command
Token code: $e8 (232)
Handling routine
in BASIC ROM:
List of all BASIC keywords


Remark: This article describes the BASIC function HEX$ in in Commodore BASIC V3.5 or higher.

Type: Command
General Programming-Syntax: SCNCLR [<n>]

The instruction SCNCLR clears the current screen in any graphic or text mode, and places the cursor at the top of the text area (in graphics mode the pixel cursor is set to the position 0, 0 accordingly).

  • For C16/116 and Plus/4, SCNCLR can only be used without mode specification n!
  • In the C128, the n mode can take the following values:
    • 0 : Clears the 40-character text screen.
    • 1 : Clears the high-resolution graphics screen.
    • 2 : Deletes the high-resolution split text graphics screen.
    • 3 : Clears the Multicolour graphics screen.
    • 4 : Clears the split multi-colour text screen.
    • 5 : Clears the 80-character text screen.

The BASIC error message ?NO GRAPHICS AREA ERROR appears when a screen is cleared that has not yet been used (e.g. the corresponding graphics mode was not yet in use).
If the value of the numerical parameter is outside the above possibilities, the error message ?ILLEGAL QUANTITY ERROR appears.
If there are more arguments than allowed, the error message ?SYNTAX ERROR appears, but with the side effect that the delete action (for the C128 according to the 1st parameter, if error-free possible) is still executed beforehand!


Examples[edit | edit source]

SCNCLR 

Deletes the text or graphic screen on a C16/116 and Plus/4.


BASIC V3.5 Commands

ABS | ASC | ATN | AUTO | BACKUP | BOX | CHAR | CHR$ | CIRCLE | CLOSE | CLR | CMD | COLLECT | COLOR | CONT | COPY | COS | DATA | DEC | DEF | DELETE | DIM | DIRECTORY | DLOAD | DO | DRAW | DS | DS$ | DSAVE | END | EL | ELSE | ER | ERR$ | EXIT | EXP | FN | FOR | FRE | GET | GET# | GETKEY | GOSUB | GOTO | GRAPHIC | GSHAPE | HEADER | HELP | HEX$ | IF | INPUT | INPUT# | INSTR | INT | JOY | KEY | LEFT$ | LEN | LET | LIST | LOAD | LOCATE | LOG | LOOP | MID$ | MONITOR | NEW | NEXT | ON | OPEN | PAINT | PEEK | POKE | POS | PRINT | PRINT USING | PRINT# | PUDEF | RCLR | RDOT | READ | REM | RENAME | RENUMBER | RESTORE | RESUME | RETURN | RGR | RIGHT$ | RLUM | RND | RUN | SAVE | SCALE | SCNCLR | SCRATCH | SGN | SIN | SOUND | SPC | SQR | SSHAPE | STOP | STR$ | SYS | TAB | TAN | TRAP | TROFF | TRON | UNTIL | USR | VAL | VERIFY | VOL | WHILE | WAIT