0% found this document useful (0 votes)
29 views2 pages

Solution 14

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Solution 14

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Solution:

Program Comment

ORG 100 /Program will start at memory address 100

INPUT /Taking first input(X)

store X /Store value of X

INPUT /Taking second input(y)

store Y /Store value of Y

INPUT /Taking third input(z)

store Z /Store value of Z

load X /Load value of variable X to AC

add Y /Add value of Y to AC (X+Y)

store V /Store result in V

load V /Load value of V to AC

add Z /Add value of Z to AC(X+Y+Z or V+Z)

store W /Store result in W

OUTPUT /Display W

Halt /End of program

X, DEC 0 /Declare variable X

Y, DEC 0 /Declare variable Y

Z, DEC 0 /Declare variable Z

V, DEC 0 /Declare variable V

W, DEC 0 /Declare variable W

END

You might also like