You are calling read for a single character, but then you use
ldr r1, [sp]
This will load a whole 32-bit word. Your stack will contain "random" data, making 24-bit of r1 random.
You should use
ldrb r1, [sp]
instead. Also you have to make sure that you allocate space on the stack for this value.
There are also some other missing parts in the code, you don't check for the upper boundary (0x39) on the read value. The code will always return 0, as the mov r0, #1 is always superseded by the mov r0, #0 in "store:"