Home > other >  Type string, and one character at a time. If there is a character in the string view. No problem suc
Type string, and one character at a time. If there is a character in the string view. No problem suc

Time:09-18

The DATA SEGMENT
STR 80 DB DUP (?)
AIM the DB?
STR1 DB 'FIND! $'
STR2 DB 'NO FIND! $'
The DATA ENDS
CODE SEGMENT
ASSUME CS: CODE, DS: DATA
START: MOV AX, DATA
MOV DS, AX
LEA DI, STR
CX, MOV 0
AGAIN: MOV AH, 1
INT 21 h
CMP AL, 0 dh
JZ DONE
MOV (DI), AL
INC DL
CX
INC.JMP AGAIN
DONE: MOV AH, 1
INT 21 h
MOV AIM, AL
MOV DL, ah 0
MOV AH, 2
INT 21 h
LEA SI, STR
CLD
CYCLE: LODSB
CMP AL, AIM,
Developed NEXT
LEA DX, STR1
MOV AH, 09 h
INT 21 h
JMP DONE1
NEXT: LOOP CYCLE
LEA DX, STR2
MOV AH, 09 h
INT 21 h
DONE1: MOV AH, 4 ch
INT 21 h
CODE ENDS
The END START

CodePudding user response:

Debugged, before enter the start compare to stop, take a look at the input string, just a letter, it should be no increase in the input buffer pointer, then go to see the original code, find INC DI clerical error became INC for the revision of DL please,

CodePudding user response:

I didn't find the debug, thanks ahhh, ah, I'll be careful

CodePudding user response:

reference 1/f, zara's reply:
debugged, before enter the start compare to stop, take a look at the input string is a letter, it should be no increase in the input buffer pointer, then go to see the original code, find INC DI a slip of the pen has become INC, for the revision of DL please

I didn't find the debug, thanks ahhh, ah, I'll be careful, thanked the inner SKR
  • Related