; Take 2 signed 8 bit values in R0, add them, and store the result at x3050 .ORIG x3000 RSHFA R1 R0 #8 ; Isolate the values in to R0 and R1, preserving their LSHF R0 R0 #8 ; signs with arithmetic shifts RSHFA R0 R0 #8 ; Now that they're isolated, we can simply do 2's compliment addition ADD R0 R0 R1 ; Finally, store the result at the desired memory address LEA R1 ANSWER LDW R1 R1 #0 STW R0 R1 #0 HALT ANSWER .FILL x3050 .END