この 8086 アセンブル プログラムを文字列比較用に作成しましたが、無限ループが含まれています。確認して再確認しました。誰かが私が間違っている場所を見つけることができますか?
org 100
jmp start
str1: db "hello$"
str2: db "ello$"
start:
lea bx,str1
mov si,bx
lea ax,str2
mov di,ax
mov ax,1234
jmp compare
compare:
mov bl,[si]
cmp [di],bl
jne notequal
cmp bx,'$'
je equal
inc si
inc di
jmp compare
notequal:
mov ax,0000h
hlt
equal:
mov bx,0001h
hlt
ret