2

The CHAR command in Commodore BASIC 7.0 on the Commodore 128 allows printing a text at a given position on the screen. Other than the PRINT command, CHAR also works in Hires graphics mode. Since the Commodore 128 has multiple character maps, how can I tell CHAR to print using the uppercase/lowercase charset? Changing the charset with CHAR$(14) in textmode does not seem to affect the behavior of CHAR.

4

The normal method of changing between the uppercase/graphics character set and the lowercase character set on the Commdore 128 is by printing the control characters, like so:

PRINT CHR$(142):REM SELECT UPPERCASE, or,

PRINT CHR$(14):REM SELECT LOWERCASE

The same control characters will also work in your BASIC programs that use a bitmap screen mode and the CHAR command to print text on the screen. Just combine the appropriate CHR$(x) control code with the string that you are printing, like so:

10 GRAPHIC 1,1
20 CHAR 0,10,20,CHR$(14)+"HELLO, LOWERCASE WORLD!",0

This will print the text near the bottom of the 40-column screen in lowercase characters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.