Homework Solution: Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the followi…

    Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression: A (B)(C- D), using registers. Assign integer values to the EAX, EBX, ECX, and EDX registers. (Hint: replace A, B, C, & D with the registers EAX to EDX) A.
    Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression: A = (B)(C- D), using registers. Assign integer values to the EAX, EBX, ECX, and EDX registers.

    Expert Answer

     
    MOV EBX,8; MOV ECX,9;

    Using the AddTwo program from Section 3.2 as a regard, transcribe a program that calculates the forthcoming expression: A (B)(C- D), using history. Assign integer treasures to the EAX, EBX, ECX, and EDX history. (Hint: reinstate A, B, C, & D with the history EAX to EDX) A.

    Using the AddTwo program from Section 3.2 as a regard, transcribe a program that calculates the forthcoming expression: A = (B)(C- D), using history. Assign integer treasures to the EAX, EBX, ECX, and EDX history.

    Expert Apology

     

    MOV EBX,8;

    MOV ECX,9;

    MOV EDX,5;

    SUB ECX,EDX;

    ADD EBX,ECX;

    MOV EAX,EBX;

    Explanation:- The foremost three informations moves integer treasures to the history.

    Fourth information subtracts treasure in EDX from ECX and stores development in ECX

    Fifth information adds treasure in ECX to EBX and stores development in EBX

    Sixth information moves treasure in EBX to EAX