Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is the assembly code I have but the output for W is coming to = 3 8 when I need it to = 4

this is the assembly code I have but the output for W is coming to =38 when I need it to =42, holding true to the equation W=(X+Y-P+Q): ; INSERT YOUR CODE HERE
ld a,22;
ld (X), a;
ld a,10;
ld (Y), a;
ld a,30;
ld (P), a;
ld a,40;
ld (Q), a;
;
; compute for w
ld a,(X);
ld b, a;
ld a,(Y);
add a, b;
ld b, a;
ld a,(P);
sub b;
ld b, a;
ld a,(Q);
add a, b;
ld (W), a;

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: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions

Question

Explain exothermic and endothermic reactions with examples

Answered: 1 week ago

Question

Write a short note on rancidity and corrosiveness.

Answered: 1 week ago

Question

How did you feel about taking piano lessons as a child? (general)

Answered: 1 week ago