Table of Contents

TEXTAT

PET VIC-20 C64 C16 Plus/4 C128 X16 M65

The TEXTAT command outputs a string at the given X and Y position of the currently selected screen without affecting the cursor position.

Syntax

TEXTAT <x_pos>, <y_pos>, <text> [, <color>]

Warning

The runtime library will not check if the X and Y values are within the screen boundaries. Providing wrong values will lead to writing to memory locations outside the screen memory, thus potentially damaging the program or data. Use it with care.

Note

Color values between 8 and 15 will set the character to multicolor mode on the Commodore VIC-20.

Warning

TEXTAT writes screen codes directly to screen memory, rather than calling the KERNAL character output routine. For this reason PETSCII control caracters (color, cursor movement, etc.) will have no effect on the printed text.

Examples

REM output "welcome" near the center of the screen
TEXTAT 16, 12, "welcome"
REM output "hello" in the top left corner of the screen, in yellow
TEXTAT 0, 0, "hello", 7

See Also