CBM ASCII, also called PET ASCII or PETSCII, is an eight- bit comprehensive special form of ASCII standards, which found use in all Commodore 8- bit home computers of the company and was adapted to the requirements of these devices.
PET ASCII based on the 1963 version of ASCII, not on the 1967 version used by almost all other ASCII -based computers. This manifests itself among other things in the characters " up arrow " and " left arrow " and in which only upper-case, lower-case letters as in ASCII 1963 were not provided.
There are two modes, one with capital letters and graphic symbols, and one with upper and lower case letters. In the second mode, the positions of the upper and lower case letters are reversed and moved the capital letters to higher codes so that each capital letter is concluded to lowercase code by addition of 128 compared to the ASCII character set. There were major changes in the transition from BASIC Commodore PET 2001 Commodore Basic V2 then just what As for the encoding of lowercase and uppercase letters.
Sub-block diagram some details about the allowed with the graphic mode representations can be found.
When the internal memory representation of Basic programs codes are greater than 127 interpreted as a token for the basic commands if they are not in quotes.
In the video memory in a different encoding is still used. Only 128 (7 -bit) can be displayed various characters, respectively, and the eighth bit controls the representation of the character in reverse. The uppercase set is mirrored here on the lowest 32 ASCII codes, which otherwise contains only non-printable control characters; the lowercase set is from position 64, where else are the capital letters. This applies for the text mode. In block graphics mode, the upper half is code ( with the lowercase ) is replaced by graphic characters.
Although the graphical representation of the font is always a 8 x 8 pixel matrix is based on the Commodore computers, this is exploited 7 pixels in the default character only up to 7 ×. The last pixel of horizontal and vertical pixels is used as a spacer so that successive characters are not displayed " glued" together. The " graphic characters " gave the 8x8 pixels are fully utilized. When the predecessor of the C64, the VC -20, the characters appear significantly broader due to the screen display.