Write an assembly level program for the following pseudo code : SUM = 0 SUM = SUM + A + B DIF = DIF-C SUM = SUM + DIF

March 9, 2024 · By Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

CLA /SUM = 0
STA SUM
LDA SUM /Load current sum
ADD A /Add A to SUM
ADD B /Add B to SUM
STA SUM /Save SUM
LDA C /Load C to AC
CMA /Create 2’s complement
INC
ADD DIF /Subtract C from DIF
STA DIF /Save DIF
ADD SUM /Add SUM to DIF
STA SUM /Save SUM
HLT /Halt

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion