You are on page 1of 12

Advanced Compiler Research Laboratory

School of Computer Science & Engineering Seoul National University

Memory Mapped I/O

Computer Principles

Memory Mapped I/O

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

To make all I/O devices look exactly the same to the computer Each I/O device is allocated an exclusive area in memory Memory map
Data Memory

RAM Screen Memory Map Keyboard Memory Map Screan

Keyboard

Computer Principles

Memory Mapped I/O (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Input device Keyboard, mouse, etc. The memory map continuously reect the physical state of the device Pressing a key on the keyboard makes a certain value (code of the key) is written in the keyboards memory map Output device Screen, speaker, etc. The memory map continuously drive the physical state of the device Whenever a bit is changed in the screens memory map, a respective pixel is drawn on the physical screen
Computer Principles

Memory Mapped I/O (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Hardware Each I/O device need to provide an interface similar to that of memory unit Software Each I/O device is required to dene an interaction contract (protocol) Standards play a key role in designing a computer system

Computer Principles

American Standard Code for Information Exchange (ASCII)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

A character encoding based on the English alphabet Developed from telegraphic codes Its rst commercial use was as a seven-bit teleprinter code promoted by Bell data services The common code for personal computers and workstations 7-bit 128 numbers ranging from zero through 127 assigned to letters, numbers, punctuation marks, and the most common special characters The Extended ASCII Character Set 128 numbers and ranges from 128 through 255 (using the full 8-bits of the byte) representing additional special, mathematical, graphic, and foreign character
Computer Principles

American Standard Code for Information Exchange (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Computer Principles

American Standard Code for Information Exchange (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Computer Principles

Unicode

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Fundamentally, computers just deal with numbers. They store letters and other characters by assigning a number for each one. Before Unicode was invented, there were hundreds of different encoding systems for assigning these numbers. No single encoding could contain enough characters: for example, the European Union alone requires several different encodings to cover all its languages. Even for a single language like English no single encoding was adequate for all the letters, punctuation, and technical symbols in common use. These encoding systems also conict with one another. That is, two encodings can use the same number for two different characters, or use different numbers for the same character. Any given computer (especially servers) needs to support many different encodings; yet whenever data is passed between different encodings or platforms, that data always runs the risk of corruption. (from www.unicode.org)
Computer Principles

Unicode (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Developed in cooperation between the Unicode Consortium and the International Organization for Standardization (ISO) 16-bit character set, allowing up to 65,536 characters An attempt to consolidate the alphabets and ideographs of the world's languages into a single, international character set Focuses on the characters themselves rather than on languages The same Unicode character A letter shared between English and Russian An ideograph shared between kanji and Han script
Computer Principles

Unicode (contd.)

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Required by modern standards such as XML, Java, JavaScript, LDAP, CORBA 3.0, WML, etc. Supported in many operating systems and all modern browsers Makes it possible for developers to create applications without having to resort to the costly, time-consuming task of releasing localized versions for each language

Computer Principles

10

Abstraction in Computer Science

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Interested in what the entity does ignoring how it does it Every hardware and software developer is dening abstractions (a.k.a. interfaces) and then implementing them Abstractions are often built layer upon layer

Computer Principles

11

Where Are We?


Assembly Language abstract interface (Assembler) Machine Language abstract interface (ISA) Computer Hardware Platform abstract interface (Boolean Logic) Chips and Physical Gates abstract interface Transistors Physics Electrical Engineering

Advanced Compiler Research Laboratory


School of Computer Science & Engineering Seoul National University

Computer Science and Engineering

Computer Principles

12

You might also like