org 00h
using 1
jump equ r1
jump1 equ r5
mov r0,#0a1H
mov r2,#0ah
mov a,#6h 
jump:  sub r2,a
jump1: inc r0
jz jump
cjne a,#00h,jump1
end

assembling e06.asm...
e06.asm(8): error A8: ATTEMPT TO DEFINE AN ALREADY DEFINED LABEL
e06.asm(8): error A9: SYNTAX ERROR
e06.asm(9): error A8: ATTEMPT TO DEFINE AN ALREADY DEFINED LABEL
e06.asm(10): error A22: EXPRESSION TYPE DOES NOT MATCH INSTRUCTION
e06.asm(11): error A22: EXPRESSION TYPE DOES NOT MATCH INSTRUCTION
Target not created

jump is a macro which is defined to be the name of a register -- you can use register names as labels. Suggest you just delete lines 3 and 4.

lines 8 and 9 should appear after lines 10 and 11. The way they appear now lines 8 and 9 will always be executed regardless of the outcome of lines 10 and 11. Is that your intent? Probably not.

thank you for the responce sir, but the logic i meant was to increment r0 5 times using the loop delay , if you could send the corrected code, that'll be quite helpful..

Time to read the x86 assembler manual. You should be able to find a copy on the Intel web site...

Thanks this was an interesting bug fix discussion. It helped me fix my bugs as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.