 We are going to start with the elements of assembly language programming. At the end of the session, student will be able to demonstrate the elements contained in an assembly language program. Let us see the background which is required for understanding an assembler as a language processor. A programmer needs to deal with numeric instructions and addresses. And therefore, he has to deal with lots of zeros and ones. So programming is cumbersome and prone to errors. And the main effects are faced in the machine language programming. And therefore, we go to deal with a solution which is an assembler. An assembler is a language processor that converts an assembly language program to a machine language program. Therefore, the input is an assembly language program. And output is generated as a target language or a machine language program. Now let us think and answer what is decided from an assembler as a language processor. When studying the features which are given by an assembly language, the predominant feature is it is machine independent. It is a low level programming language very close to the machine language. And each element in an assembly program is an instruction. It has declarative statements or directives. And it provides a memonic operation code or instructions. Therefore, we deal with symbolic names which decide for data or instruction. And it gives the facility for data declaration. The assembly directives are statements to provide useful auxiliary facilities to instruct the assembler to do a particular action. Now, when understanding the requirements of an assembler, we need to analyze the source program and determine which symbolic data or instructions are involved in it. And we use this information to synthesize a target program finally. Now, as we are going to understand the elements of an assembly language, a machine language of a computer has numeric instructions that take operands which are addresses of CPU registers or memory locations or intermediate operands. This makes the whole problem very cumbersome. Therefore, whenever there are also modifications which are made or changes that are developed in our program, these changes involve changes in the memory addresses of the operands. What is provided to simplify these things for an assembly language? The first thing in an assembly language is mnemonic operand codes are declared. And therefore, these short forms are easier to remember and use. And it enables us to detect the use of invalid codes in the program. We use in assembly language symbolic operands which associate symbolic names with data or instruction. There is no thinking of numeric address in the program. And repercussions of the change are automatically managed. In the data declarations which are involved in assembly programming, the data declared in variety of notations. For example, it might be a decimal notation. And it avoids the need to specify constants in the computer understandable representations. The statement format involves a label, opcode, operand specification, operand specifications in the subsequent or the optional format. Therefore, specification of label and the second subsequent operands is optional. A label is associated with a symbolic name with the memory word generated for the statement. And the operand specification syntax involves a symbolic name followed by a displacement which may be positive or negative followed by optional index registers. The possible operand forms involves for a word area, the memory word with which the name area is associated. Area plus 5 indicates memory words five words away from the word with the name area. Area into bracket four involves indexing of the operand area with the index register four to the address of area. Area plus 5 into bracket four involves a combination of the above specifications. Therefore, we are now ready to develop a simple assembly language. Each statement here corresponds to an instruction. It has two operands, a CPU register and a memory word using symbolic name and optional displacement. It has four CPU registers, A register, B register, C register, and D register. The arithmetic instructions is performed on content of the CPU register and memory word and the result is put in CPU register. The condition code is set in the CPU. The move instruction move a value between a memory word and a CPU register. We have two forms. One is move R, which is the value move from the memory word to the CPU register and move M, which is value move from the CPU register to the memory word. A comparison instruction set a conditional code without affecting the values of the operand. The conditional codes can be checked by a branch on condition instruction. It has a format BC conditional code specification followed by memory address. We assume conditional code specification is a character string. If it is any ANY, it implies unconditional transfer of control. All instructions are in the format, which have a sign, opcode, register operand, and memory operand as seen in this slide. The conditional code encodes in the first operand position. And these codes may be numbered from 1 to 6 and having a value less than, greater than, equal to, et cetera. The various statements supported by assembly language are the first type being imperative, which indicates an action to be performed during the execution of a program. It translates into one machine instruction finally. The second type of instructions are declarative instructions. They declare storage or constants. They have a format label ds constant or label dc given a value. ds reserves an area of memory and associates a symbolic name with it. a ds1 reserves memory area of one word and associates a name a with it. gds200 reserves block of 200 memory word name g associated with first words of the block. dc constructs memory words containing constants. 1 dc1 associates name o and e with memory word containing a value 1. A literal is an operand with a syntax value. Assembly language statements also consist of the third type, which are assembly directives. These statements instruct the assembler to perform certain actions while assembling a program. Example, start constant, instructs the assembler to place the first word of the target program, generate a memory word, having address constant. End operand specification indicates end of the source program. Optional operand specification indicates sufficient should begin with the instruction whose address is specified by operand specification. For my references, I have used. Thank you.