Question: Write a program to do the following. part e, f, and g is required. test your program in emu8086. Attached is the answer from a

Write a program to do the following.  part e, f, and g is required. test your program in emu8086. Attached is the answer from a to d (you can make any edit as long as it works).

(a) Scroll a window from row 5, column 10 to row 20, column 70, with a reverse video attribute.

(b) Locate the cursor at row 10, column 20.

(c) Display a line of text, such as, THIS TEXT IS IN THE WINDOW

(d) After the line of text is displayed, wait for a key to be pressed.

(e) Scroll a window from row 7, column 12 to row 18, column 68, with a normal attribute.

(f) Write a character A with a blinking attribute in the middle of the window.

(g) Wait for a key stroke, and then clear entire screen with a normal attribute.

.8086

.model small

.stack 256

.data

; this is the data that we have to display in screen

msg DB 'THIS TEXT IS IN THE WINDOW' , '$'

.code

main PROC

;intiliaize ds

mov ax, @data

mov ds, ax

; now we will scrool a window from row 5 , column 10 to row 20 , column 70 using int 10h and function 6

mov ah , 6 ; function 6 is used to scroll window up

mov al , 0 ; displays the number of to scroll (0 means all)

mov ch, 5 ; upper left row

mov cl , 20 ; upper left column

mov dh , 20 ; lower right row

mov dl , 70 ; lower right column

mov bh , 70h ; 70h is the code for reverse video attribute

int 10h ; here part a is completed

;;;;;;;;;;;;;;;;;;;;; part b to locate the cursor at row 10 , column 20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mov ah , 2 ; function for setting cursor position

mov dh , 10 ; will set the cursor position to row 10

mov dl , 20 ; will set the cursor position to column 20

mov bh , 0 ; video page 0

int 10h ; here part b is completed

;;;;;;;;;;;;;;;;;;;;;;;;;;; part c to display the line of text ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mov ah , 9h

mov dx , offset msg

int 21h ; this will print the msg declared int the data

;;;;;;;;;;;;;;;;;;;;;;;;;;; part d - after the line is displayed wait for the keypress.

mov ah , 0

int 16h

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

mov ah , 4ch

int 21h

end main


Step by Step Solution

3.32 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!