Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 11 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
11
Dung lượng
742,18 KB
Nội dung
ASCII Assembly language programming By xorpd xorpd.net We will study some standard ways to represent text as numbers So far we have represented in our programs: ◦ Numbers ◦ Boolean values (Bits) How can we represent text? ◦ How can we print letters to the console? ◦ How can the computer keep letters in memory? American Standard Code for Information Interchange Defines numeric values for basic symbols: ◦ ◦ ◦ ◦ The English alphabet (Capital letters too) Digits Punctuation symbols (!,$,#,…) Control codes Every symbol is of size bits Worldwide standard Originally created for use on teleprinters Built for data communication http://commons.wikimedia.org/wiki/File:T100S_teleprinter.jpg (ArnoldReinhold) First used commercially at 1963, ◦ As a 7-bit teleprinter code for American Telephone & Telegraph’s TWX network http://commons.wikimedia.org/wiki/File:ASCII-Table.svg Printable symbols: ◦ Symbols that could be printed to the screen ◦ Almost all of the interval: 0x20-0x7f Control codes: ◦ Most of those are not in use today ◦ Almost all of the interval: 0x0-0x1f Basic symbols: ◦ A – Z: ◦ a – z: ◦ – 9: 0x41 – 0x5a 0x61 – 0x7a 0x30 – 0x39 Special symbols: ◦ Null: ◦ Space: 0x0 0x20 ◦ New line: Carriage return: Line feed: 0xd 0xa Standard for text representation for most of the known writing systems Has a few encoding implementations UTF-8 ◦ Character encoding that implements unicode ◦ Very common ◦ Designed for backwards compatibility with ASCII The first 128 characters are the same We will only discuss ASCII in this course ◦ You could always extend to UTF-8 later, if you want ASCII is a standard way to encode some very simple symbols into bits Unicode is a standard way to encode almost any known character ◦ UTF-8 is a very common character encoding to implement unicode ◦ UTF-8’s 128 first symbols are the same as ASCII’s 128 first symbols Study the printable part of the ASCII table ◦ No need to learn it by heart :) ... backwards compatibility with ASCII The first 128 characters are the same We will only discuss ASCII in this course ◦ You could always extend to UTF-8 later, if you want ASCII is a standard way... to implement unicode ◦ UTF-8’s 128 first symbols are the same as ASCII s 128 first symbols Study the printable part of the ASCII table ◦ No need to learn it by heart :) ... teleprinter code for American Telephone & Telegraph’s TWX network http://commons.wikimedia.org/wiki/File :ASCII- Table.svg Printable symbols: ◦ Symbols that could be printed to the screen ◦ Almost all