CS-1 Lecture Notes - Lecture 1: Opcode, Machine Code, Operand

23 views15 pages
20 Jun 2022
Department
Course
Professor

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions