ICS312 Set 18 - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

ICS312 Set 18

Description:

ICS312 Set 18 Graphics Mode Programming And Mouse Functions 3 ways to send output to the screen Direct Video access: This method moves characters directly to the ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 7
Provided by: RuthW181
Category:
Tags: buffer | ics312 | method | set

less

Transcript and Presenter's Notes

Title: ICS312 Set 18


1
ICS312 Set 18
  • Graphics Mode Programming
  • And Mouse Functions

2
3 ways to send output to the screen
  • Direct Video access  This method moves
    characters directly to the video buffer in
    memory.  Provides best performance.
  • BIOS-level access  This method displays
    characters using the BIOS video routines of INT
    10h.
  • DOS-level access  Very poor performance and
    infrequently used.

3
RecallINT 10h Video Functions
00h Set Video Mode.  Selects the video mode and
clears the screen automatically. Input   AH
0    AL 3        mode 3 80 cols   x 25
rows color text                  to avoid
clearing the screen use mode 83h to set high
bit    AL 13h     sets resolution to 320 x
200 graphics modeWhen BIOS sets the display
mode, it also clears the screen.
4
Graphics Demo Program
This demo program illustrates writing directly to
the video buffer which is much faster than using
the specialized graphics display functions that
are provided by INT 10h or INT 21h.
Title Graphics Demo to write a yellow
horizontal line 150 pixels long, starting at col
10, row 30 .model small .386
.stack 100h .code main
proc set graphics mode
mov ah, 0 mov al, 13h
320 X 200 graphics mode int 10h
5
Graphics Demo Program (Cont.1)
prepare for string instructions
mov ax, 0A000h set ES
mov es, ax cld
set DF for left to right
mov al, 0eh set color as
yellow mov cx, 150
number of pixels to display mov di,
3032010 di rows 320 cols
REP STOSB writes the byte in Al
repetitively CX times starting at ESDI
6
Graphics Demo Program (Cont.2)
wait for keystroke mov ah, 1
int 21h mov ax, 4C00h int
21h main endp end main
Write a Comment
User Comments (0)
About PowerShow.com