[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
@C
) The Clear Screen, Cursor Home command works in any video mode. It clears the screen and moves the cursor to the top left (0,0) position.
In text mode (Cogsys mode 0), the screen is cleared by writing spaces
to all positions. In Mode 1, zero (black) is written to all pixels. In
Mode 2, however, the screen is set to the color specified by the contents
of the Cogsys variable COGVAR_CLEARCOLOR
, which is variable number
, by default. All Cogsys variables are
set to zero initially; so the default Mode 2 behavior is to create a
black screen.
@C
@C
COGVAR_CLEARCOLOR
.
The cursor is moved to the top left of the screen.
@C
only worked in text mode, and the now now-obsolete
#H
command was used to clear the video modes. Cursor positioning with #H
was mode dependent--in 256-color modes (what is now called Mode 2, then Mode 101), the
cursor was homed. In other modes, it was not.
Thus, references to the #H
in 256 color modes should be replaced with
@C
. References to #H
in other graphics modes should be
replaced with @R
.
@C
1000 times in text mode
Press return to home cursor: #R@CTop of screen!
%M2$AV=10@C
COGVAR_CLEARCOLOR
variable to 10,
which is the standard palette index (A. Standard Palette) to green. The @C
clears the screen
to green, and homes the cursor.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |