+/EE460N
computer architecture
git clone https://git.julia.blue/+/EE460N
d5b1109
master
1; Take 2 signed 8 bit values in R0, add them, and store the result at x3050 2.ORIG x3000 3RSHFA R1 R0 #8 ; Isolate the values in to R0 and R1, preserving their 4LSHF R0 R0 #8 ; signs with arithmetic shifts 5RSHFA R0 R0 #8 6 7; Now that they're isolated, we can simply do 2's compliment addition 8ADD R0 R0 R1 9 10; Finally, store the result at the desired memory address 11LEA R1 ANSWER 12LDW R1 R1 #0 13STW R0 R1 #0 14HALT 15 16ANSWER .FILL x3050 17 .END