The Commodore 64
From Maze
(Difference between revisions)
(Made the keyboard map section a sidebar, starting to modify hidden code) | (Added a screenshot of the color-shifted version) | ||
| Line 77: | Line 77: | ||
Even before a user begins typing 10-Print into their Commodore 64, it has set an aspect of the environment that will greatly effect the program's output: the default text and background colors of the Commodore 64. While these defaults can be overridden easily enough – text colors in BASIC on the Commodore 64 are printable characters so adding PRINT CHR$(30), for example, would make the text green; background colors are similarly changeable using POKE – the original 10-Print program outputs using the pre-existing conditions of the environment. | Even before a user begins typing 10-Print into their Commodore 64, it has set an aspect of the environment that will greatly effect the program's output: the default text and background colors of the Commodore 64. While these defaults can be overridden easily enough – text colors in BASIC on the Commodore 64 are printable characters so adding PRINT CHR$(30), for example, would make the text green; background colors are similarly changeable using POKE – the original 10-Print program outputs using the pre-existing conditions of the environment. | ||
| − | How can the assumption be changed? Add a few lines that set the text and background colors: | + | How can the assumption be changed? Add a pair of lines that set the text and background colors: |
<pre>5 PRINT CHR$(30) | <pre>5 PRINT CHR$(30) | ||
6 POKE 53281, 0 | 6 POKE 53281, 0 | ||
10 PRINT CHR$(205.5+RND(1)); | 10 PRINT CHR$(205.5+RND(1)); | ||
20 GOTO 10</pre> | 20 GOTO 10</pre> | ||
| + | |||
| + | [[File:10print-colors.gif|600px|thumb|center|10-Print with the colors changed]] | ||
===Screen grid=== | ===Screen grid=== | ||
| Line 93: | Line 95: | ||
Modified version: Not possible in text mode | Modified version: Not possible in text mode | ||
| − | |||
| − | |||
===Cursor=== | ===Cursor=== | ||
