Digital Electronics - The 8051 Microcontroller - Discussion
Discussion Forum : The 8051 Microcontroller - General Questions (Q.No. 10)
10.
A label is used to name a single line of code.
Discussion:
5 comments Page 1 of 1.
Amir said:
1 decade ago
I think that a label is used when you need any jump or loop condition.
Vikram said:
1 decade ago
Answer is TRUE because label is used for our reference when the code is executed assembler replaces this with the address, which is unique.
Example code:
As shown in the above sample program assembler replaces this skip label with the address of the instruction mov r2,b which is unique so label is used to name a single line of code.
Example code:
add a,r1
jnz skip
mov r2,a
skip: mov r2,bAs shown in the above sample program assembler replaces this skip label with the address of the instruction mov r2,b which is unique so label is used to name a single line of code.
Gaurav katoch said:
1 decade ago
A label is a special type of symbols used to represent a textual version of an address in ROM or RAM memory. They are always placed at the beginning of a program line. It is very complicated to call a subroutine or execute some of the jump or branch instructions without them. They are easily used:.
A symbol (label) with some easily recognizable name should be written at the beginning of a program line from which a subroutine starts or where jump should be executed.
It is sufficient to enter the name of label instead of address in the form of 16-bit number in instructions calling a subroutine or jump.
During the process of compiling, the assembler automatically replaces such symbols with appropriate addresses.
A symbol (label) with some easily recognizable name should be written at the beginning of a program line from which a subroutine starts or where jump should be executed.
It is sufficient to enter the name of label instead of address in the form of 16-bit number in instructions calling a subroutine or jump.
During the process of compiling, the assembler automatically replaces such symbols with appropriate addresses.
(1)
Pooh said:
1 decade ago
What is the assembler ?
Srinu said:
1 decade ago
Assembler is converts the assembly language into machine code language.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers