Commodore 64 screen code to PETSCII code conversion

Screen code
(dec, hex)
Change
(dec, hex)
PETSCII code
(dec, hex)
0-31$00-$1F+64$4064-95$40-$5F
32-63$20-$3F0$0032-63$20-$3F
64-93$40-$5D+128$80192-221$C0-$DD
94$5E 255$FF
95$5F+128$80223$DF
96-127$60-$7F+64$40160-191$A0-$BF
128-159$80-$9F-128$800-31$00-$1F
160-191$A0-$BF-128$8032-63$20-$3F
192-223$C0-$DF-64$C0128-159$80-$9F
224-254$E0-$FE-64$C0160-191$A0-$BF

Notes:

  1. PETSCII code $5E belongs to the π (pi) symbol. It is converted internally to the the BASIC token $FF when fetched from the screen.