BR Main ;branch to location Main sum: .WORD 0x0000 ;set up word with zero num1: .BLOCK 2 ;set up a two byte block for num1 num2: .BLOCK 2 ;set up a two byte block for num2 num3: .BLOCK 2 ;set up a two byte block for num3 Main: LDA sum,d ;load zero into the accumulator DECI num1,d ;read and store a decimal number in num1 ADDA num1,d ;add the contents of num1 to accumulator DECI num2,d ;read and store a decimal number in num2 ADDA num2,d ;add the contents of num2 to accumulator DECI num3,d ;read and store a decimal number in num3 ADDA num3,d ;subtract the contents of num3 from accumulator STA sum,d ;store contents of the accumulator into sum DECO sum,d ;output the contents of sum STOP ;stop the processing .END ;end of the program