Professional Documents
Culture Documents
THEORY:
LDA 2050H: Load the data of 2050H to Accumulator.
CMA: Compliment the data stored in accumulator.
STA 2052H: Stored the result in 2052H memory location from the accumulator.
LDA 2051H: Load the data of 2051H to Accumulator.
CMA: Compliment the data stored in accumulator.
STA 2053H: Stored the result in 2053H memory location from the accumulator.
HLT: Terminate the program.
SYNTAX:
LDA 2050H (1ST INPUT)
CMA
STA 2052H (1ST OUTPUT)
LDA 2051H (2ND INPUT)
CMA
STA 2053H (2ND OUTPUT)
HLT
PROGRAM:
MEMORY
OPCODE NEMONICS BYTE
LOCATION
2000 3A LDA 2050H 3
2001 50
2002 20
2003 2F CMA 1
2004 32 STA 2052H 3
2005 52
2006 20
2007 3A LDA 2051H 3
2008 51
2009 20
200A 2F CMA 1
200B 32 STA 2053H 3
200C 53
200D 20
200E 76 HLT 1
RESULT:
INPUT
2050H 55
2051H 55
OUTPUT
2052H AA
2053H AA