Docsity
Docsity

Prepare-se para as provas
Prepare-se para as provas

Estude fácil! Tem muito documento disponível na Docsity


Ganhe pontos para baixar
Ganhe pontos para baixar

Ganhe pontos ajudando outros esrudantes ou compre um plano Premium


Guias e Dicas
Guias e Dicas


Programaçao com interrupçao de video, Manuais, Projetos, Pesquisas de Programação Assembly

Neste documento e apresentado a fundo sobre a programaçao com a interrupçao de video 10h.

Tipologia: Manuais, Projetos, Pesquisas

2021

Compartilhado em 10/07/2021

bft-corporations
bft-corporations 🇧🇷

2

(1)

2 documentos

1 / 11

Toggle sidebar

Esta página não é visível na pré-visualização

Não perca as partes importantes!

bg1
Assembly Language LAB
Islamic University Gaza
Engineering Faculty
Department of Computer Engineering
2013
ECOM 2125: Assembly Language LAB
Eng. Ahmed M. Ayash
Lab # 12
VIDEO Programming with INT
10h
&
Screen Buffer
April 22, 2013
pf3
pf4
pf5
pf8
pf9
pfa

Pré-visualização parcial do texto

Baixe Programaçao com interrupçao de video e outras Manuais, Projetos, Pesquisas em PDF para Programação Assembly, somente na Docsity!

Assembly Language LAB

Islamic University – Gaza

Engineering Faculty

Department of Computer Engineering

ECOM 2125: Assembly Language LAB

Eng. Ahmed M. Ayash

Lab # 12

VIDEO Programming with INT

10h

Screen Buffer

April 22, 2013

Objective:

  • To learn about Video Programming and Screen buffer.

Theory:

When an application program needs to write characters on the screen in text mode, it can choose between three types of video output:

 MS-DOS-level access:

Any computer running or emulating MS-DOS can use INT 21h to write text to video display.

 BIOS-level access:

Characters are output using INT 10h function, known as BIOS services. This executes more quickly than int 21h, and permits the control of text color.

 Direct video access:

Characters are moved directly to video RAM (screen buffer), so the execution is instantaneous. 

Screen Buffer:  The screen buffer begins at B800:0000 and it has some rows and columns.  Number of columns is usually 80.  Number of rows can be 25 or 40 in most cases.  Each line on screen takes 160 bytes (80 x 2 byte for CHARACTER + ATTRIBUTE).

VIDEO Programming with INT 10h: There are two general types of video modes: text mode and graphics mode. Video Text Mode: Fonts : Characters are generated from a memory-resident table of character fonts. Originally, the table was in ROM, but later versions of the BIOS permitted programmers to rewrite the character tables at run time. This makes it possible to create custom fonts in text mode.

Video Text Pages : Text mode video memory is divided into multiple separate video pages, each with the ability to hold a full screen of text. Programs can display one page while writing text to other hidden pages, and they can rapidly flip back and forward between pages. In the days of high-performance MS-DOS applications, it was often necessary to keep several text screens in memory at the same time. With the current popularity of graphical interfaces, this text page feature is no longer so important. The default video page is Page 0.

INT 10h Video Functions:

  • AH register contains the function number
  • 00h: Set video mode
    • Text modes listed in Table 2
    • Graphics modes listed in Table 3
  • 01h: Set cursor lines
  • 02h: Set cursor position
  • 03h: Get cursor position and size
  • 06h: Scroll window up
  • 07h: Scroll window down
  • 08h: Read character and attribute
  • 09h: Write character and attribute
  • 0Ah: Write character
  • 10h (AL = 03h): Toggle blinking/intensity bit
  • 0Fh: Get video mode

Lab work:

Excercise1:

Clean the screen using the INT 10h Video bios , then print the word "Hello" in the center of the screen.

Excercise3: Write a program to color the screen background with three colors vertically. Output:

Homework:

Write a program to color the screen background with three colors horizontally, Like this: