Question: how to fix my code in assembly language using pep 8 . It needs to do the following. Write a program to add 4 0

how to fix my code in assembly language using pep8.It needs to do the following. Write a program to add 40(decimal) and -10(decimal). There is no input, so these integers should be stored in memory. Output the result. Verify you can do the above program WITH INPUT. There is a video in this weeks module called
Add2Integers. if you could please help me fix the errors
ASCII: ;ERROR: Must have mnemonic or dot command after symbol definition.
.WORD 40
.WORD -10
.WORD 0
BR main
main:
LDA 0, x ; Load 40 into the accumulator
ADD 2, x ; Add -10 to the value in the accumulator
STA 4, x ; Store the result in memory
LDA 4, x ; Load the result into the accumulator
DECO 4, x ; Output the result as a decimal number
STOP ; Stop the program
.END

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!