For the ARM architecture, we make system calls using the SVC command. My recommendation is the following ARM What is semi-hosting? . In particular, select any version, select Arm Compiler Toolchain Developing Software ..., then select Semihosting to see the available system call numbers.
One wants to define a getChar() procedure that leaves a char in the r0 register. According to the documentation, r1 must be 0 when called, and after the exit, r0 contains the read character. So we think something like
mov r1,#0 mov r0,#7 svc 123456
Must be the main ingredients. However, the program does not wait for input. I can also say for sure that the register r0 always contains the value 0 after the exit. Any thoughts on what's going on? I suspect the problem is understanding what the console means in the documentation.
source share