control character
From C64-Wiki
(Redirected from Control character)
Jump to navigationJump to searchA control character is one of 32 characters in the PETSCII code used on the C-64, which do not themselves cause any visible character to appear on the screen (or printer, plotter, or in a disk or tape file), but has some influence on how or where subsequent characters are to be printed.
Text screen control characters by PETSCII code[edit | edit source]
- 5/$05: Changes the text color to white.
- 8/$08: Disables changing the character set using the SHIFT + Commodore key combination.
- 9/$09: Enables changing the character set using the SHIFT + Commodore key combination.
- 13/$0D: Carriage return; next character will go in the first column of the following text line. As opposed to traditional ASCII-based system, no LINE FEED character needs to be sent in conjunction with this Carriage return character in the PETSCII system.
- 14/$0E: Select the lowercase/uppercase character set.
- 17/$11: Cursor down: Next character will be printed in subsequent column one text line further down the screen.
- 18/$12: Reverse on: Selects reverse video text.
- 19/$13: Home: Next character will be printed in the upper left-hand corner of the screen.
- 20/$14: Delete, or "backspace"; erases the previous character and moves the cursor one character position to the left.
- 28/$1C: Changes the text color to red.
- 29/$1D: Advances the cursor one character position without printing anything.
- 30/$1E: Changes the text color to green.
- 31/$1F: Changes the text color to blue.
- 129/$81: Changes the text color to orange.
- 141/$8D: Same action as Carriage return (13/$0D).
- 142/$8E: Select the uppercase/semigraphics character set.
- 144/$90: Changes the text color to black.
- 145/$91: Cursor up: Next character will be printed in subsequent column one text line further up the screen.
- 146/$92: Reverse off: De-selects reverse video text.
- 147/$93: Clears screen of any text, and causes the next character to be printed at the upper left-hand corner of the text screen.
- 148/$94: Insert: Makes room for extra characters at the current cursor position, by "pushing" existing characters at that position further to the right.
- 149/$95: Changes the text color to brown.
- 150/$96: Changes the text color to light red.
- 151/$97: Changes the text color to dark grey.
- 152/$98: Changes the text color to medium grey.
- 153/$99: Changes the text color to light green.
- 154/$9A: Changes the text color to light blue.
- 155/$9B: Changes the text color to light grey.
- 156/$9C: Changes the text color to purple.
- 157/$9D: Moves the cursor one character position backwards, without printing or deleting anything.
- 158/$9E: Changes the text color to yellow.
- 159/$9F: Changes the text color to cyan.
Table of Control Characters[edit | edit source]
ASCII | Character | Key combination | Description | Wiki-Syntax | VICE keys |
---|---|---|---|---|---|
147 | SHIFT +CLR/HOME | Clears screen | {clear} / {clr} | shift +home | |
19 | CLR/HOME or CTRL +S | Place cursor in top left corner | {home} | home or Tab +S | |
29 | CRSR ⇐ ⇒ | Cursor one step right | {cursor right}/{crsr right} | right | |
157 | SHIFT +CRSR ⇐ ⇒ | Cursor one step to the left | {cursor left}/{crsr left} | left | |
17 | CRSR ⇑ ⇓ or CTRL +Q | Cursor one position down | {cursor down}/{crsr down} | down or Tab +Q | |
145 | SHIFT +CRSR ⇑ ⇓ | Cursor one position up | {cursor up}/{crsr up} | up | |
144 | CTRL +1 | Character color black | {blk} / {black} | tab +1 | |
5 | CTRL +2 or CTRL +E | Character color white | {wht} / {white} | tab +2 or Tab +E | |
28 | CTRL +3 | Character color red | {red} | tab +3 | |
159 | CTRL +4 | Character color cyan | {cyn} / {cyan} | tab +4 | |
156 | CTRL +5 | Character color purple | {pur} / {purple} | tab +5 | |
30 | CTRL +6 | Character color green | {grn} / {green} | tab +6 | |
31 | CTRL +7 | Character color blue | {blu} / {blue} | tab +7 | |
158 | CTRL +8 | Character color yellow | {yel} / {yellow} | tab +8 | |
18 | CTRL +9 or CTRL +R | Reverse ON | {rvs on} | Tab +9 or Tab +R | |
146 | CTRL +0 | Reverse OFF | {rvs off} | Tab +0 | |
129 | C= +1 | Character color orange | {orange} | CTRL +1 | |
149 | C= +2 | Character color brown | {brown} | CTRL +2 | |
150 | C= +3 | Character color pink | {pink} / {light-red} | CTRL +3 | |
151 | C= +4 | Character color grey 1 / dark grey | {gray1} / {darkgrey} | CTRL +4 | |
152 | C= +5 | Character color grey 2 | {grey} | CTRL +5 | |
153 | C= +6 | Character color light green | {lightgreen} | CTRL +6 | |
154 | C= +7 | Character color light blue | {lightblue} | CTRL +7 | |
155 | C= +8 | Character color grey 3 / light grey | {grey3} / {lightgrey} | CTRL +8 | |
133 | F1 | To use for input with GET | {f1} | f1 | |
134 | F3 | To use for input with GET | {f3} | f3 | |
135 | F5 | To use for input with GET | {f5} | f5 | |
136 | F7 | To use for input with GET | {f7} | f7 | |
137 | SHIFT +F1 | To use for input with GET | {f2} | f2 or shift +f1 | |
138 | SHIFT +F3 | To use for input with GET | {f4} | f4 or shift +f3 | |
139 | SHIFT +F5 | To use for input with GET | {f6} | f6 or shift +f5 | |
140 | SHIFT +F7 | To use for input with GET | {f8} | f8 or shift +f7 | |
20 | INST/DEL or CTRL +T | Erases character left of cursor. | {del} | Backspace | |
148 | SHIFT + INST/DEL | Move characters to the right to insert character. | {inst} | Shift +Backspace | |
3 | RUN/STOP * or CTRL +C | Uset by GET query if RUN/STOP has been deactivated | {run/stop} | esc | |
8 | CTRL +H | Deactivates case change SHIFT +C= | {<shift>+<c=> off} / {ctrl+h} | Tab +h | |
9 | CTRL +I | Activates case change SHIFT +C= | {<shift>+<c=> on} / {ctrl+i} | Tab +i | |
13 | RETURN or CTRL +M | Return to enter data (exists no control character) |
{return} | enter / Tab +M | |
14 | CTRL +N | Mixed case | {ctrl+n} | tab +n | |
142 | None direct; Control character: Ctrl +9 +SHIFT +N |
Upper case + graphical characters | {ctrl+/} | Control character: tab +9 +shift +n | |
32 | SPACE | Empty character | {space} | space | |
141 | SHIFT +RETURN Control character: Ctrl +9 +SHIFT +M |
New row | {shift return} | shift +enter Control character: tab +9 +shift +m |
Some characters in the table above do not perform any action, but are still listed:
- The characters of the Function Keys can be interpreted as freely programmable control characters.
- SPACE keycharacter is used as the fill character in insert mode.
Extract of the ASCII-table of the Commodore 64[edit | edit source]
- the numbers 0 until 9 conform the ASCII-Codes 48 until 57
- the letters A bis Z conform the ASCII-Codes 65 until 90
- the char !conform the ASCII-Code 33
- the char " conform the ASCII-Code 34
- the char # conform the ASCII-Code 35
- the char $ conform the ASCII-Code 36
- the char % conform the ASCII-Code 37
- the char & conform the ASCII-Code 38
- the char ' conform the ASCII-Code 39
- the char ( conform the ASCII-Code 40
- the char ) conform the ASCII-Code 41
- the char * conform the ASCII-Code 42
- the char + conform the ASCII-Code 43
- the char , conform the ASCII-Code 44
- the char - conform the ASCII-Code 45
- the char . conform the ASCII-Code 46
- the char / conform the ASCII-Code 47
- the char : conform the ASCII-Code 58
- the char ; conform the ASCII-Code 59
- the char < conform the ASCII-Code 60
- the char = conform the ASCII-Code 61
- the char > conform the ASCII-Code 62
- the char ? conform the ASCII-Code 63
- the char @ conform the ASCII-Code 64
- the char [ conform the ASCII-Code 91
- the char £ conform the ASCII-Code 92
- the char ] conform the ASCII-Code 93
- the char "arrow up" conform the ASCII-Code 94
- the char "arrow left" conform the ASCII-Code 95
- The F-keys F1 until F8 conform the ASCII-Codes 133 until 140
- <RETURN> (Enter) conform the ASCII-Code 13
- <SPACE> (empty key) conform the ASCII-Code 32 or 160 (safty space)
- <SHIFT>+<RETURN> (Enter) conform the ASCII-Code 141
- <CRSR DOWN> (cursor down) conform the ASCII-Code 17
- <CRSR RIGHT> (cursor right) conform the ASCII-Code 29
- <CRSR UP> (cursor up) conform the ASCII-Code 145
- <CRSR LEFT> (cursor left) conform the ASCII-Code 157
- small-/big letters (characterset 2) activated conform the ASCII-Code 14
- Grossschreibung (characterset 1) activated conform the ASCII-Code 142
- <RVS ON>, Reverse On conform the ASCII-Code 18
- <RVS OFF>, Reverse Off conform the ASCII-Code 146
- <HOME> (cursor to the position left, up) conform the ASCII-Code 19
- <CLR HOME> (clear screen) conform the ASCII-Code 147
- <INST DEL> (Insertmode on) conform the ASCII-Code 20
- <INST DEL> (Insertmode off) conform the ASCII-Code 148
- <WHT>, White conform the ASCII-Code 5
- <RED>, Red conform the den ASCII-Code 28
- <GRN>, Green conform the ASCII-Code 30
- <BLU>, Blue conform the ASCII-Code 31
- <BLK>, Black conform the ASCII-Code 144
- <PUR>, Purpur conform the ASCII-Code 156
- <YEL>, Yellow conform the ASCII-Code 158
- <CYN>, Cyan conform the ASCII-Code 159
- <orange> conform the ASCII-Code 129
- <brown> conform the ASCII-Code 149
- <lt.red>, light red conform the ASCII-Code 150
- <grey 1>, dark-grey conform the ASCII-Code 152
- <grey 2> conform the ASCII-Code 151
- <lt.green>, light green conform the ASCII-Code 153
- <lt.blue>, light blue, conform the ASCII-Code 154
- <grey 3>, light grey conform the ASCII-Code 155
- The other chars are special character, whereas
Codes 192-233 = Codes 96-127
Codes 224-254 = Codes 160-190
- The char "Pi" conform the ASCII-Code 126 and 255