CS-1 Lecture Notes - Lecture 1: Opcode, Machine Code, Operand
Document Summary
Assembler is a program for converting instructions written in low-level assembly code into relocatable machine code and generating along information for the loader. It generates instructions by evaluating the mnemonics (symbols) in operation field and find the value of symbol and literals to produce machine code. Now, if assembler do all this work in one scan then it is called single pass assembler, otherwise if it does in multiple scans then called multiple pass assembler. Firstly, we will take a small assembly language program to understand the working in their respective passes. Example: m add r1, ="3" where, m - label; add - symbolic opcode; R1 - symbolic register operand; (="3") - literal. Let"s take a look on how this program is working: start: this instruction starts the execution of program from location 200 and label with. Note: literal address is specified by ltorg or end.