 Hello, Myself Ravindra Chauhan from All-Channel Instructions of Technology, Solabor. So in this session, we will discuss the directives defined for the ARM assembler. Outcome of this session, the student will able to demonstrate the ARM assembly directives and also they will able to write the different ARM programs using various assembler directives. Outline of this session, first what do you mean by directives? Directives defined for ARM assembler and one of the program template using the directives. Directives are the directions given to the assembler. So directives directs the assembler means directives tells the assembler what to do. So directives are mainly used to assign the program to certain areas in memory. So directives also used to define the symbols, place the tables or other fixed data in the memory. Directives designate areas memory for data storage also. Directives are also allow references to other programs and it performs minor housekeeping functions. So some directives are defined to allocate the memory for the data. So these directives are called the defined constant directives. So these directives are used to define the memory space for the data. These directives allows the programmer to enter fixed data into program memory. Now this data it may include the name, conversion factor, messages, key identifications, command, subroutine addresses, code conversion tables etc. So the defined constant directives are the first one is DCB which is to be used to define the constant of 8 bit value. So this DCB directives allocate a byte of memory space to that particular data. So general syntax of this directive is first label then directive DCB and then expression. So example here is shown M-E-S-S-G directive DCB and the string now is the. So this now is the string it will be placed in the memory with starting address M-E-S-S-G. And the each character from this string will allocate a 8 bit memory space. Similarly to allocate the 16 bit memory to the particular constant the directive provided is DCW. So DCW directive allocates the half words of memory space that is a 16 bit. The syntax is again same label DCW expression example here it is written value 1 DCW and A, B, C, D. So the value 1 will initialized with the 16 bit value A, B, C, D. So value 1 holds the starting address of this 16 bit value. Similarly the DCD directive is provided to allocate the memory space for 32 bit data. The syntax is label DCD expression. The example here it is written that the digit DCD and the 32 bit value DADBF BEEF. So this directive will initialized the digit with the value DADBEF. The next directive is the aligned directive. So aligned directive aligns the current location within the code to a word boundary means the 4 byte boundary. So the general syntax of the aligned directive is aligned expression, offset expression where expression can be any power of 2 from 2 raised to 0 to 2 raised to 31. So the current location is aligned to the next 2 raised to n byte boundary. If this parameter is not specified then aligned directive sets the instruction location to the next word boundary. Set expression is used to define a byte offset from the alignment specified by expression. This aligned directives are used when data definition directives like DCB, DCW, DCD are used in the code areas. The program counter does not necessarily point to a word boundary. It is used to ensure that your data and code is aligned to appropriate boundaries means the data space and code space should be separated. The next directive is the area. This area directive is used to specify the memory locations where programs, subroutines or data resides. The general syntax of this directive is area then section name. Now this section name can be used as a reference for other programs and then the list of attributes. Now some of the key attributes are the first one code. Now this code attribute it used to specify the area for the instructions. And code area normally it should be read only. Data attribute is used to specify the memory space for only. So the data space normally it is read write space. Read only this default for code areas to specify this code area is read only. Read write attribute is used for data areas to give the read write access for this memory. No INIT this is it must only contain uninitialized data or data initialized to 0. Example for area directive is area test program comma code comma read only. Since this is the reference name given is test program then the space will be assigned for the instruction and this space is read only memory space. Now you pause the video, think and write directives to define read write memory area to store the results of word size and 32-bit size. Now to define the memory area for the data keyword is used data and second attribute is read write. Then the DCW directive is used to assign the word size value result what DCW and the value is initialized with 0. Similarly to assign the 32-bit memory the directive is DCD and the example here result to DCD so the result 2 will be initialized with the value 0. So DCW is used to define the word size data and DCD is used to define the 32-bit data. Now next ARM directive is entry which specify the code entry point. Entry directive point in the code where program execution should begin means the assembler starts the execution of the instruction written after the entry directive. Next is end. End directive it tells the end of file. It informs the assembler that the end of the source file has been reached and assembler stops the execution of the program. Now here one program template is shown by making the use of various directives. So first is TTL which is used to give the title for the program. Then area directive is used to assign the space for instructions and this space it should be read only. Entry directive specifies the entry point of your program. So the assembler will execute the instructions written after entry that is from LDR R0, and onwards. Then the DCD keyword is used to define the 32-bit data. Similarly one more memory area is defined for the data storage that is area results comma data comma read write and here again the 32-bit data with result work is defined having the initial value 0. And lastly the end directive is used to stop the execution of the program. The references used for this the book from Andrew Sloss, then ARM system on chip architecture by Steve Herbert and ARM 7 TDMI data sheet. Thank you.