; read input digits into R1 and R2, compute sum and output to display .ORIG x3000 AND R1, R1, #0 ;initialize R1 to zero AND R2, R2, #0 ; initialize R2 to zero LD R4, save ; load memory location into R4 STR R1, R4, #0 ; LD R3, Neg ; load negative x30 into R3 IN ; read input number into R0 ADD R1, R3, R0 ; store first number in R1 after conversion from ASCI IN ; read second number ADD R2, R3, R0 ; store second number into R2 ADD R0, R2, R1 ; add the two numbers and store into R0 LD R3, ASCII ; move x30 into R3 ADD R0, R0, R3 ; add x30 to result in R0 to convert to ASCII OUT ; print sum onto display HALT Neg .FILL xFFD0 ; negative x30 or decimal -48 ASCII .FILL x30 ; add x30 save .FILL x23 ; location in memory .END