Question: Assembly language Exercise 1: Using the AddSub program from the book as a reference, write an assembly program to perform the following operations using only
Assembly language

Exercise 1: Using the AddSub program from the book as a reference, write an assembly program to perform the following operations using only 16-bit registers: AX = 20 - (15+ 30). You must perform 15 +30 first and then perform the subtraction operation. Use additional registers as needed. Insert a call DumpRegs statement after each operation and confirm that AX is holding the correct result. Add a comment after each instruction to describe it. For example: mov bx, 1 ; assign 1 to bx so bx = 1 add bx, 2 ; add 2 to bx so bx = 3 In addition, display the message "Author: Your Name" at the beginning of your program by defining a null-terminated string and then add a call WriteString instruction. Once your program is working correctly, modify it to add the following calculation: BX = a - b + d), but do keep the code from previous step. Once again, you must perform addition operation first and then perform the subtraction operation. Define variables a, b, and d as 16-bits signed integers with values 20, 15, and 30 respectively. Use DumRegs to confirm that it calculates the result for BX correctly. ; instructions to calculate AX = 20 - (15 + 30), using constants instructions to calculate BX = a - b + d), sing variables ; AX and BX should have the same value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
