- 1
Output is wrong,but what is wrong with code,can you help me to fix it?
DOSSEG .MODEL SMALL .STACK 200H .DATA STRING DB 'cScbd
#x27; STRING_LENGTH EQU $-STRING STRING1 DB STRING_LENGTH DUP (?) , '#x27; .CODE MOV AX,@DATA MOV DS,AX XOR SI,SI XOR DI,DI MOV CX,STRING_LENGTH S: MOV BL,STRING[DI] AND STRING[DI],11100000B CMP STRING[DI],01100000B JNE L1 AND STRING[DI],01000000B MOV AL,STRING[DI] MOV STRING1[SI],AL ADD SI,2 ADD DI,2 LOOP S L1: XOR STRING[DI],01010101B MOV AL,STRING[DI] MOV STRING1[SI],AL ADD SI,2 ADD DI,2 LOOP S LEA DX,STRING1 INT 21H MOV AH,4CH INT 21H END9 Answers
+ 1
my question was answered here
https:
stackoverflow.com/questions/50746223/enter-a-string-of-characters-the-latin-lowercase-letters-turn-capital-letters-a
+ 1
Levon Muradyan Can you post the expected output then the actual output?
+ 1
Ah, so I'm guessing you forgot a null terminator after the string.
0
It would be better if you show us the code you have problem with.
0
What code?
0
assembly
0
What's the output?
0
output is garbage