- 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 END

7th Jun 2018, 11:22 AM
Levon Muradyan
Levon Muradyan - avatar
9 Respuestas
+ 1
my question was answered here https: stackoverflow.com/questions/50746223/enter-a-string-of-characters-the-latin-lowercase-letters-turn-capital-letters-a
11th Jun 2018, 10:27 AM
Levon Muradyan
Levon Muradyan - avatar
+ 1
Levon Muradyan Can you post the expected output then the actual output?
11th Jun 2018, 10:22 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
Ah, so I'm guessing you forgot a null terminator after the string.
11th Jun 2018, 11:03 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
It would be better if you show us the code you have problem with.
7th Jun 2018, 11:23 AM
Skye
Skye - avatar
0
What code?
7th Jun 2018, 11:24 AM
Andre Daniel
Andre Daniel - avatar
0
assembly
7th Jun 2018, 11:31 AM
Levon Muradyan
Levon Muradyan - avatar
0
What's the output?
11th Jun 2018, 9:21 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
output is garbage
11th Jun 2018, 9:40 AM
Levon Muradyan
Levon Muradyan - avatar