What are the data directives of 8051?
8051 Data Types and Directives
Data1 : | DB 30 | ; Decimal |
---|---|---|
Data3 : | DB 40H | ; Hexadecimal |
Data4 : | DB ‘A’ | ; Characters |
Data5 : | DB “Sample” | ; Strings |
Data6 : | DB “2591” | ; ASCII numbers |
What is DB directive?
DB directive is used to declare a byte- type. variable or to store a byte in memory location.
What is DB in 8051 microcontroller?
DB (define byte) The DB directive is the most widely used data directive in the assembler. It is used to define the 8-bit data. When DB is used to define data, the numbers can be in decimal, binary, hex, or ASCII formats.
What is the role of EQU assembler directive in 8051?
EQU is used to define a constant without storing information in the memory. The symbol defined with EQU should not be redefined. SET directive allows redefinition of symbols at a later stage.
What is directive microcontroller?
Directives are commands of assembly language itself and have no influence on the operation of the microcontroller 8051 DIRECTIVES. 10. EQU directive The EQU directive is used to replace a number by a symbol.
What is DB in assembly language?
In assembly language, we use “db” (data byte) to allocate some space, and fill it with a string.
What is directive in microprocessor?
➢ Directives are statements that give directions to the assembler about how it should translate the assembly language instructions into machine code.
What do you mean by EQU and $-?
EQU defines a symbol to a given constant value: when EQU is used, the source line must contain a label. The action of EQU is to define the given label name to the value of its (only) operand. This definition is absolute, and cannot change later. So, for example, message db ‘hello, world’ msglen equ $-message.
What is the purpose of EQU directive?
The EQU directive only tells the assembler to substitute a value for a symbol or label, and doesn’t involve any type of ROM or RAM. EQU directives are typically placed at the beginning of an assembly program.
What is interrupt in 8051 microcontroller?
Interrupts are the events that temporarily suspend the main program, pass the control to the external sources and execute their task. It then passes the control to the main program where it had left off. 8051 has 5 interrupt signals, i.e. INT0, TFO, INT1, TF1, RI/TI.
Why do we use DB in assembly language?
Which directive ends a procedure?
The ENDP directive marks the end of the main procedure.