1. Engineering
2. Computer Science
3. how do i do this write lmc programs to complete...

# Question: how do i do this write lmc programs to complete...

###### Question details

How do I do this:

Write LMC programs to complete the following task. Write the solutions using Numeric code and using Mnemonics and Labels.

Write two programs, one to Add two numbers and another Subtract two numbers.

How do I write this out in an LMC editor? I am new to this so I don't understand how to do this. As I keep getting "Duplicate Logic Error" every time I try to enter the below code:

INP
STA first
INP
OUT
HLT 

Program to subtract two numbers -

INP
STA first
INP
SUB first
OUT
HLT 

Do I need to enter the below image out in the LMC editor to solve the question above?