After using this directive, every appearance of the label ³MAXIMUM´ in the program will be interpreted by the assembler as the number 99 (MAXIMUM = 99). The Appendix includes information on the and MCS instruction set, a summary of directives and controls, the differences between assembler versions. ASSUME Directive. -. The ASSUME directive is used to tell the assembler that the name of the logical segment should be used for a specified segment.
Microcontroller has only one 8-bits data type and the size of each register is also 8 bits.
The job of the programmer is to break down data larger than 8 bits [00 to FFH, or 0 to in decimal] to be processed by the CPU.
The data type used by the can be positive or negative.
8051 DATA TYPES AND DIRECTIVES
For decimal, the “D” after the decimal number is optional, but using “B” [binary] and “H” [hexadecimal] is required. The assembler will convert the numbers in hex.
Can be useful for strings, which contain a single quote such as “O’Really”. DB is also used to allocate memory in byte-sized chunks. The following Assembler directives are widely used assembldr Assembly language programming.
The ORG directive is used to indicate the beginning of the address. If the number is not followed by ‘H’, it is decimal and the assembler will convert it into hex. Some assemblers use “. For tha you need to check your assembler. EQU is used to define a constant without occupying a memory location. Here uses EQU for the counter constant ans then the constant is used to load the R4 register.
What is the advantage of using EQU?
ASSEMBLY LANGUAGE PROGRAMMING – ppt video online download
The answer is that, lets say in a program there is a constant value [a fixed value] used in many different places in the program, and the programmer wants to change its value through out the entire program.
By the use of EQU, a programmer can change all valves at once and the assembler will change all of it occurrences, rather than search the entire program and to change the value one by one to fine every occurrence, just change the constant value followed by EQU direcctives changing the all occurrences at once. END directive pseudocode is very important.
END indicates to the assemblere the end of the source [asm ] file.
The END directive is the last line of an program. In assembly language programming anything after the END directive is ignored by the assembler. Some assembler uses “. Labels in Assembly Language Programming and its Rules: Programmer can make a program easier to read and maintain by choosing label names that are meaningful.
SECTION V – 8051 DATA TYPES AND DIRECTIVES
There are several rules that names must follow. First, each label name must be unique. The names used for labels in assembly language programming consists of alphabetic letters in both upper and lower case, the digits 0 through 9, and the special characters question mark [?
The first character of the label must be an alphabetic character, it cannot be a number. Every assembler has some reserved words which must not be used as labels in the program. These reserve words are the mnemonics for the instructions e. Skip to main content.
Facebook Like For Iamtechnical. Like us on Facebook.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.