Commodore 64 PETSCII codes

PETSCII code
(dec, hex)
Character
(up/gfx, lo/up)
PETSCII code
(dec, hex)
Character
(up/gfx, lo/up)
PETSCII code
(dec, hex)
Character
(up/gfx, lo/up)
PETSCII code
(dec, hex)
Character
(up/gfx, lo/up)
0$00 64$40@128$80 192$C0
1$01 65$41Aa129$81orange193$C1A
2$02 66$42Bb130$82 194$C2B
3$03Stop67$43Cc131$83Run195$C3C
4$04 68$44Dd132$84 196$C4D
5$05white69$45Ee133$85F1197$C5E
6$06 70$46Ff134$86F3198$C6F
7$07 71$47Gg135$87F5199$C7G
8$08disable C=-Shift72$48Hh136$88F7200$C8H
9$09enable C=-Shift73$49Ii137$89F2201$C9I
10$0A 74$4AJj138$8AF4202$CAJ
11$0B 75$4BKk139$8BF6203$CBK
12$0C 76$4CLl140$8CF8204$CCL
13$0DReturn77$4DMm141$8DShift-Return205$CDM
14$0Elo/up charset78$4ENn142$8Eup/gfx charset206$CEN
15$0F 79$4FOo143$8F 207$CFO
16$10 80$50Pp144$90black208$D0P
17$11cursor down81$51Qq145$91cursor up209$D1Q
18$12reverse on82$52Rr146$92reverse off210$D2R
19$13Home83$53Ss147$93Clear211$D3S
20$14Delete84$54Tt148$94Insert212$D4T
21$15 85$55Uu149$95brown213$D5U
22$16 86$56Vv150$96pink214$D6V
23$17 87$57Ww151$97dark grey215$D7W
24$18 88$58Xx152$98grey216$D8X
25$19 89$59Yy153$99light green217$D9Y
26$1A 90$5AZz154$9Alight blue218$DAZ
27$1B 91$5B[155$9Blight grey219$DB
28$1Cred92$5Cpound156$9Cpurple220$DC
29$1Dcursor right93$5D]157$9Dcursor left221$DD
30$1Egreen94$5Eup arrow158$9Eyellow222$DE
31$1Fblue95$5Fleft arrow159$9Fcyan223$DF
32$20Space96$60160$A0Shift-Space224$E0
33$21!97$61161$A1225$E1
34$22"98$62162$A2226$E2
35$23#99$63163$A3227$E3
36$24$100$64164$A4228$E4
37$25%101$65165$A5229$E5
38$26&102$66166$A6230$E6
39$27'103$67167$A7231$E7
40$28(104$68168$A8232$E8
41$29)105$69169$A9233$E9
42$2A*106$6A170$AA234$EA
43$2B+107$6B171$AB235$EB
44$2C,108$6C172$AC236$EC
45$2D-109$6D173$AD237$ED
46$2E.110$6E174$AE238$EE
47$2F/111$6F175$AF239$EF
48$300112$70176$B0240$F0
49$311113$71177$B1241$F1
50$322114$72178$B2242$F2
51$333115$73179$B3243$F3
52$344116$74180$B4244$F4
53$355117$75181$B5245$F5
54$366118$76182$B6246$F6
55$377119$77183$B7247$F7
56$388120$78184$B8248$F8
57$399121$79185$B9249$F9
58$3A:122$7A186$BA250$FA
59$3B;123$7B187$BB251$FB
60$3C<124$7C188$BC252$FC
61$3D=125$7D189$BD253$FD
62$3E>126$7E190$BE254$FE
63$3F?127$7F191$BF255$FF

Notes:

  1. Codes $00-$1F and $80-$9F are control codes. Printing them will cause a change in screen layout or behavior, not an actual character displayed.

  2. Codes $60-$7F and $E0-$FE are not used. Although you can print them, these are, actually, copies of codes $C0-$DF and $A0-$BE.

  3. Code $FF is the BASIC token of the π (pi) symbol. It is converted internally to code $DE when printed and, vice versa, code $DE is converted to $FF when fetched from the screen. However, when reading the keyboard buffer, you will find code $DE for Shift-↑ (up arrow) as no conversion takes place there yet.