.model small
.stack 100H
.data
A db 'This is a test $'
B db 100 dup('$')
.code
mov ax, @data
mov ds, ax
mov dx,offset A
mov cx,0000h
mov al,'$'
mov ah,' '
strt:
cmp al,[dx]
JE sof
cmp ah,[dx]
JE addd
jmp strt
addd:
inc dx
inc cx
sof:
.exit
end
I got two illegal indexing mode errors in the two cmp lines .