I try to write an assembly code that determines if 28 is a perfect number or not. But I have a problem. When I run the code, emu8086 doesn't recognize my labels.
For example in this code:
mov dl,1ch
mov bl,00h ;sum
mov cl,1ch ;counter
dec cl
HERE : mov ax,00h
mov al,dl
div cl ;ax/dl ah=remainder
cmp ah,00h
je SUM ; if ah=0 jump the label SUM
loop HERE
mov dh,00h
cmp dl,bl
je PERFECT
hlt
SUM :
add bl,cl
jmp HERE
PERFECT :
mov dh,01
hlt
When loop HERE
instruction should run, emu8086 runs the first instruction (mov dl,1ch
) of my code. What can I do? What is the problem?
Thanks in advance...
Remove the blank space between the label name and the colon :
It should be :