screen processing

12
SCREEN PROCESSING

Upload: jhe04

Post on 13-Nov-2014

243 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Screen Processing

SCREEN PROCESSING

Page 2: Screen Processing

04

/08

/20

23

2

THE MONITOR

A typical video screen has 80 columns numbered 0 to 79 and 25 rows numbered from 0 to 24

The columns and rows provide a grid of addressable locations at any one of which the cursor can be set

Example cursor locations:Screen location Column # Row # In Decimal Value

Column # Row # In Hexadecimal Value

Upper left corner 0 0 00h 00h

Upper right corner

79 0 4Fh 00h

Center of screen 40 12 28h 0Ch

Lower left corner 0 24 00h 18h

Lower right corner

79 24 4Fh 18h

Page 3: Screen Processing

04

/08

/20

23

3

CLEARING THE SCREEN IN ASSEMBLY LANGUAGE

Interrupt 10h function 06h handles the process of clearing the screen and scrolling

MOV AH, 06HMOV BH, 07HMOV CX, 0000HMOV DX, 184FHINT 10H

Page 4: Screen Processing

04

/08

/20

23

4

SETTING THE CURSOR POSITION

Interrupt 10h is the BIOS operation for screen handling and function 02h tells the operation to set the cursor

MOV AH, 02HMOV BH, 00HMOV DH, 0AHMOV DL, 08HINT 10H

Page 5: Screen Processing

04

/08

/20

23

5

DISPLAYING THE CHARACTER ‘X’ AT THE CENTER OF THE SCREEN

Page 6: Screen Processing

04

/08

/20

23

6

DISPLAYING A STRING AT THE CENTER OF THE SCREEN

Page 7: Screen Processing

04

/08

/20

23

7

DISPLAYING ASCII CHARACTER SET

Character Single

Line

Hex Code Character Double

Line C4 CD B3 BA

BF BB

D9 BC

DA C9

C0 C8

Page 8: Screen Processing

04

/08

/20

23

8

COLOR CHART

For colored monitors, the background can display one out of eight colors and text can display one out of 16 colors

Page 9: Screen Processing

04

/08

/20

23

9

Color Hex Code

Intensity

Red Green blue

BLACK 0 0 0 0 0

BLUE 1 0 0 0 1

GREEN 2 0 0 1 0

CYAN 3 0 0 1 1

RED 4 0 1 0 0

MAGENTA 5 0 1 0 1

BROWN 6 0 1 1 0

WHITE 7 0 1 1 1

GRAY 8 1 0 0 0

LIGHT BLUE 9 1 0 0 1

LIGHT GREEN A 1 0 1 0

LIGHT CYAN B 1 0 1 1

LIGHT RED C 1 1 0 0

LIGHT MAGENTA

D 1 1 0 1

YELLOW E 1 1 1 0

HIGH INTENSITY WHITE

F 1 1 1 1

Page 10: Screen Processing

TEXT AND BACKGROUND COLOR

Example how to set the text and background colors and how to make them blink

Page 11: Screen Processing

04

/08

/20

23

11

DISPLAYING CHARACTER ‘X’ WITH ATTRIBUTE

Page 12: Screen Processing

04

/08

/20

23

12

DISPLAYING A STRING WITH ATTRIBUTES