Mnemonic opcode meaning hlt 00 halt used at the end

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: hine language program (often referred to as an object program). Since the assembler translates each assembly language instruction into an equivalent machine language instruction, there is a one-to-one correspondence between the assembly language instructions of a source program and the machine language instructions of its equivalent object program. Note that during the process of translation of a source program into its equivalent object program by the assembler, the source program is not being executed. It is only being converted into a form that can be executed by the computer's processor. Assembly language program -► input Assembler -► Machine language program (Source Program) -► One-to-one correspondence -► (Object Program) Figure 12.2. Illustrating the translation process of an assembler. You must have noticed from the discussion above that in case of an assembly language program, the computer not only has to run the program to get the answer, but it also must first run the assembler (program) to translate the original assembly language program into its equivalent machine language program. This means that the computer has to spend more time in getting the desired answer from an assembly language program as compared to a machine language program. However, assembly language programming saves so much time and effort of the programmer that the extra time and effort spent by the computer is worth it. Assembly language programming and translation of an assembly language program into its equivalent machine language program can be best illustrated with the help of an example. For this, let us assume that the computer uses the mnemonics given in Figure 12.3 for the operation codes mentioned against each. For simplicity, here we have considered only five operation codes that will be used in writing our example program. Like this there can be more than hundred operation codes available in the instruction set of a particular computer. Mnemonic Opcode Meaning HLT 00 Halt, used at the end of program to stop CLA 10 Clear and add into A register ADD 14 Add to the contents of A register SUB 15 Subtract from the contents of A register STA 30 Store A register Figure 12.3. A subset of the set of instructions supported by a computer. We w...
View Full Document

Ask a homework question - tutors are online