Question: IV. (15 points) Programming A memory variable dictionary consists of multiple words according to the two rules as follows . for each word, the length

 IV. (15 points) Programming A memory variable dictionary consists of multiple

IV. (15 points) Programming A memory variable dictionary consists of multiple words according to the two rules as follows . for each word, the length of the word is followed by the actual characters a special symbol IAh is used to mark the end of the dictionary Below are two dictionary examples dictionary db 8, "Holidays ". IAh; one 8-character word defined dictionary db 5, "Happy"8, "Holidays ". IAh; two words with 5 and 8 characters 4.1 (2 pts) Write an 8086 assembler directive to define exactly three words of your choice in dictionary in .data section. 4.2 (3 pts) Make corrections about the following program so that it will print the first word in the dictionary onto the screen under DOS. Consider only the parts in bold model small stack 100h data dictionary db 256 dup (?); assume multiple words to be defined here firstWord db 256 dup (?); will store the first word code start mov ax, @data mov ds, ax mov si, offset dictionary mov di, offset firstString mov cx, Isil copy: mov byte ptr [dil, byte ptr [si] inc si inc di loop copy print: mov dx, offset firstString mov ah, 09h int 21h mov ax, 4c00h int 21h end start IV. (15 points) Programming A memory variable dictionary consists of multiple words according to the two rules as follows . for each word, the length of the word is followed by the actual characters a special symbol IAh is used to mark the end of the dictionary Below are two dictionary examples dictionary db 8, "Holidays ". IAh; one 8-character word defined dictionary db 5, "Happy"8, "Holidays ". IAh; two words with 5 and 8 characters 4.1 (2 pts) Write an 8086 assembler directive to define exactly three words of your choice in dictionary in .data section. 4.2 (3 pts) Make corrections about the following program so that it will print the first word in the dictionary onto the screen under DOS. Consider only the parts in bold model small stack 100h data dictionary db 256 dup (?); assume multiple words to be defined here firstWord db 256 dup (?); will store the first word code start mov ax, @data mov ds, ax mov si, offset dictionary mov di, offset firstString mov cx, Isil copy: mov byte ptr [dil, byte ptr [si] inc si inc di loop copy print: mov dx, offset firstString mov ah, 09h int 21h mov ax, 4c00h int 21h end start

Step by Step Solution

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 Databases Questions!