All Topics  
PETSCII

 

   Email Print
   Bookmark   Link






 

PETSCII



 
 
PETSCII (PET Standard Code of Information Interchange), also known as CBM ASCII, is the variation of the ASCII
ASCII

American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
 character set used in Commodore Business Machines (CBM)
Commodore International

Commodore, the commonly used name for Commodore International, was a United States electronics company based in West Chester, Pennsylvania which was a vital player in the home computer/personal computer field in the 1980s....
's 8-bit home computer
Home computer

A home computer was a class of personal computer entering the market in 1977 and becoming common during the 1980s. They were marketed to consumers as accessible personal computers, more capable than video game consoles....
s, starting with the PET
Commodore PET

The PET was a home computer-/personal computer produced by Commodore International starting in 1977. Although it was not a top seller outside the Canadian, US, and UK educational markets, it was Commodore's first full-featured computer and would form the basis for their future success....
 from 1977 and including the VIC-20
Commodore VIC-20

The VIC-20 is an 8-bit home computer which was sold by Commodore International. The VIC-20 was announced in 1980, roughly three years after Commodore's first personal computer, the Commodore PET....
, C64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
, CBM-II
Commodore CBM-II

The Commodore CBM-II series was a short-lived range of 8-bit personal computers from Commodore International, intended as a follow-on to the Commodore PET series, released in 1982....
, Plus/4
Commodore Plus/4

The Commodore Plus/4 was a home computer released by Commodore International in 1984. The "Plus/4" name refers to the four-application read-only memory resident office suite ; it was billed as "the productivity computer with software built-in"....
, C16
Commodore 16

The Commodore 16 was a home computer made by Commodore International with a MOS Technology 6502-compatible MOS Technology 8501 Central processing unit, released in 1984....
, C116 and C128
Commodore 128

The Commodore 128 home computer/personal computer was the last 8-bit machine commercially released by Commodore International . Introduced in January of 1985 at the Consumer Electronics Show in Las Vegas metropolitan area, it appeared three years after its predecessor, the bestselling Commodore 64....
.

The character set was largely designed by Leonard Tramiel (the son of Commodore CEO Jack Tramiel
Jack Tramiel

Jack Tramiel is a businessman, best known for founding Commodore International - manufacturer of the Commodore PET, Commodore 64, Commodore 128, Commodore Amiga, and other Commodore models of home computers....
) and PET designer Chuck Peddle
Chuck Peddle

Electronics engineer Chuck Peddle is mostly known as the main designer of the MOS Technology MOS Technology 6502 microprocessor; the KIM-1 single-board computer; and its successor the Commodore PET personal computer, both based on the 6502....
. Peddle claims the inclusion of card suit symbols was spurred by the demand that it should be easy to write card games on the PET (as part of the specification list he received).






Discussion
Ask a question about 'PETSCII'
Start a new discussion about 'PETSCII'
Answer questions from other users
Full Discussion Forum



Encyclopedia


PETSCII (PET Standard Code of Information Interchange), also known as CBM ASCII, is the variation of the ASCII
ASCII

American Standard Code for Information Interchange , is a coding standard that can be used for interchanging information, if the information is expressed mainly by the written form of English words....
 character set used in Commodore Business Machines (CBM)
Commodore International

Commodore, the commonly used name for Commodore International, was a United States electronics company based in West Chester, Pennsylvania which was a vital player in the home computer/personal computer field in the 1980s....
's 8-bit home computer
Home computer

A home computer was a class of personal computer entering the market in 1977 and becoming common during the 1980s. They were marketed to consumers as accessible personal computers, more capable than video game consoles....
s, starting with the PET
Commodore PET

The PET was a home computer-/personal computer produced by Commodore International starting in 1977. Although it was not a top seller outside the Canadian, US, and UK educational markets, it was Commodore's first full-featured computer and would form the basis for their future success....
 from 1977 and including the VIC-20
Commodore VIC-20

The VIC-20 is an 8-bit home computer which was sold by Commodore International. The VIC-20 was announced in 1980, roughly three years after Commodore's first personal computer, the Commodore PET....
, C64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
, CBM-II
Commodore CBM-II

The Commodore CBM-II series was a short-lived range of 8-bit personal computers from Commodore International, intended as a follow-on to the Commodore PET series, released in 1982....
, Plus/4
Commodore Plus/4

The Commodore Plus/4 was a home computer released by Commodore International in 1984. The "Plus/4" name refers to the four-application read-only memory resident office suite ; it was billed as "the productivity computer with software built-in"....
, C16
Commodore 16

The Commodore 16 was a home computer made by Commodore International with a MOS Technology 6502-compatible MOS Technology 8501 Central processing unit, released in 1984....
, C116 and C128
Commodore 128

The Commodore 128 home computer/personal computer was the last 8-bit machine commercially released by Commodore International . Introduced in January of 1985 at the Consumer Electronics Show in Las Vegas metropolitan area, it appeared three years after its predecessor, the bestselling Commodore 64....
.

The character set was largely designed by Leonard Tramiel (the son of Commodore CEO Jack Tramiel
Jack Tramiel

Jack Tramiel is a businessman, best known for founding Commodore International - manufacturer of the Commodore PET, Commodore 64, Commodore 128, Commodore Amiga, and other Commodore models of home computers....
) and PET designer Chuck Peddle
Chuck Peddle

Electronics engineer Chuck Peddle is mostly known as the main designer of the MOS Technology MOS Technology 6502 microprocessor; the KIM-1 single-board computer; and its successor the Commodore PET personal computer, both based on the 6502....
. Peddle claims the inclusion of card suit symbols was spurred by the demand that it should be easy to write card games on the PET (as part of the specification list he received). The VIC-20 used the same pixel-for-pixel font
Computer font

A computer font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s most fonts are digital, used on computers....
 as the PET (although the characters appeared wider due to the 22-column screen). The Commodore 64, however, used a slightly re-designed, heavy upper-case font that was basically a thicker version of the PET font. The reason for this was the higher resolution of the C64 which caused color artefacts when using the thin PET font. The result looked similar to the Atari font
ATASCII

The ATASCII character set, from ATARI Standard Code for Information Interchange, alternatively ATARI ASCII, is the variation on ASCII used in the Atari 8-bit family of home computers....
 which is why some people believe that the C64 font is a copied and modified version of the Atari font, but since the PET font can be converted to the C64 font with a small program, this theory is out of question.

Cbmcharset Modes
C64 Petscii Charts
PETSCII is based on the 1963 version of ASCII (rather than the 1967 version, which most if not all other character sets based on ASCII use). As such, PETSCII has only uppercase letters (in its
unshifted mode, that is; see below), an up-arrow ( ? ) instead of a caret ( ^ ) in position $
Hexadecimal

In mathematics and computer science, hexadecimal is a numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen....
5E and a left-arrow ( ? ) instead of an underscore ( _ ) in position $5F. Also, the backslash ( \ ) in position $5B is replaced by a British pound sign ( £ ). In
unshifted mode, codes $60–$7F and $A0–$FF are allotted to CBM-specific block graphics characters (horizontal and vertical lines, hatches, shades, triangles, circles and card suits). Ranges $00–$1F and $80–$9F have control codes. The characters in positions $60–$7F repeat themselves in positions $C0–$DF, as do $A0–$BE in $E0–$FE, and $7E in $FF.

The Commodore PET
Commodore PET

The PET was a home computer-/personal computer produced by Commodore International starting in 1977. Although it was not a top seller outside the Canadian, US, and UK educational markets, it was Commodore's first full-featured computer and would form the basis for their future success....
's lack of a programmable bitmap
Raster graphics

In computer graphics, a raster graphics image or bitmap, is a data structure representing a generally Rectangle grid of pixels, or points of color, viewable via a Computer display, paper, or other display medium....
-mode for computer graphics
2D computer graphics

2D computer graphics is the computer-based generation of digital images—mostly from two-dimensional models and by techniques specific to them....
 as well as it having no redefinable character set capability, may be one of the reasons PETSCII was developed; by creatively using the well thought-out block graphics, a higher degree of sophistication in screen graphics is attainable than by using plain ASCII's letter/digit/punctuation characters. In addition to the relatively diverse set of geometrical shapes that can thus be produced, PETSCII allows for several grayscale
Grayscale

In photography and computing, a grayscale or greyscale digital image is an image in which the value of each pixel is a single sample , that is, it carries only intensity information....
 levels by its provision of differently hatched checkerboard
Checkerboard

A checkerboard is a board on which English draughts is played. It is an 8×8 board and the 64 squares are of alternating dark and light color, often red and black....
 squares/half-squares. Finally, the reverse-video mode (see below) is used to complete the range of graphics characters, in that it provides mirrored half-square blocks.

PETSCII also has a
shifted mode, in which the range $41–$5A has lowercase letters (instead of uppercase in unshifted mode), and the range $61–$7A (and its duplicate $C1–$DA) has uppercase letters (instead of the block graphics). This is in reverse to ASCII-1967, so any text transfer between an 8-bit Commodore machine and one that uses standard ASCII would result in reverse-case text upon arrival to the destination. Thus, like for other computers based on non-standard-ASCII character sets, software conversion is needed when exchanging text files and/or telecommunicating with standard ASCII systems. The other ranges are unchanged in shifted mode; this means that the other characters added in ASCII-1967 besides lowercase letters — i.e. the grave accent, curly braces, vertical bar, and tilde — do not exist in PETSCII.

Included in PETSCII are cursor
Cursor (computers)

In computing, a cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device....
 and screen control codes, such as , , , and (the latter two activating/deactivating reverse-video character display). The control codes appeared in program listings as reverse-video graphic characters, although some computer magazines, in their efforts to provide more clearly readable listings, pretty-printed the codes using their actual names, like the above examples. Such names were commonly enclosed in curly braces in the listings. This prevented ambiguity, since, as mentioned, PETSCII had no curly brace characters. The screen control codes were essentially similar to escape codes for text based computer terminals.

As indicated above, PETSCII provides for shifting between the power-on default (unshifted) uppercase+graphics character set and the alternative (shifted) lower+uppercase set (where the shifted set contains a subset of the block graphic characters of the unshifted set). The shift between modes is done by POKEing
PEEK and POKE

In computing, PEEK is a BASIC programming language function used for reading the contents of a memory cell at a specified memory address. The corresponding command to set the contents of a memory cell is POKE....
 location 59468 with the value 14 to select the alternative set or 12 to revert to standard. On some models of PET this can also be achieved via special control codes which adjust the line spacing as well as changing the character set; the POKE method is still available and does not alter the line spacing. Thus, screen editor state changes, rather than the employment of separate ASCII codes, are used to choose between single-case (all capitals) and dual case. In the VIC-20, C64, and later machines (not including the CBM business computers), color codes supplement the other screen control codes. (The colors of the VIC-20 and C64/128 are listed in the C64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
 article.)

Code table


Since not all of the characters encoded by PETSCII are 'graphic' (i.e., not control codes) and not all of them have a corresponding Unicode
Unicode

Unicode is a computing industry standard allowing computers to consistently represent and manipulate Character expressed in most of the world's writing systems....
 representation, they cannot be portably displayed in a web browser. The following table shows the glyph
Glyph

A glyph is an element of writing. Two or more glyphs representing the same symbol, whether interchangeable or context-dependent, are called allographs; the abstract unit they are variants of is called a grapheme or character ....
s for PETSCII graphic characters where there is a corresponding Unicode glyph, and the Unicode replacement character U+FFFD otherwise. Control character
Control character

In computing and telecommunication, a control Grapheme or non-printing character is a code point in a character encoding, that does not in itself represent a written symbol....
s and other non-printing characters are represented by abbreviations for their names. Where a particular code point encodes both a shifted and unshifted character, both characters are shown, with the unshifted character on the left. Row and column headings indicate the hexadecimal
Hexadecimal

In mathematics and computer science, hexadecimal is a numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen....
 digit combinations to produce the eight-bit code value; e.g., the letter
L is at code value 4C.

Note that the table below is for the Commodore 64
Commodore 64

The Commodore 64 is an 8-bit home computer released by Commodore International in August, 1982, at a price of United States dollar595. Preceded by the Commodore VIC-20 and Commodore MAX Machine, the C64 features 64 kilobytes of Random-access memory with sound and graphics performance that were superior to IBM-compatible computers of tha...
. Other Commodore machines used slightly different versions of PETSCII, which used different control characters and in some cases different graphic characters. For example, on the Commodore 128
Commodore 128

The Commodore 128 home computer/personal computer was the last 8-bit machine commercially released by Commodore International . Introduced in January of 1985 at the Consumer Electronics Show in Las Vegas metropolitan area, it appeared three years after its predecessor, the bestselling Commodore 64....
 $07 was the bell control character
Bell character

A bell code is a device control code originally sent to ring a small electromechanical bell on tickers and other teleprinters and teletypewriters to alert operators at the other end of the line, often of an incoming message....
, and on CBM machines prior to the VIC-20, characters $2C and $6C both produced a comma character, albeit with slightly different semantics.

The actual character generator ROM used a different set of assignments. For example, to display the characters "@ABC" on screen by directly POKEing the screen memory, one would POKE the decimal values 0, 1, 2, and 3 rather than 64, 65, 66, and 67.

PETSCII (Commodore 64)
 x0x1x2x3x4x5x6x7x8x9xAxBxCxDxExF
0xunusedWHTunusedSHIFT DISABLESHIFT ENABLEunusedCR
Carriage return

Originally, carriage return was the term for the control character in Baudot code on a Teleprinter for end of line return to beginning of line and did not include line feed....
SOunused
1xunusedDOWNRVS ONHOMEDEL
Delete

#REDIRECT Deletion#REQUEST Removal of Redirection and writing the Delete page, Delete is unique and used as a unique word. IE the delete button on key boards....
unusedREDRIGHTGRNBLU
2xSP!"#$%&'()*
,
./
3x0123456789:;<=>?
4x@A aB bC cD dE eF fG gH hI iJ jK kL lM mN nO o
5xP pQ qR rS sT tU uV vW wX xY yZ z[£]??
6x?? A¦ B? C? D? E? F? G? H? I? J? K? L? M? N? O
7x? P? Q? R? S? T? U? V? W? X? Y? Z+?¦p ¦? ?
8xunusedORGunusedF1F3F5F7F2F4F6F8LFSIunused
9xBLKUPRVS OFFCLRINSBRNLT REDGRAY1GRAY2LT GRNLT BLUGRAY3PURLEFTYELCYN
AxNBSP
Non-breaking space

In computer-based text processing and digital typesetting, a non-breaking space or no-break space is a variant of the space character that prevents an automatic line break at its position....
¦_???¦??? ??+?++?
Bx+--¦??????? ???+??
Cx?? A¦ B? C? D? E? F? G? H? I? J? K? L? M? N? O
Dx? P? Q? R? S? T? U? V? W? X? Y? Z+?¦p ¦? ?
ExNBSP
Non-breaking space

In computer-based text processing and digital typesetting, a non-breaking space or no-break space is a variant of the space character that prevents an automatic line break at its position....
¦_???¦??? ??+?++?
Fx+--¦??????? ???+?p ¦




See also

  • ATASCII
    ATASCII

    The ATASCII character set, from ATARI Standard Code for Information Interchange, alternatively ATARI ASCII, is the variation on ASCII used in the Atari 8-bit family of home computers....
  • ZX Spectrum character set
    ZX Spectrum character set

    The ZX Spectrum character set is the variant of ASCII used in the British Sinclair Research ZX Spectrum computers. It is based on ASCII-1967 , but with one character from ASCII-1963 , two graphics characters nonstandardly assigned, an idiosyncratic use of the control code area and use of the 128 high-bit characters beyond the ASCII range....
  • Extended ASCII
    Extended ASCII

    The term extended ASCII describes eight-bit or larger character encodings that include the standard seven-bit ASCII characters as well as others....


External links

  • , , (JPEG
    JPEG

    In computing, JPEG is a commonly used method of for photographic images. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality....
    )
  • An attempt at PETSCII to Unicode mapping, ,