Code in Asembly Language, and provide comments for each line of code. In the dat
ID: 3744465 • Letter: C
Question
Code in Asembly Language, and provide comments for each line of code.
In the data section of your code create two WORD variables named num1 and num2. Create two DWORD variables named num3 and num4. Fill the variables with numbers taken from the keyboard. Once you have the variables filled, sum all of the numbers then output sum with a prompt like "The sum of your numbers is: ". Then output the numbers in reverse order with a prompt like "Your numbers in reverse order are: ". In other words num4, num3, num2, num1.
Your program should look something like this:
Explanation / Answer
DATA SEGMENT
MSG1 DB 10,13,'ENTER ANY STRING :- $'
MSG2 DB 10,13,'LENGTH OF STRING IS :- $'
MSG3 DB 10,13,'REVERSE OF ENTERED STRING IS :- $'
P1 LABEL BYTE
M1 DB 0FFH
L1 DB ?
P11 DB 0FFH DUP ('$')
P22 DB 0FFH DUP ('$')
DATA ENDS
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.