; read 4 input digits, convert from ASCII and store into an Array .ORIG x3000 LEA R3, Array ; load address of Array into R4 LD R6, Neg ; load negative x30 into R3 LD R7, COUNT ; load counter, with value 4, into R7 LEA R0, msg1 PUTS AGAIN TRAP x23 ; read input ADD R0, R0, R6 ; convert to binary from ASCII STR R0, R3,#0 ;store number in array ADD R3, R3, #1 ;increment pointer to next element in array ADD R7, R7, -1 ; decrement counter BRp AGAIN LEA R0, msg PUTS HALT msg1 .STRINGZ "Start Reading 4 numbers" msg .STRINGZ "Done Reading 4 numbers" Neg .FILL xFFD0 ; negative x30 or decimal -48 COUNT .FILL #4 Array .BLKW #10 ;allocate 10 words for Array .END