text-mode programming question #1 what are the three levels of access to the video display when...
TRANSCRIPT
![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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/1.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/2.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/3.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/4.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/5.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/6.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/7.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/8.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/9.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/10.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/11.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/12.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/13.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/14.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/15.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/16.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/17.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/18.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/19.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/20.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/21.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/22.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/23.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/24.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/25.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/26.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/27.jpg)
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?](https://reader030.vdocuments.net/reader030/viewer/2022032414/56649ee55503460f94bf3fe5/html5/thumbnails/28.jpg)
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