Write the command line used go create assembly language program for addition and substraction
Answers
Answered by
2
The ADD and SUB instructions are used in assembly language program for addition and subtraction.
Explanation:
- The ADD instruction is used for adding a source operand to a destination operand of the same size. The command line is as follows,
.data
Var1 DWORD 1000h
Var2 DWORD 2000h
.code
mov eax,var1 ;EAX = 1000h
add eax,var2 ;EAX = 2000h
- The SUB instruction is used for subtracting the source operand from destination operand. Here we write the command line as follows,
sub eax,var2
To know more about assembly language program,
1) Write an assembly language program using 8086,.......
https://brainly.in/question/7022832
2) Write and run an 8086 assembly language program .......
https://brainly.in/question/9060311
Similar questions