I've been working on this bit of code to take a string of input and to have it displayed after I hit the enter key, but it doesn't work for some reason and I can't figure out where I'm going wrong at all. I would love some help to figure this one out.
LD R1, RT
LEA R2, ARRAY
INPUT GETC ;read the input character
OUT ;echoes the character
ADD R3, R0, R1
BRz ENDINPUT
STR R0, R2, #0
ADD R2, R2, #1
BR INPUT
ENDINPUT
STR R3, R2, #0
LEA R0, ARRAY ;outputs the string of characters
PUTS