Call Box Commands
Version 2.0 15 Jan-90


CALL SC the SCREEN commands

There are 4 commands that control the super hi-res screen. This screen is graphics port #0 at $El/2000. You can either enable or disable the screen, change it to a specified color or set its mode.

CALL SC works closely with CALL SB for example: If you want to set the screen to 640 mode graphics you must set the mode and set the scan line control bytes ...

CALL SC,2,640 : CALL SB,0,!10000000,0,200

or to set the screen for 320 mode ...

CALL SC,2,320 : CALL SB,0,!00000000,0,200

Note: SCB's are represented in binary, this is not necessary ... only convienient. SCB's are actually bit flags and binary representation makes the bits easier to see.

COMMAND FUNCTION DESCRIPTION
CALL SC,O SCREEN OFF: Changes the screen from super hires to text.
CALL SC,1 SCREEN ON: Changes the screen from text to super hi-res.
CALL SC,2,(mode) SCREEN MODE: Sets the screen mode to either 320 or 640.
CALL SC,3,(colorword) SCREEN COLOR: Clears the screen to the color specified in the colorword.


(mode)
Must be 320 or 640 only. All other values are invalid and will return an error.

( colorword)
A colorword is a value anywhere from 0 to 65535. There are only 16 solid colors in that range ... all the rest are dithers. Specifying a colorword in hex is the easiest because the 16 values are in straight numeric order:

$0000 solid #0   $4444 solid #4   $8888 solid #8    $CCCC solid #12   
$1111 solid #1   $5555 solid #5   $9999 solid #9    $DDDD solid #13   
$2222 solid #3   $6666 solid #6   $AAAA solid #10   $EEEE solid #14   
$3333 solid #4   $7777 solid #7   $BBBB solid #11   $FFFF solid #15
Figure 2.15 Solid colorwords