Skip to content

C Tutorial #2:- Fundamental Computer Concepts

January 20, 2013

Fundamental Computer Concepts

  1. Hardware – Inside the CPU
  2. Software – Inside the Operating System
  3. Input and Output Devices – VDU and Keyboard

The Basic components of CPU are

  1. Microprocessor:-

It carries out two basic functions. Firstly, it performs numerical computations and logical comparisons using CPU registers. Secondly, it transfers data, addresses and control signals,  using  buses.

It is the heart of all the PC’s. The CPU controls the computer’s basic operations by sending and receiving control signals, memory addresses and data from one part of the computer to another.

  1.  Math Co-Processor

This is dedicated processor which is capable of  performing  complex arithmetic.  It may or may not be present on the mother board.

  1. Memory Chips: – These are used for  storage of data, instructions  and final results.

RAM and ROM.

  1. Support Chips:-

The overall  operations of a computer are too complex to be controlled by the microprocessor alone.

ü  Clock chip – Generates signals that are needed to drive the microprocessor.

ü  CRT controller chip which controls the VDU.

ü  DMA chip which allows interaction with disk drive.

ü  Interrupt controller chip which supervises the operation of interrupts.

  1.  Built-in Programs:-

These are stored in the ROM chips and consist of routines which are fundamental to the very working of the computer. This consists of programs which check and initialise the standard and non-standard equipment attached to your computer, perform memory test every time you put on a computer, interact with the I/O devices etc.

  1. Expansion slots:- You can upgrade your PC with new devices.

Operating System Fundaments:-

Functions of OS:-

  1. ‘Manager’ – the operating system determines who will use the printer, disk, VDU, keyboard and other peripheral units and when they will use them. When an error is discovered, the operating system  reports the error to the user. The Operating system also manage the use of memory, controls timing of events, and controls the priorities of various requests.
  2. As a ‘Command processor’, the operating system reads commands from the user , verifies their accuracy, loads  what is needed from the disk and initiates the execution of the user command.
  3. As a ‘controller’, the operating system,  at least to some extent, must always be in control of the system resources. If a program crashes from any type of error, control should return to the operating system,which then determines the type of error.

Kingdom of DOS:-

1 . ROM Software

2. DOS Software

DOS-

  1. IO.SYS

(i)                  Device drivers for devices like printer, VDU, keyboard,etc.

(ii)                SYSINIT module which loads the file MSDOS.SYS from the disk into memory.

  1. MSDOS.SYS

Called as DOS kernel.

(i)                   Process Control :- Execution of user programs

(ii)                Memory management:- Allocation of memory for programs and managing it.

(iii)               API

(iv)              File Management system:- Manages reading and writing of files.

  1. COMMAND.COM

This file contains command processor, best known as shell. It is the user’s interface to the operating System.

ROM:-

ROM Start-up Routines:-

  1. POST- Power On self test:-Quick Reliability test of the computer and ROM.These Routines check the integrity of the entire system and the status of I/O devices like keyboard, monitor etc.
  2. Initialisation process:
    1. A routine sets up a table of addresses called Interrupt Vector Table (IVT) in RAM at low end of memory. These addresses of Interrupt Service Routines stored inside the ROM-BIOS.
    2. Another Initialization routine determines what equipment is attached to the computer and then places  a record of it at a fixed location in memory.
    3. After the execution of POST routines, initialisation routines and ROM extension routines, the final part of the start-up procedure is left to the bootstrap loader program.

ROM –BIOS Routines:-

  1. It is a collection of routines that are part  of the hardware of your computer system and is supplied by the computer  manufacturer as part of the hardware.

BIOS works in two directions in a two sided process, linking the program execution in RAM with the hardware.

ROM BASIC Routines:-

It provides the core of the Basic language.

ROM Extension Routines:-

Since the original ROM BIOS could not include support programs for future hardware, ROM Extensions are necessary.

Visual Display Unit:-

The video system consists of two basic components:

(a)    A video screen on which we actually see the images either in text or in graphics.

(b)   A video display adapter which is a special printed circuit board that plugs into one of the several expansion slots present on the mother board of the computer.

How are the images, either text or graphics, produced on the screen?

The microprocessor does not have the ability to send signals necessary to produce the images on the screen. This task is performed by the display adapter. The display adapter acts as an agent between the microprocessor and the video screen.

The display adapter consists of

(a)    A special memory called VDU memory.

(b)   Circuitry which transfers the contents of the VDU memory on to the screen.

The microprocessor writes the information to be displayed on the screen into the VDU memory. Whereas the display adapter circuitry transfers this information from VDU memory on to the screen. Therefore, we can describe the image displayed on the screen as a ‘memory mapped display’. Each address in VDU memory corresponds to a specific location on the screen. The display adapter circuitry repeatedly ( 50 to 70 times a second) reads information from VDU memory and places it on the screen, making  the images displayed on the screen clearer and steady. This process is called refreshing of the screen.

Example :-

What exactly happens when we try to display a message on the screen using print(). Firstly, the printf() function calls a DOS or ROM-BIOS Routine. This routine places the message to be displayed in the VDU memory. The display adapter circuitry transfers this message   to the screen repeatedly, so that  the image persists on the screen.

Display Adapters :-

A number of display adapters are available with varying capabilities. The 8086 family of microprocessors usually support the following display adapters.

(a)     Monochrome Adapter (MA).

(b)   Hercules Adapter

(c)    Color Graphics Adapters (CGA).

(d)   Enhanced Graphics Adapter(EGA).

(e)   Video Graphics Adapter(VGA).

(f)     Super Video Graphics Adapter(SVGA).

Most of these adapters can be programmed in two fundamentally different modes, text mode and graphics mode.

In text mode, one can display only text characters (ASCII value 0 to 255), whereas, graphics mode is mainly used for complex drawings.

Video Display Modes:-

Just as an artist can choose from a variety of media when creating a picture (oils,painting,etc), so a programmer can choose from a variety of modes or formats.

Each mode provides following information:

  1. Whether text or graphics to be displayed
  2. The amount of text to be displayed   in one line.
  3. The resolution.
  4. The number of possible colors.

From → C Graphics, Tutorials

Leave a Comment

Leave a comment