Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assembly Language Seveth Edition Using the AddTwo program from Section 3.2 as a reference, Write a program that calculates the following expression, using registers: A

Assembly Language Seveth Edition

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

I keep getting these two errors for the program below. Do you know why I can't use the letter C and what should I do to fix it?

1>Program Assignment 3B.asm(14): error A2008: syntax error : C 1>Program Assignment 3B.asm(21): error A2008: syntax error : C

; Integer Expression Calculation. ; Chapter 3, 3.10 #1 INCLUDE Irvine32.inc .386 .model flat,stdcall .stack 4096 ExitProcess PROTO, dwExitCode:DWORD .data A DWORD 150 B DWORD 100 C DWORD 50 D DWORD 40 .code main PROC mov eax,A ; EAX=150 mov ebx,B ; EBX=100 mov ecx,C ; ECX=50 mov edx,D ; EDX=40 add eax,ebx ; EAX:(A+B) add ecx,edx ; ECX:(C+D) sub eax,ecx ; EAX:(A+B)-(C+D) mov A,eax ; A=(A+B)-(C+D) call dumpregs INVOKE ExitProcess,0 main ENDP END main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions