SCREEN
Initializes and/or configures a video mode; multiple platform-dependant options. May also be used as function which returns the character or color at given coordinates
Implemented by: colorext, GWBASIC, MSX, ABasiC, msamiga, VBDOS, FreeBASIC
With variations: TI994 (through CALL; only sets color), QBasic (also as a function), ugBASIC (also with subcommands COLUMNS, HEIGHT, HORIZONTAL SCROLL, OFF, ON, ROWS, SWAP, TILES HEIGHT, TILES WIDTH, VERTICAL SCROLL, WIDTH)
Also written as:
Usage
SCREEN is found in some Microsoft-based BASICs from the 8-bit era onwards as a statement to initialize various text or graphic modes. Apart from that brief common definition, there is little in common among its implementations due to hardware capabilities.
Let's start with a syntax comparison. Optional parameters between [ and ]:
SCREEN mode, colorset
in Extended Color BASICSCREEN mode [,colordepth] [,startline]
in Amiga ABasiCSCREEN id, cols, lins, colorbits, mode
in msamigaSCREEN mode [,bolColor] [,activepage] [,visiblepage]
in the MS-QuickBASIC familySCREEN mode [,spritesize] [,bolKeyclick] [,casspeed] [,prntype]
in MSX BASIC
Extended Color BASIC
SCREEN mode, colorset
- mode - 0 for text, 1 for graphics
- colorset
- 0 - green, blue, yellow, red
- 1 - cyan, magenta, orange, buff (light ocre)
MSX
SCREEN mode [,spritesize] [,bolKeyclick] [,casspeed] [,prntype]''
- mode
- 0 - basic text mode, 40x24 (6-bit wide character box)
- 1 - text mode, 32x24 (8-bit wide character box)
- 2 - high-resolution graphics: 256x192, 16 colors
- 3 - low-resolution graphics: 64x48, 16 colors
- spritesize
- 0 - 8x8
- 1 - 8x8 expanded
- 2 - 16x16
- 3 - 16x16 expanded
- bolKeyClick - 0 turns off click sound when key is pressed; 1 turns this sound on
- casspeed - 1 for 1200 characters per second; 2 for 2400 characters per second
- prntype - seems to depend on implementation, but 0 for an ASCII-based national standard, 1 for MSX's standard
Variations
The MS-QuickBASIC family allows the usage of SCREEN as a function that returns the character code or the color currently found at given line and column of a text-mode screen. The optional third parameter, if 0 (default), means the character ASCII code will be returned; any other value causes the foreground color code to be returned.
Examples
Comments
Related keywords
Similar keywords
In other languages...
References
- Getting Started with Extended Color BASIC. Tandy Corp., 1984