Overview of Computers (OC) : DR - Raja Vara Prasad
Overview of Computers (OC) : DR - Raja Vara Prasad
Overview of Computers (OC) : DR - Raja Vara Prasad
1/1
Device Controller
Communication between the CPU and
the I/O devices
Computer
Device Controller
Input/Output Device
Device Controller
AT Keyboard Status Register
Bit 7: Parity error
0: OK. 1: Parity error with last byte.
Bit 6: Timeout
0: OK. 1: Timeout on transmission from keyboard to keyboard controller.
Bit 5: Auxiliary output buffer full
0: OK. 1: Timeout on transmission from keyboard controller to keyboard.
This indicates that no keyboard is present.
Bit 4: Keyboard lock
0: Locked. 1: Not locked.
Bit 3: Command/Data
0: Last write to input buffer was data. 1: Last write to input buffer was a
command.
Bit 2: System flag
Set to 0 after power on reset. Set to 1 after successful completion of the
keyboard controller self-test.
Bit 1: Input buffer status
0: Input buffer empty, can be written. 1: Input buffer full, don't write yet.
Bit 0: Output buffer status
0: Output buffer empty, don't read yet. 1: Output buffer full, can be read.
Source: https://www.win.tue.nl/~aeb/linux/kbd/scancodes-11.html
I/O Processor
System bus
Bridge
I/O bus
Shared
Memory
Controller Controller Controller
Device Driver
Device Driver
An Example
Command Controller Action
pan(±ɵ) Pan the camera view by ±ɵ
tilt(±ɵ) Tilt camera position by ±ɵ
zoom(±z) Zoom camera focus by ±z
Start Start camera
Stop Stop camera
memory Set memory buffer address for data
buffer(M) transfer to M
number of Set number of frames to be captured
frames (N) and transferred to memory to N
enable interrupt Enable interrupt from the device
disable Disable interrupt from the device
interrupt
start DMA Start DMA data transfer from
camera
An Example
// device driver: camera
// The device driver performs several functions:
// control_camera_position;
// convey_DMA_parameters;
// start/stop data transfer;
// interrupt_handler;
// error handling and reporting;
Hardware
Layers of Software
Users
Application software
System software
Operating
Application and
software systems
software
Users
Hardware
Layers of Software
Users
Application software
System software
Hardware
Application Software
Programming languages
Assembly language
Banking software
Office, etc.
Layers of Software
Users
Application software
* The Big Picture *
System software
Application software
It is the reason that one wants
Hardware to buy a computer:
• printout out paychecks
• play Mortal Kombat
• keep track of a stamp collection
• do your taxes
• generate a fancy newsletter
Application Software
• guide robots
Programming languages
Assembly language • keep a budget
Banking software • draw a flowchart
Office, etc. • browse the Web
• design a car
Layers of Software
Users
Application software
System software
Source code
High-level program code written by the programmer
Object code
Another name for machine language code
Compilers
A language translator that converts a complete
program into machine language to produce a
program that the computer can process in its
entirety
Compilers
Step 1: Translate program
Machine
Computer
Compiler language
program
program
Machine
language
program
Interpreters
A language translator that translates one
program statement at a time into machine code
Machine
Program
Interpreter language
statement
statement
Statement
execution
Linker
Linker
Linker
Linker
Loader
Loader -
• loads the executable code into memory
• creates the program and data stack
• initializes the registers
• starts the code running
Device Drivers
• A device driver is software that helps a peripheral
device establish communication with a computer.