ACCEL SOFTWARE AND TECHNOLOGIES LTD.

Slides:



Advertisements
Similar presentations
Video Cards CS431 Class Presentation Ashish Bhat ( ) Nilesh Meshram ( )
Advertisements

Monitors and Sound Systems
Serial I/O - Programmable Communication Interface
Outline  Examine some of the H/W supplied with a typical PC and consider the software required to control it.  Introduce Commkit, a software tool that.
Screen Display Module M15.2 Sections 9.5, 13.1, 13.2.
Monitors and Sound Systems section 3A This lesson includes the following sections: · Monitors · PC Projectors · Sound Systems.
INPUT-OUTPUT ORGANIZATION
COMPONENTS OF THE SYSTEM UNIT
Video Monitor Uses raster scanning to display images
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
Chapter 2 How Computers Work.
Computer Maintenance Introduction to PCs: How Computers Work 1 Copyright © Texas Education Agency, All rights reserved.
Know the Computer Multimedia tools. Computer essentials.
Peripherals The term peripherals refers to all hardware devices that are attached to your computer and are controlled by your computer system Peripherals.
Ch Review1 Review Chapter Microcomputer Systems Hardware, Software, and the Operating System.
Practical PC, 7th Edition Chapter 17: Looking Under the Hood
ORG ; FOUR INT 21H and INT 10H Programming and Macros Dec Hex Bin
Add on cards. Also known as Expansion card or interface adapter. It can be inserted into an expansion slot of a motherboard to add functionality to a.
Organization of a computer: The motherboard and its components.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
Video Monitor CRT: Cathode Ray Tube
Text-Mode Programming Question #1 What are the three levels of access to the video display when writing characters on the screen in text mode?
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
Lecture # 4 Output Devices. Output Devices Devices that convert machine language into human understandable form. Output can be in display form, on paper.
2/1 A Look at Monitors Roll call Video: monitors Step-by-step lecture.
8086 Microprocessor Interrupts By: Vijay Kumar. K Reference From Slide Share.
ECE 103 Engineering Programming Chapter 53 Generic Algorithms Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Video Card CES Industries, Inc. Lesson 10.  Translates computer information of binary digital data into visual information that the monitor can understand.
4. Kernel and VGA ENGI 3655 Lab Sessions. Richard Khoury2 Textbook Readings  None.
ROM BIOS Chapter 9. The ROM BIOS PC computer come with a set od built in routines collectively called the ROM BIOS. These routines are permanent part.
Week 9 Monitors and output to the screen. Monitors, also known as Visual display units (V.D.Us) Desktop computers contain a Cathode Ray Tube (C.R.T.)
Introduction to PCs: How Computers Work
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Lecture 11 Text mode video
Direct-Access Color Graphics Chapter 11. Graphics modes C++ provides a different combination of graphics characteristics. These characteristics include.
Computer is a general-purpose device that can be programmed to carry out a set of arithmetic or logical operations automatically. Since a sequence of.
Computer Graphics Lecture 04 Point Taqdees A. Siddiqi
Chapter 17 Looking “Under the Hood”
Computer System Structures
Transformer for your computer
Flowchart of basic interrupt mechanism
OPERATING SYSTEM CONCEPT AND PRACTISE
BASIC PROGRAMMING C SCP1103 (02)
Computer systems is a 10-credit unit
Chapter Objectives In this chapter, you will learn:
CS-401 Computer Architecture & Assembly Language Programming
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
BASIC PROGRAMMING C SCP1103 (02)
Operating Systems (CS 340 D)
Discovering Computers 2011: Living in a Digital World Chapter 4
Input/Output.
SERIAL PORT PROGRAMMING
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
E3165 DIGITAL ELECTRONIC SYSTEM
CS703 - Advanced Operating Systems
IRQ, DMA and I/O Ports - Introduction -
Microcomputer Architecture
Types of monitors CRT Cathode Ray Tube LCD Liquid Crystal Display.
Microprocessor and Assembly Language
Physics 413 Chapter 10.
Module 2 How Computers Work.
Serial Communication Interface: Using 8251
SYSTEM BUS.
Monitors and Sound Systems
COMPUTER PERIPHERALS AND INTERFACES
Graphics Systems Lecture-2
Chapter 3 Peter Norton’s  Introduction to Computers Interacting with Your Computer.
Chapter 17 Looking “Under the Hood”
This lesson includes the following sections:
Presentation transcript:

ACCEL SOFTWARE AND TECHNOLOGIES LTD. Day 02 Vdu Basics. The DOS Perspective. Writing to Video Mode in Text Mode. Biosequip() and _bios_equiplist() RS-232 communications. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. VDU BASICS Components of VDU Monitor and video graphics adapter. Monitor: Refresh rate- The microprocessor does not have the ability to send signals directly to the monitor. Either the microprocessor or the graphics processor writes the data on the video memory. The data on the video memory is converted to analog signals and send to CRT to get displayed. When the electron beam strikes the phosphor coating the CRT glows. The phosphor particle have a property that unless the electron beam again strike them they would vanish. To over come this the graphics circuitry reads the information repeatedly and display on the screen ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. VDU BASICS The process is called refreshing the screen and the rate at which it is refreshed is called refresh rate. Resolution: The display resolution is defined by the number of rows from top to bottom and number of pixels from left to right on each scan. Graphics circuitry: The graphics adapter converts the digital information from the video memory to analog signals which gets displayed on the screen. Category of adapters: 1. MDA (Monochrome display adapter). 2. HGC (Hercules graphics card). 3. VGA (Video graphics array). ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. VDU BASICS 4. CGA (Color graphics adapter). 5. EGA (Enhanced graphics adapter). 6. SVGA (Super video graphics adapter). Modern graphics adapter: The graphics cards are connected either to PCI or AGP. The communication between the processor and adapter in PCI takes place through PCI bus which is shared by many devices. AGP is not shared and is dedicated to graphics operation alone. COMPONENTS: Graphics processor- The graphics processor relives the main processor from sending data to the graphics card. The main processor sends a set of instructions to the graphics processor. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. VDU BASICS Video Memory- The memory that holds the video image to be displayed on the screen is called video memory. The video memory holds the information about the pixels and color of the pixels. DAC- The data received form the main processor is in the form of digital information which has to be converted to analog information that can be displayed on the monitor. Graphics BIOS- The BIOS on the rom chip coordinates the activity of the other chips available on the video card. Color in Text Mode: The text displayed on the screen occupies 2 byte of video memory to display each character. The byte 1 represents the ASCII value of the text getting displayed. The byte 2 represents the color characteristics. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. VDU BASICS The color byte contains three characteristics 1. The foreground text color. 2. The background color. 3. The blinking component. 7 6 5 4 3 2 1 0 purpose - - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - 1 - - - - - - - Blue f/g color Green f/g color Red f/g color Intensity of f/g Blue b/g color Green b/g color Red b/g color blinking ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. The DOS Perspective The first four bit produces 16 different foreground color. The next 3 bit component produces 8 different background color. The DOS Perspective: The DOS works under the real mode of operation. In these mode of operation the size of the register is 16 bits so the maximum size of the segment could be 64k. In DOS 2 blocks of memory A block and B block each of 64kb are reserved to access the video memory. Any thing that has to be displayed on the screen has to be written in these memory location. WRITING TO VIDEO MEMORY IN TEXT MODE There are three different methods for displaying character on the screen. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

WRITING TO VIDEO MEMORY IN TEXT MODE a. using standard library routine. b. using ROM-BIOS or DOS routine. c. writing character directly into video memory. The block B is used is used for displaying character in text mode. Each character to be displayed occupies 2 bytes in memory. E.g If ‘A’ is displayed in the 0th row and 0th column on the screen if the address is 0xB8000 the next address contains the color attribute of the character. About (80*25*2) which is 4000 bytes of memory is occupied for the total display on the screen. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

WRITING TO VIDEO MEMORY IN TEXT MODE E.g Screen full of ‘A’: main() { int I; char far *scr = 0xB8000000L; for(I=0;I<=3999;I=I+2); *(scr+I)=‘A’; } E.g changing the color of a character: for(I=1;I<=3999;I=I+2); *(scr+I)=112; ACCEL SOFTWARE AND TECHNOLOGIES LTD.

Biosequip() and _bios_equiplist() Biosequip() and _bios_equiplist() use BIOS interrupt 0x11 to return an integer describing the equipment connected to the system. The return value is interpreted as a collection of bit-sized fields. E.g Declaration: int biosequip(void); unsigned _bios_equiplist(void); Let us see how the bit fields are manipulated ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. EQUIPMENT BIOS CALLS Interrupt INT 11H is used to determine the hardware attached to the computer system. It returns a value in register AX, which is comprised as follows, Bits Description 15,14 Number of printers 00=0, 01=1 &so on 13 Serial printer attached 12 Game I/O attached 11,10,9 Number of RS232 cards attached ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. EQUIPMENT BIOS CALLS 8 DMA 0=m/c has DMA,1= m/c has no DMA 7,6 Number of disk drives 00=1, 01=2, 10=3, 11=4 5,4 Initial video mode 00=40, 01=80, 11=Mono 3,2 Ram Size 00=16k, 01=32k,10=48k, 11=64k 1 Co-Processor 0 IPL from disk 1=disk, 0=None ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. Bit field format Number of parallel printers 00 = 0; 01 = 1; 10 = 2; 11 = 3 Serial printer attached Game I/O attached Number of COM ports: 000 = 0, 001 = 1,..., 111 = 7 Direct memory access (DMA) 0 = Machine has DMA; 1 = Machine doesn't have DMA Number of disk drives: 00 = 0; 01 = 1; 10 = 2; 11 = 3 Initial video mode 00 = Unused 01 = 40x25 BW with color card 10 = 80x25 BW with color card 11 = 80x25 BW with mono card Motherboard RAM size Floating-point coprocessor 00 = 16K; 01 = 32K; 10 = 48K; 11 = 64K Boot from disk 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. EQUIPMENT BIOS CALLS Eg: Calls to the ROM BIOS Int 11h to check whether math coprocessor is installed. #include <dos.h> #include <stdio.h> union REGS regs; main() { int86(0x11,&regs,&regs); int equip_check =regs.x.ax; if(equip_check & 0x002) printf(“\n there is a math coprocessor installed “); else printf(“\n no math coprocessor installed “); } ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. Memory size Both biosmemory() and _bios_memsize() use BIOS interrupt 0x12 to return the size of RAM. Declaration: int biosmemory(void); unsigned _bios_memsize(void); E.g 1 #include <bios.h> int main(void) { int memory_size; memory_size = biosmemory(); printf("RAM size = %d K",memory_size); return 0; } ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. Memory size E.g 2 #include <bios.h> int main(void) { unsigned memory_size; memory_size = _bios_memsize(); printf("RAM size = %d K\n", memory_size); return 0; } ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. RS-232 communications Both bioscom and _bios_serialcom use BIOS interrupt 0x14 to perform various RS-232 communications over the I/O port given in port. Arg What It Is/Does abyte OR combination of bits that specifies COM port settings (ignored if cmd = 2 or 3) cmd Specifies the I/O operation to perform port Identifies the I/O port; 0 = COM1, 1 = COM2, etc. Declaration: int bioscom(int cmd, char abyte, int port); unsigned _bios_serialcom(int cmd, int port, char abyte); ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. Cmd argument settings cmd can be one of the following Bioscom _bios_serialcom What Function Does 0 _COM_INIT Sets the communications parameters to the value in abyte. 1 _COM_SEND Sends the character in abyte out over the communications line 2 _COM_RECEIVE Receives a character from the communications line. 3 _COM_STATUS Returns current status of the communications port For all values of cmd, both functions return a 16-bit integer. ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. More on cmd When cmd = 2 or 3 (_COM_RECEIVE or _COM_STATUS), the abyte argument is ignored. When cmd = 0 (_COM_INIT), abyte is an OR combination of the following bits (one from each group). bioscom _bios_serialcom Meaning 0x02 0x03 _COM_CHR7 _COM_CHR8 7 data bits 8 data bits 0x00 0x04 _COM_STOP1 _COM_STOP2 1 stop bit. 2 stop bits. 0x08 0x18 _COM_NOPARITY _COM_ODDPARITY _COM_EVENPARITY No parity Odd parity Even parity 0x20 0x40 _COM_110 _COM_150 _COM_300 110 baud 150 baud 300 baud ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. More on cmd example, if abyte = 0xEB = (0xE0 | 0x08 | 0x00 | 0x03) = (_COM_9600 | _COM_ODDPARITY | _COM_STOP1 | _COM_CHR8) The communications port is set to 9600 baud (0xE0 = _COM_9600) Odd parity (0x08 = _COM_ODDPARITY) 1 stop bit (0x00 = _COM_STOP1) 8 data bits (0x03 = _COM_CHR8) 0x60 0x80 0xA0 0xC0 0xE0 _COM_600 _COM_1200 _COM_2400 _COM_4800 _COM_9600 600 baud 1200 baud 2400 baud 4800 baud 9600 baud ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. 16 Bit status register 15. Time out (set to 1 if abyte value could not be sent) 14. Transmit shift register empty. 13. Transmit holding register empty. 12. Break detect. 11. Framing error. 10. Parity error. 09. Overrun error 08. Data ready. (status bits) 07. Change in clear to send. 06. Change in data set ready. (lower bits) 05. Trailing edge ring detector. 04. Change in receive line signal detector 03. Clear to send. 02. Data set ready. 01. Ring indicator. 00. Received line signal detect 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. _BIOS_SERIALCOM() #include <bios.h> #include <conio.h> #define COM1 0 #define DATA_READY 0x100 #define TRUE 1 #define FALSE 0 #define SETTINGS (_COM_1200 | _COM_CHR7 | _COM_STOP1 | _COM_NOPARITY) int main(void) { unsigned in, out, status; _bios_serialcom(_COM_INIT, COM1, SETTINGS); printf("... _BIOS_SERIALCOM [ESC] to exit ...\r\n"); ACCEL SOFTWARE AND TECHNOLOGIES LTD.

ACCEL SOFTWARE AND TECHNOLOGIES LTD. _BIOS_SERIALCOM() for (;;) { status = _bios_serialcom(_COM_STATUS, COM1, 0); if (status & DATA_READY) if ((out = _bios_serialcom(_COM_RECEIVE, COM1, 0) & 0x7F) != 0) putch(out); if (kbhit()) if ((in = getch()) == '\x1B') break; _bios_serialcom(_COM_SEND, COM1, in); } return 0; ACCEL SOFTWARE AND TECHNOLOGIES LTD.