0
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

4
Contributors
4
Replies
21
Views
5 Years
Discussion Span
Last Post by CarolJ
1

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.

Edited by Ancient Dragon

0

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..

Edited by rakesh.menon.16

1

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

1

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.