28
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?

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?

Embed Size (px)

Citation preview

Page 1: 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?

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?

Page 2: 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?

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?

MS-DOS-level

BIOS level

Direct video access

Page 3: 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?

Text-Mode Programming

Question #2

• Which level of access produces the fastest output?

Page 4: 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?

Text-Mode Programming

Question #2

• Which level of access produces the fastest output?

Direct Video - characters are moved directly to video RAM, so the execution is instantaneous.

(Full screen mode must be used under Windows NT, 2000, and XP)

Page 5: 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?

Text-Mode Programming

Question #3

• How do you run a program in full-screen mode?

Page 6: 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?

Text-Mode Programming

Question #3

• How do you run a program in full-screen mode?

1.Use ALT-Enter or

2. create a shortcut to the program’s .EXE file. Then open properties dialog for the shortcut, select Screen properties, and select Full-screen mode.

Page 7: 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?

Text-Mode Programming

Question #4

• When a computer is booted in MS-DOS, what is the default video mode?

Page 8: 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?

Text-Mode Programming

Question #4

• When a computer is booted in MS-DOS, what is the default video mode?

Video mode 3 -

(text mode,16 colors,

80 columns x 25 rows)

Page 9: 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?

Text-Mode Programming

Question #5

• Each position on the video display holds what information for a single character?

• How many bytes are needed in memory for each character?

Page 10: 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?

Text-Mode Programming

Question #5

• Each position on the video display holds what information for a single character?– Attribute (color)

• How many bytes are needed in memory for each character?– 2 – one for the character, one for the attribute.

Page 11: 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?

Text-Mode Programming

Question #6

• Which electron beams are required to generate any color on a video display?

Page 12: 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?

Text-Mode Programming

Question #6

• Which electron beams are required to generate any color on a video display?

intensity ,red, green, and blue

Page 13: 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?

Text-Mode Programming

Question #7

• Show the mapping of foreground and background colors in the video attribute byte.

Page 14: 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?

Text-Mode Programming

Question #7

• Show the mapping of foreground and background colors in the video attribute byte.

I R G B I R G B

background foreground

Blink R G B I R G B

Page 15: 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?

Text-Mode Programming

Question #8

• Which INT 10h function positions the cursor on the screen?

• What parameters are required when setting the cursor position with INT 10h?

Page 16: 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?

Text-Mode Programming

Question #8

• Which INT 10h function positions the cursor on the screen?

Function 2

• What parameters are required when setting the cursor position with INT 10h?

DH, DL = row, column values

BH = video page

Page 17: 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?

Text-Mode Programming

Question #9

• Which INT 10h function scrolls text in a rectangular window upward?

• What parameters are required when scrolling text in a window upward?

Page 18: 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?

Text-Mode Programming

Question #9

• Which INT 10h function scrolls text in a rectangular window upward?

Function 6• What parameters are required when scrolling

text in a window upward?AL = number of lines to scroll ( 0=all)BH = video attribute for blanked areaCH, CL = row, column of upper left window

cornerDH, DL = row, column of lower right

window corner

Page 19: 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?

Text-Mode Programming

Question #10

• Which INT 10h function writes a character and attribute at the current cursor position?

• What parameters are required when writing a character and attribute at the current cursor position?

Page 20: 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?

Text-Mode Programming

Question #10• Which INT 10h function writes a character and

attribute at the current cursor position?Function 9

• What parameters are required when writing a character and attribute at the current cursor position?

AL = ASCII code of characterBH = video pageBL = attributeCX = repetition count

Page 21: 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?

Text-Mode Programming

Question #11

• Which INT 10h function sets the cursor size?

Page 22: 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?

Text-Mode Programming

Question #11

• Which INT 10h function sets the cursor size?

Function 1

Page 23: 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?

Text-Mode Programming

Question #12

• Which INT 10h function gets the current video mode?

• What is returned when the function that gets the current video mode is called?

Page 24: 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?

Text-Mode Programming

Question #12

• Which INT 10h function gets the current video mode?

Function 0Fh

• What is returned when the function that gets the current video mode is called?

AL = current display mode

Ah = number of columns

BH = active video page

Page 25: 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?

Text-Mode Programming

Question #13

• Which INT 10h function toggles the blinking and intensity mode bit?

Page 26: 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?

Text-Mode Programming

Question #13

• Which INT 10h function toggles the blinking and intensity mode bit?

Function 10h

Page 27: 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?

Text-Mode Programming

Question #14

• Write the ASM code to clear the screen using INT 10h, function 6?

Page 28: 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?

Text-Mode Programming

Question #14

• Write the ASM code to clear the screen using INT 10h, function 6?

Mov ah, 6 ;function 6

mov al, 0 ;scroll entire screen up

int 10h ;use int 10h