Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PETSCII
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Specifications== [[File:C64 Petscii Charts.png|thumb|300px|PETSCII Chart as displayed on the Commodore 64 in shifted and unshifted modes. (Not shown are control codes, as well as characters in the 0xC0–0xFF range, which are the standard uppercase keycodes returned from the keyboard, and which are duplicated to the range 0x60–0x7F.)]] "Unshifted" PETSCII is based on the 1963 version of [[ASCII]] (rather than the 1967 version, which most if not all other computer character sets based on ASCII use). It has only [[uppercase]] letters, an up-arrow {{angbr|↑}} instead of [[caret]] {{angbr|^}} at [[hexadecimal|0x]]5E and a left-arrow {{angbr|←}} instead of an [[underscore]] {{angbr|_}} at 0x5F. In all versions except the original Commodore PET, it also has a [[British pound sign]] {{angbr|£}} instead of the backslash {{angbr|\}} at 0x5C. Other characters added in ASCII-1967 (lowercase letters, the [[grave accent]], [[curly braces]], vertical bar, and tilde) do not exist in PETSCII. Codes 0xA0–0xDF are allotted to CBM-specific [[Semigraphics|block graphics characters]]—horizontal and vertical lines, hatches, shades, triangles, circles and [[playing card|card suits]]. PETSCII also has a "shifted" mode (also called "business mode"), which changes the uppercase letters at 0x41–0x5A to lowercase, and changes the graphics at 0xC1–0xDA to uppercase letters. Upper- and lower-case are swapped from where ASCII has them. The mode is toggled by holding one of the SHIFT keys and then pressing and releasing the ''Commodore'' key. The shift can be done by [[PEEK and POKE|POKEing]] location 59468 with the value 14 to select the alternative set or 12 to revert to standard. On the Commodore 64, the sets are alternated by flipping bit 2 of the byte 53272. On some models of PET, this can also be achieved via special control code <code>PRINT CHR$(14)</code> 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.<ref name="petfaq">{{cite web |last1=Andersson |first1=Larry |title=THE COMMODORE PET COMPUTER FREQUENTLY ASKED QUESTIONS FILE |version=1.7 |url=http://www.zimmers.net/cbmpics/cbm/PETx/petfaq.html |website=Zimmers.net |date=25 November 2000}}</ref> Included in PETSCII are [[Cursor (computing)|cursor]] and screen control codes, such as <code>{HOME}</code>, <code>{CLR}</code>, <code>{RVS ON}</code>, and <code>{RVS OFF}</code> (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, [[Prettyprint|pretty-printed]] the codes using their actual names in curly braces, like the above examples. This is unambiguous as PETSCII has no curly brace characters. Different mappings are used for storing characters (the "interchange" mapping, as used by <code>CHR$()</code>) and displaying characters (the "video" mapping). For example, to display the characters "@ABC" on screen by directly writing into the [[framebuffer|screen memory]], one would POKE the decimal values 0, 1, 2, and 3 rather than 64, 65, 66, and 67.<ref name="Aivosto"/><ref name="L2/19-025 ReadMe.txt"/> The keyboard by default provides access to the lower half of the code page. Pressing Shift and a key gives the corresponding upper half code point. Some PETSCII code points cannot be printed and are only used for keyboard input (e.g. F1, RUN/STOP). [[File:PET Keyboard.svg|640px|thumb|left|[[Commodore PET|PET 2001]] keyboard layout, illustrating PETSCII graphics characters]] {{clear}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)