Home
CBM
  ASCII-X
  BASIC
    Disk Commands
    Enter RUN mode
    Program Format
    Secret Variables
    Variable Format
    Expressions
    Keywords
      (divide)
      (equal)
      (less)
      (minus)
      (more)
      (multiply)
      (plus)
      (power)
      Abs
      And
      Append
      Asc
      Atn
      Auto
      Backup
      Bank
      Begin
      Bend
      Bload
      Boot
      Box
      Bsave
      Bump
      Catalog
      Char
      Chr
      Circle
      Close
      Clr
      Cmd
      Collect
      Collision
      Color
      Concat
      Cont
      Copy
      Cos
      Data
      Dclear
      Dclose
      Dec
      Def
      Delete
      Dim
      Directory
      Dispose
      Dload
      Do
      Dopen
      Draw
      Ds
      Ds string
      Dsave
      Dverify
      El
      Else
      End
      Envelope
      Er
      Err
      Exit
      Exp
      Fast
      Fetch
      Filter
      Fn
      For
      Fre
      Get
      Get num
      Getkey
      Go
      Gosub
      Goto
      Graphic
      Gshape
      Header
      Help
      Hex
      If
      Input
      Input num
      Instr
      Int
      Joy
      Key
      Left
      Len
      Let
      List
      Load
      Locate
      Log
      Loop
      Mid
      Monitor
      Movspr
      New
      Next
      Not
      Off
      On
      Open
      Or
      Paint
      Peek
      Pen
      Pi
      Play
      Pointer
      Poke
      Pos
      Pot
      Print
      Print num
      Pudef
      Quit
      Rclr
      Rdot
      Read
      Record
      Rem
      Rename
      Renumber
      Restore
      Resume
      Return
      Rgr
      Right
      Rlum
      Rnd
      Rreg
      Rspcolor
      Rsppos
      Rsprite
      Run
      Rwindow
      Save
      Scale
      Scnclr
      Scratch
      Sgn
      Sin
      Sleep
      Slow
      Sound
      Spc
      Sprcolor
      Sprdef
      Sprite
      Sprsav
      Sqr
      Sshape
      St
      Stash
      Step
      Stop
      Str
      Swap
      Sys
      Tab
      Tan
      Tempo
      Then
      Ti
      Ti string
      To
      Trap
      Troff
      Tron
      Until
      Using
      Usr
      Val
      Verify
      Vol
      Wait
      While
      Width
      Window
      Xor
    Syntax
    Tokens
  C128
  D64plus
  Disk
  Escape Codes
  Hardware
  PCxface
  PETSCII
  Pet2asc
Futurama
IBM PC-AT
Contact
Games
Glossary
Hall of fame
Hall of shame
Miscellaneous
Privacy policy
Programming
Twisty puzzles
KeywordAbbreviationToken (hex)Version(s)Classification
SCNCLRS{Shift+C}E83.5, 7.0Command and Statement
INSTRIN{Shift+S}E84.7Function

 
 Syntax  
SCNCLR mode ]
 
ParametersTypeLegal Value(s)Default ValueNote(s)
modeUnsigned Byte
  1. 40-column text
  2. *Hi-res bitmap
  3. *Hi-res bitmap & 40-column text
  4. *Multi-color bitmap
  5. *Multi-color bitmap & 40-column text
  6. **80-column text
RGR()* Bitmap must be allocated.
** V7.0 (C128) only
 
 
 Purpose 
Video initialization.  Clear one or more video screens.

 
 Remarks 
SCNCLR will clear one or more video screens.  SCNCLR is typically used for clearing a bitmap because it is often easier to use PRINT to clear only the text screen.  SCNCLR allows the same mode parameter as GRAPHIC, but the difference is that SCNCLR will not change the current video mode.  So you may for example, clear the bitmap while displaying a text screen (or vice-versa).  Also, a parameter is not required with SCNCLR.
 
If a supplied mode is an invalid expression, or if additional parameters are given, SYNTAX ERROR is generated.  If a supplied mode is not numeric, TYPE MISMATCH ERROR occurs; you may convert a string with VAL.  A floating-point mode will be converted automatically with INT.  If the result is not a Legal Value (see table above) then ILLEGAL QUANTITY ERROR occurs.  In particular, mode 5 is only legal for the C128 (v7.0).  If the result is legal and refers to a bitmap screen, but no bitmap has been allocated with GRAPHIC, then NO GRAPHICS AREA ERROR occurs.  By supplying mode you can clear one or two display screens at once (much like GRAPHIC with the clear option).
 
If mode is omitted, then RGR will be called to get the current video mode.  This can never generate an error.  On the C128 (v7.0), RGR may return a mode value greater than 5.  Although SCNCLR will not generate an error, you are not allowed to specify such numbers if you supply mode.  This is logically inconsistant.  Anyway, if the returned mode is greater than 5, the 80-column text screen will be cleared first, and then SCNCLR will procede as if you entered mode-5.  Because that may clear two screens (bitmap and 40-column text) and the 80-column screen has been cleared, it is possible to clear 3 screens with one command.  However, it is not possible to clear both 40 and 80 column text screens without also clearing a bitmap.  Note if RGR returns mode of 5 then only the 80-column text screen is cleared.
 
If the mode (supplied or calculated from RGR) refers to a split-screen mode, then the 40-column text cursor will be positioned at the top of the text portion of the split-screen, although the entire text screen (including the part hidden by the bitmap) is cleared.  If the mode is zero then the 40-column text cursor will be positioned at the top row.  If neither of these apply then the 40-column text cursor is not re-positioned.  If the mode is 5 or more, the 80-column text cursor will be positioned at the top row.  If the mode refers to a bitmap, then the pixel-cursor (see LOCATE) will be reset to 0,0.
 
Examples:
SCNCLR : REM clears the currently displayed screen(s)

READY.
SCNCLR 5 : REM clears 80-column text screen (not valid on all machines)

READY.
SCNCLR 0 : REM clears the 40-column text screen

READY.
SCNCLR 1 : REM clear the high-resolution bitmap

?NO GRAPHICS AREA ERROR
READY.
GRAPHIC 1: GRAPHIC 0: REM allocate bitmap, switch back to text mode

READY.
SCNCLR 1 : REM clear the high-resolution bitmap
READY.
 
 
 Compare With 
 
 Contrast With 
 See Also 

© H2Obsession, 2014