Home
CBM
  ASCII-X
  BASIC
  C128
  D64plus
  Disk
  Escape Codes
  Hardware
  PCxface
  PETSCII
  Pet2asc
Futurama
IBM PC-AT
Contact
Games
Glossary
Hall of fame
Hall of shame
Miscellaneous
Privacy policy
Programming
Twisty puzzles
Most of the CBM 8-bit computers come with two character sets.  One of them has been referred to as the uppercase/graphics character set, and it is usally the default set.  It does not have any lower-case letters!  See the ASCII-X page for details on that one.  The alternate characterset (which has upper and lower case, but fewer graphic symbols) was typically called lowercase/uppercase (or dual-case) character set, back in the day.  I don't know when it started, but more recently it has been given the name PETSCII, in honor of the PET computer (the first serious CBM 8-bit), and standing for the PET Standard Code for Information Interchange.
 
Like many computers, PETSCII extends the 7-bit ASCII definition to 8-bits.  In theory this would double the number of characters from 128 to 256 (on most other computers it in fact does).  In reality, PETSCII only adds 64 characters (32 graphics and 32 control codes).  The other 64 are duplicates of the existing characters.  This is related to the fact that most CBM 8-bits can't generate reverse fonts in hardware, so half of the 256 font characters are reverse images of the other half.  So 128 normal characters, plus 64 control codes (which may appear as reverse-font characters) equals 192 "characters".  The remaining 256-192=64 are duplicates in the PETSCII code.
 
Note the computer (at least BASIC and the KERNAL) use the same codes regardless of which character set the user chooses for display.  This can make things confusing.  Many official publications and magazine articles from back in the day just use the term ASCII without referring to the character set in use; in this case you should be skeptical.  I would assume they refer to ASCII-X if they did not specifically mention the other (lowercase/uppercase) character set; if they did mention lower-case characters, I would infer the PETSCII set.
 
So here is a table listing the decimal and hexidecimal values of PETSCII, the character itself (Glyph), and the ASCII and Unicode equivalants, if they exist.  Some of the codes do not normally print a character, but peform an action.  These are shown under Glyph with a description and the reverse-font character that may appear in some circumstances (so-called quote mode and insert mode).  Otherwise, the glyph is only present if it has a Unicode value, although some browsers may not render them correctly (may appear as a blank, or square box, or ?).  There are also notes that describe the action of some codes, a keyboard combination to generate it, and/or a description of some characters.  There are some difference in the layouts of the CBM machines, but they are mostly equivalant.  The descriptions for keyboard shortcuts are based on the VIC-20/C64/C128.  I've also broken the table up into blocks to hopefully highlight the structure of this character set, although some things just seem to defy logic. 
 
Block 0, Low Control Codes
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
000@ null0 NULU+0000key: Control+@
101a nop  key: Control+A; ASCII SOH
202b underline on (c128)  key: Control+B; ASCII STX
303c nop  key: Control+C; ASCII ETX
404d nop  key: Control+D; ASCII EOT
505e white  key: Control+E; ASCII ENQ
606f nop  key: Control+F; ASCII ACK
707g bell7 BEL key: Control+G
808h char lock on  key: Control+H; ASCII BS; Not C128: see code 11
909i char lock off
tab (c128)
9 HTU+0009key: Control+I, TAB; For C128 char-lock, see code 12
100Aj line feed (C128)10 LFU+000Akey: Control+J; See also code 17
110Bk char lock on (C128)  key: Control+K; ASCII VT
120Cl char lock off (C128)  key: Control+L; ASCII FF
130Dm carriage return13 CRU+000Dkey: Control+M, Return, Enter; See also code 141
140En go PETSCII  key: Control+N, Shift+C=; ASCII SO; See also code 142
150Fo flash on (C128)  key: Control+O; ASCII SI; For C16 or Plus/4, see code 130
1610p nop  key: Control+P; ASCII DLE
1711q cursor down10 LFU+000Akey: Control+Q, CRSR ⇕, ⇩ ASCII DC1; See also 29, 145, 157
1812r reverse on  key: Control+R, Control+9; ASCII DC2
1913s home  key: Control+S, HOME; ASCII DC3
2014t delete8 BSU+0008key: Control+T, DEL; ASCII DC4
2115u nop  key: Control+U; ASCII NAK
2216v nop  key: Control+V; ASCII SYN
2317w nop  key: Control+W; ASCII ETB
2418x toggle Tab stop (C128)  key: Control+X, Shift+Tab; ASCII CAN
2519y nop  key: Control+Y; ASCII EM
261Az nop  key: Control+Z; ASCII SUB
271B[ escape (C128)27 ESCU+001Bkey: Control+[, ESC
281C£ red  key: Control+3, Control+£; ASCII FS
291D] cursor right  key: Control+], CRSR ⇔, ⇨; ASCII GS
301E green  key: Control+6, Control+↑; ASCII RS
311F blue  key: Control+7, Control+←; ASCII US
 
Block 1, Numbers and Punctuation
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
3220
32 SPU+0020key: Spacebar
3321!33U+0021key: Shift+1
3422"34U+0022key: Shift+2
3523#35U+0023key: Shift+3
3624$36U+0024key: Shift+4
3725%37U+0025key: Shift+5
3826&38U+0026key: Shift+6
3927'39U+0027key: Shift+7
4028(40U+0028key: Shift+8
4129)41U+0029key: Shift+9
422A*42U+002A 
432B+43U+002B 
442C,44U+002C 
452D-45U+002D 
462E.46U+002E 
472F/47U+002F 
4830048U+0030 
4931149U+0031 
5032250U+0032 
5133351U+0033 
5234452U+0034 
5335553U+0035 
5436654U+0036 
5537755U+0037 
5638856U+0038 
5739957U+0039 
583A:58U+003A 
593B;59U+003B 
603C<60U+003Ckey: Shift+,
613D=61U+003D 
623E>62U+003Ekey: Shift+.
633F?63U+003Fkey: Shift+/
 
Block 2, Lowercase Letters
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
6440@64U+0040 
6541a97U+0061 
6642b98U+0062 
6743c99U+0063 
6844d100U+0064 
6945e101U+0065 
7046f102U+0066 
7147g103U+0067 
7248h104U+0068 
7349i105U+0069 
744Aj106U+006A 
754Bk107U+006B 
764Cl108U+006C 
774Dm109U+006D 
784En110U+006E 
794Fo111U+006F 
8050p112U+0070 
8151q113U+0071 
8252r114U+0072 
8353s115U+0073 
8454t116U+0074 
8555u117U+0075 
8656v118U+0076 
8757w119U+0077 
8858x120U+0078 
8959y121U+0079 
905Az122U+007A 
915B[91U+005Bkey: Shift+:
925C£ U+00A3ASCII \
935D]93U+005D 
945E94U+2191ASCII ^; On C16 and Plus/4, key: Shift+0
955F U+2190ASCII _
 
Block 3, Uppercase Letters (Alternate)
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
9660 U+2500key: Shift+*; Horizontal bar at Y 5/8 (VIC-II/TED centered thick bar)
9761A65U+0041key: Shift+A
9862B66U+0042key: Shift+B
9963C67U+0043key: Shift+C
10064D68U+0044key: Shift+D
10165E69U+0045key: Shift+E
10266F70U+0046key: Shift+F
10367G71U+0047key: Shift+G
10468H72U+0048key: Shift+H
10569I73U+0049key: Shift+I
1066AJ74U+004Akey: Shift+J
1076BK75U+004Bkey: Shift+K
1086CL76U+004Ckey: Shift+L
1096DM77U+004Dkey: Shift+M
1106EN78U+004Ekey: Shift+N
1116FO79U+004Fkey: Shift+O
11270P80U+0050key: Shift+P
11371Q81U+0051key: Shift+Q
11472R82U+0052key: Shift+R
11573S83U+0053key: Shift+S
11674T84U+0054key: Shift+T
11775U85U+0055key: Shift+U
11876V86U+0056key: Shift+V
11977W87U+0057key: Shift+W
12078X88U+0058key: Shift+X
12179Y89U+0059key: Shift+Y
1227AZ90U+005Akey: Shift+Z
1237B U+253Ckey: Shift++; Cross, similar to "+"
1247C (left half) U+25A6 (left half)key: C=+-; Diaganol cross-hatch (left half)
1257D124U+2502key: Shift+-; Vertical bar at X 5/8 (VIC-II/TED centered thick bar)
1267E (not π) reversed U+25A9key: C=+^ or Shift+^; Reversed diaganol cross-hatch
1277F U+25A7key: C=+*; Upper left to lower right fill
 
Block 4, High Control Codes
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
12880 nop  key: ???
12981A orange (most)
dark purple (VDC)
  key: C=+1
13082B underline off (c128)
flash on (Plus/4)
  key: Control+, (Plus/4)
13183C function 9  key: Shift+STOP
13284D function 10 (c128)
flash off (Plus/4)
  key: HELP (C128), Control+. (Plus/4)
13385E function 1  key: F1
13486F function 3  key: F3
13587G function 5  key: F5
13688H function 7  key: F7
13789I function 2  key: F2
1388AJ function 4  key: F4
1398BK function 6  key: F6
1408CL function 8  key: F8
1418DM carriage return13 CRU+000Dkey: Shift+Return (ignored by BASIC); See also code 13
1428EN go ASCII-X  key: Shift+C=; See also code 14
1438FO flash off (C128)  key: ???; For C16 or Plus/4, see 132
14490P black  key: Control+1
14591Q cursor up  key: Shift+CRSR ⇕, ⇧; See also 17, 29, 157
14692R reverse off  key: Control+0
14793S clear screen  key: Shift+HOME
14894T insert  key: Shift+DEL
14995U brown  key: C=+2
15096V light red  key: C=+3
15197W dark gray (VIC-II)
dark cyan (VDC)
  key: C=+4
15298X med. gray (VIC-II)
dark gray (VDC)
  key: C=+5
15399Y light green  key: C=+6
1549AZ light blue  key: C=+7
1559B light gray  key: C=+8
1569C? purple (magenta)  key: Control+5
1579D cursor left  key: Shift+CRSR ⇔, ⇨; See also 17, 29, 145
1589E yellow  key: Control+8
1599F cyan  key: Control+4
 
Block 5, Common Graphics (Primary)
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
160A0 32 SPU+00A0key: Shift+Spacebar; non-breaking space
161A1 U+258Ckey: C=+K; right half block
162A2 U+2584key: C=+I; bottom half block
163A3 U+2594key: C=+T; top 1/8 block
164A4 U+2581key: C=+@; bottom 1/8 block
165A5 U+258Fkey: C=+G; left 1/8 block (2/8 block on VIC-II and TED)
166A6 U+25A9key: C=++; diaganol cross-hatch
167A7 U+2595key: C=+M; right 1/8 block (2/8 block on VIC-II and TED)
168A8? U+???key: C=+£; bottom half cross-hatch
169A9 (not a triangle!) U+25A8key: Shift+£; lower left to upper right fill
170AA reverse U+258Akey: C=+N; right 2/8 block (reverse Unicode left 6/8)
171AB U+251Ckey: C=+Q; East-pointing "T"
172AC U+2597key: C=+D; bottom right block
173AD U+2514key: C=+Z; corner up and right
174AE U+2510key: C=+S; corner down and left
175AF U+2582key: C=+P; bottom 2/8 block
176B0 U+250Ckey: C=+A; corner down and right
177B1 U+2534key: C=+E; North-pointing "T"
178B2 U+252Ckey: C=+R; South-pointing "T"
179B3 U+2524key: C=+W; West-pointing "T"
180B4 U+258Ekey: C=+H; left 2/8 block
181B5 U+258Dkey: C=+J; left 3/8 block
182B6 reverse U+258Bkey: C=+L; right 3/8 block (reverse Unicode left 5/8)
183B7 reverse U+2586key: C=+Y; top 2/8 block (reverse Unicode bottom 6/8)
184B8 reverse U+2585key: C=+Y; top 3/8 block (reverse Unicode bottom 5/8)
185B9 U+2583key: C=+O; bottom 3/8 block
186BA or  U+2713 or U+221Akey: Shift+@; a check mark or square root
187BB U+2596key: C=+F; bottom left block
188BC U+259Dkey: C=+C; top right block
189BD U+2518key: C=+X; corner up and left
190BE U+2598key: C=+V; top left block
191BF U+259Akey: C=+B; top left and bottom right blocks
 
Block 6, Uppercase Letters (Primary)
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
192C0 U+2500key: Shift+*; Horizontal bar at Y 5/8 (VIC-II/TED centered thick bar)
193C1A65U+0041key: Shift+A
194C2B66U+0042key: Shift+B
195C3C67U+0043key: Shift+C
196C4D68U+0044key: Shift+D
197C5E69U+0045key: Shift+E
198C6F70U+0046key: Shift+F
199C7G71U+0047key: Shift+G
200C8H72U+0048key: Shift+H
201C9I73U+0049key: Shift+I
202CAJ74U+004Akey: Shift+J
203CBK75U+004Bkey: Shift+K
204CCL76U+004Ckey: Shift+L
205CDM77U+004Dkey: Shift+M
206CEN78U+004Ekey: Shift+N
207CFO79U+004Fkey: Shift+O
208D0P80U+0050key: Shift+P
209D1Q81U+0051key: Shift+Q
210D2R82U+0052key: Shift+R
211D3S83U+0053key: Shift+S
212D4T84U+0054key: Shift+T
213D5U85U+0055key: Shift+U
214D6V86U+0056key: Shift+V
215D7W87U+0057key: Shift+W
216D8X88U+0058key: Shift+X
217D9Y89U+0059key: Shift+Y
218DAZ90U+005Akey: Shift+Z
219DB U+253Ckey: Shift++; Cross, similar to "+"
220DC (left half) U+25A6 (left half)key: C=+-; Diaganol cross-hatch (left half)
221DD124U+2502key: Shift+-; Vertical bar at X 5/8 (VIC-II/TED centered thick bar)
222DE (not π) reversed U+25A9key: C=+^ or Shift+^; Reversed diaganol cross-hatch
223DF (not a triangle!) U+25A7key: C=+*; Upper left to lower right fill
 
Block 7, Common Graphics (Alternate)
CodeGlyph ASCIIUnicodeNote(s)
Dec.Hex
224E0 32 SPU+00A0key: Shift+Spacebar; non-breaking space
225E1 U+258Ckey: C=+K; right half block
226E2 U+2584key: C=+I; bottom half block
227E3 U+2594key: C=+T; top 1/8 block
228E4 U+2581key: C=+@; bottom 1/8 block
229E5 U+258Fkey: C=+G; left 1/8 block (2/8 block on VIC-II and TED)
230E6 U+25A9key: C=++; diaganol cross-hatch
231E7 U+2595key: C=+M; right 1/8 block (2/8 block on VIC-II and TED)
232E8? U+???key: C=+£; bottom half cross-hatch
233E9 (not a triangle!) U+25A8key: Shift+£; lower left to upper right fill
234EA reverse U+258Akey: C=+N; right 2/8 block (reverse Unicode left 6/8)
235EB U+251Ckey: C=+Q; East-pointing "T"
236EC U+2597key: C=+D; bottom right block
237ED U+2514key: C=+Z; corner up and right
238EE U+2510key: C=+S; corner down and left
239EF U+2582key: C=+P; bottom 2/8 block
240F0 U+250Ckey: C=+A; corner down and right
241F1 U+2534key: C=+E; North-pointing "T"
242F2 U+252Ckey: C=+R; South-pointing "T"
243F3 U+2524key: C=+W; West-pointing "T"
244F4 U+258Ekey: C=+H; left 2/8 block
245F5 U+258Dkey: C=+J; left 3/8 block
246F6 reverse U+258Bkey: C=+L; right 3/8 block (reverse Unicode left 5/8)
247F7 reverse U+2586key: C=+Y; top 2/8 block (reverse Unicode bottom 6/8)
248F8 reverse U+2585key: C=+Y; top 3/8 block (reverse Unicode bottom 5/8)
249F9 U+2583key: C=+O; bottom 3/8 block
250FA or  U+2713 or U+221Akey: Shift+@; a check mark or square root
251FB U+2596key: C=+F; bottom left block
252FC U+259Dkey: C=+C; top right block
253FD U+2518key: C=+X; corner up and left
254FE U+2598key: C=+V; top left block
255FF (not π nor ▚) reversed U+25A9key: C=+^ or Shift+^; Reversed diaganol cross-hatch
 

© H2Obsession, 2014, 2015, 2016