LC3 assembly-how to print the next character of a character

897 views Asked by At

My aim is to create a program that receives a letter and then prints the "next letter".To be more specific,if the input is "P",the output should be "Q". This is my code:

.ORIG x3000
LEA R4,DATA
LDR R0,R4,#0
ADD R0,R0,#1
TRAP X21
HALT

DATA .FILL x5001
.END

x5001 has definitely "P",I have checked it.So I am exmpecting to see a "Q" as output.However,I get a strange looking symbol together with P instead!What's wrong with this code?Thank you in advance.

0

There are 0 answers