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

Hello, please help ( Computer Assembly ) please compile the following code in Vi

ID: 3727223 • Letter: H

Question

Hello, please help (Computer Assembly) please compile the following code in Visual studio and provide an exe code or the output.

**Do problem 6 on page 94 (page 81, add variables) using a 64 bit program using Visual Studio. Use all 64-bit registers.   Submit a source file (.asm) and an executable file (.exe)

TITLE AddVariables program (addVar.asm)

; This program calculates the sum of three 64-bit integers

.386

.model flat,stdcall

.stack 4096

ExitProcess PROTO, dwExitCode:QWORD

.data

firstval QWORD 1111000000001100h

secondval QWORD 2222111100000011h

thirdval QWORD 3333222200001111h

sum QWORD 0

.code

main PROC

mov rax,firstval

add rax,secondval

add rax,thirdval

mov sum,rax

call ExitProcess,0

exit

main ENDP

END main

Explanation / Answer

Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim sum As Integer Dim a As Integer Dim b As Integer Dim c As Integer Label4.Visible = True If TextBox1.Text = "" Then Label4.Visible = False MessageBox.Show("Sorry cannot be empty.") TextBox1.Focus() End If a = Val(TextBox1.Text) b = Val(TextBox2.Text) c = Val(TextBox3.Text) sum = (a + b+c) Label4.Text = "The sum of " & a & " and " & b & " and " & c & " is " & sum & "." End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Label4.Visible = False End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" Label4.Text = "" TextBox1.Focus() End Sub End Class