This document contains 12 questions and answers related to assembly language programming. Each question asks the student to write an assembly language program to perform a specific operation like printing a message, adding two hexadecimal numbers, subtracting two hexadecimal numbers, and multiplying two hexadecimal numbers. For each question, the student provides the assembly language code to implement the required operation along with appropriate labels, directives and interrupts.
This document contains 12 questions and answers related to assembly language programming. Each question asks the student to write an assembly language program to perform a specific operation like printing a message, adding two hexadecimal numbers, subtracting two hexadecimal numbers, and multiplying two hexadecimal numbers. For each question, the student provides the assembly language code to implement the required operation along with appropriate labels, directives and interrupts.
This document contains 12 questions and answers related to assembly language programming. Each question asks the student to write an assembly language program to perform a specific operation like printing a message, adding two hexadecimal numbers, subtracting two hexadecimal numbers, and multiplying two hexadecimal numbers. For each question, the student provides the assembly language code to implement the required operation along with appropriate labels, directives and interrupts.
9. Write an Assembly language program to print “WELCOME TO JAIN
DEEMED –TO-BE UNIVERSITY”
Ans. .MODEL SMALL
.STACK 100H .DATA MSG DB ‘WELCOME TO JAIN DEEMED –TO-BE UNIVERSITY!$’ .CODE MAIN PROC MOV AX, @DATA MOV DS,AX LEA DX,MSG MOV AH,9 INT 21H MOV AH,4CH INT 21H MAIN ENDP END Varshini Ramaswamy ACA 17/10/2020
10. Write an Assembly language program to ADD two hexadecimal
number.
Ans. data segment
a dw 03h b dw 05h c dw ? data ends code segment assume cs:code, ds:data start: mov ax, data mov ds,ax mov ax,a mov bx,b add ax,bx mov c,ax int 3 code ends end Varshini Ramaswamy ACA 17/10/2020
11. Write an Assembly language program to subtrac two hexadecimal
numbers
Ans. data segment
a dw 04h b dw 02h c dw ? data ends code segment assume cs:code, ds:data start: mov ax, data mov ds,ax mov ax,a mov bx,b sub ax,bx mov c,ax int 3 code ends end Varshini Ramaswamy ACA 17/10/2020
12. Write an Assembly language program to multiply two hexadecimal
numbers
Ans. data segment
a dw 02h b dw 05h c dw ? data ends code segment assume cs:code, ds:data start: mov ax, data mov ds,ax mov ax,a mov bx,b mul ax,bx mov c,ax int 3 code ends end