Im trying to make a caesar cipher in wasp where i put a number in and then the letters move by that number so if i put 5 in then H changes to M but when i put a number in to save to the variable it doesnt work.
My code below:
MOV AX, [0xF5]
MOV [switch], AX
wait1: // Waiting for data from input
MOV AX,[0xF5]
CMP AX,0x0
JEQ wait1
CMP BX, 0x0
MOV BX,[0xF3] // Read it to register BX
MOV AX,0x0 // Set status
MOV AX, [switch]
ADD BX, AX
MOV AX, 0x0
MOV [0xF5],AX
wait2: // Waiting for console to be ready
MOV AX,[0xF2]
CMP AX, 0x0
JNE wait2
MOV [0xF0],BX // Write to console
MOV [0xF2],AX // Set status
CMP BX, 0x0
JEQ end
JMP wait1
end:
HALT
switch: DC.W 0xF5
The code above is what ive tried but it only moves the letter by 1