Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, I just want to check if my code follows the instructions for part 3B in asse

ID: 3751412 • Letter: H

Question

Hi, I just want to check if my code follows the instructions for part 3B in assembly language. Thanks.

INSTRUCTIONS:

CODE:

; TITLE Adding four 32-bit Integer Variables (3B.asm)
; Program Description:
; This program will contain four 32-bit integer variables and add these values together, saving the result in a variable The sum should still be in the EAX register when you call the library routine DumpRegs.
; Author: Yen Jiu
; Creation Date: September 20, 2018
; Status: Completed

INCLUDE Irvine32.inc
.data
; declaring hexadecimal variables
var1 SDWORD 30050201h
var2 SDWORD 60040102h
var3 SDWORD 72010103h
var4 SDWORD 0B0700105h

.code
main PROC
MOV EAX, var1 ; moving var1 to EAX register
ADD EAX, var2 ; adding var2 to EAX register
ADD EAX, var3 ; adding var3 to EAX register
ADD EAX, var4 ; adding var4 to EAX register

call dumpregs ; displaying registers
call Waitmsg

exit
main ENDP
END main

OUTPUT:

Assignment 3A - A program that adds and subtracts 32-bit numbers After installing the assembler on the computer, enter the following program, save it, assemble it and run it. Do not forget to add a comment with your name in it You will hand in a listing (e.g., addsum.asm) that should include your name TITLE Add and Subtract (AddSum.asm) This program adds and subtracts 32-bit integers

Explanation / Answer

As per the code the instruction mentioned we're executed.and the result also clears that the output is accurate.and the EAX value also contains the sum value when eexecute DumpReg instruction.so it follows all the instructions specified in 3B question.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote