Monday, 12 June 2023

8051 Data type and Directives

What is 8051 data type and directives?

The 8051 microcontroller has only one data type or a particular kind of data item. It is the job of the programmer or a device that automatically controls the operation to break down data larger than 8 bits.

8051 microcontroller, data type and directives
Data types and Directives image-1

DB (define byte)

The DB directive is the most extensively or widely used data directive in the program for converting instructions or assembler. It is used to explanation or defines the 8-bit data. For decimal, the “D” after the decimal number is voluntary or optional, but using “H” (hexadecimal) and “B” (binary) for the others is required. Regardless or anyway of which is used, the assembler will change or convert the numbers into hex. To indicate or specify ASCII, simply place the characters or nature in quotation marks (‘like this’). The assembler will assign or allot the ASCII code for the numbers or nature or characters attention.

ORG (origin)

The ORG directive is the beginning of the address used to indicate or specify. After ORG can be either or similarity in hex or in decimal of the number that comes. It is decimal and assembler or instruction will change or convert it to hex form the number is not followed by H,.

EQU (equate)

This is used to define a constant or sustained without occupying or settled a memory location. For a data item but link or associates a continuous or constant value with a data marker or label the EQU directive does not set aside or apart storage so that when the label or marker appears in the program; of something else for the label, its constant value will be substituted or taking the place.

END directive

Another important pseudocode or used in program design is the END directive. This indicates or specify to the computing the end of the source (asm) file. Anything or no matter what after the END directive is ignored or take no notice of by the assembler, the END directive is the last line of an 8051 program or plan, meaning that in the source code. Some assemblers or computing use “.END” (notice the dot) instead of |”END”.


Computer stuff kit tricks of Topics 56.