Assembler is a kind of system software that translate mnemonic codes written in assembly language (which is, in turn, a low-level language) into its equivalent object code (which is, in turn, need to change into executable code by loader and linker)
loader and linker are both system software which capable of loads the object code, assembled by an assembler, (loader) and link a different kind of block of a huge program. both software works at the bottom of the operation (i.e. closer to the hardware). in fact, both have machine dependent and independent features.
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
loader and linker are both system software which capable of loads the object code, assembled by an assembler, (loader) and link a different kind of block of a huge program. both software works at the bottom of the operation (i.e. closer to the hardware). in fact, both have machine dependent and independent features.
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
Description of all types of Loaders from System programming subjects.
eg. Compile-Go Loader
General Loader
Absolute Loader
Relocating Loader
Practical Relocating Loader
Linking Loader
Linker Vs. Loader
general relocatable loader
A macro processor is a system software. Macro is that the Section of code that the programmer writes (defines) once, and then can use or invokes many times.
Assemblers Elements of Assembly Language Programming, Design of the Assembler, Assembler Design Criteria, Types of Assemblers, Two-Pass Assemblers, One-Pass Assemblers, Single pass Assembler for Intel x86 , Algorithm of Single Pass Assembler, Multi-Pass Assemblers, Advanced Assembly Process, Variants of Assemblers Design of two pass assembler
This is a presentation which explains exactly what machine language and assembly level language is and explains the role of assembler and two different passes of assembler in computer organization/ computer architecture.
Description of all types of Loaders from System programming subjects.
eg. Compile-Go Loader
General Loader
Absolute Loader
Relocating Loader
Practical Relocating Loader
Linking Loader
Linker Vs. Loader
general relocatable loader
A macro processor is a system software. Macro is that the Section of code that the programmer writes (defines) once, and then can use or invokes many times.
Assemblers Elements of Assembly Language Programming, Design of the Assembler, Assembler Design Criteria, Types of Assemblers, Two-Pass Assemblers, One-Pass Assemblers, Single pass Assembler for Intel x86 , Algorithm of Single Pass Assembler, Multi-Pass Assemblers, Advanced Assembly Process, Variants of Assemblers Design of two pass assembler
This is a presentation which explains exactly what machine language and assembly level language is and explains the role of assembler and two different passes of assembler in computer organization/ computer architecture.
Introduction to Simplified instruction computer or SIC/XETemesgen Molla
AN introduction concept to system programming. SIC is simulation machine architecture that represents RISC and CISC (real machine architecture) for teaching and learning purpose.
We have learnt that any computer system is made of hardware and software.
The hardware understands a language, which humans cannot understand. So we write programs in high-level language, which is easier for us to understand and remember.
These programs are then fed into a series of tools and OS components to get the desired code that can be used by the machine.
This is known as Language Processing System.
Translation of a program written in a source language into a semantically equivalent program written in a target language
It also reports to its users the presence of errors in the source program
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
2. Overview[1]
• Computers like ones and zeros (0001110010000110 ) and humans like
symbols (ADD R6,R2,R6 ; increment index reg.)
• Assembler is a program that turns symbols into machine instructions.
• ISA-specific: close correspondence between symbols and instruction set
• Mnemonics for opcodes
• Labels for memory locations
• Additional operations for allocating storage and initializing data
3. Overview[2]
• Basic Assembler functions
• Translate mnemonic operation codes to their machine language
equivalents
• Symbolic operands (e.g., variable names) addresses.
• Choose the proper instruction format & addressing mode.
• Constants Numbers.
• Output to object files and listing files.
4. Overview[3]
• Assembler is a program that accepts an assembly language program as input
and produces its machine language equivalent along with information for the
loader
• The feature and design of an assembler depend
• Source language it translate
• The machine language it produce
6. Basics of Assembler Design[1]
The design of assembler can be to perform the following:
• Scanning (tokenizing)
• Parsing (validating the instructions)
• Creating the symbol table
• Resolving the forward references
• Converting into the machine language
The design of assembler in other words:
• Convert mnemonic operation codes to their machine language
equivalents
• Convert symbolic operands to their equivalent machine addresses
• Decide the proper instruction format Convert the data constants to
internal machine representations
• Write the object program and the assembly listing
7. Basics of Assembler Design[2]
• Assembler Designing Steps
1. Machine architecture understanding
2. Identify the algorithms and the various data structures to be used
• According to the required steps for assembling, the assembler also has to handle
assembler directives, these do not generate the object code but directs the assembler
to perform certain operation.
• Assembler directives (also called pseudo-instructions)
• Not translated into machine instructions
• Provides instructions to the assembler
8. Basics of Assembler Design[3]
• Basic assembler directives
• START: Specify name and starting address for the program
• END: Indicate the end of the source program, and (optionally) the first executable instruction in
the program
• BYTE: Generate character or hexadecimal constant, occupying as many bytes as needed to
represent the constant
• WORD: Generate one-word integer constant
• RESB: Reserve the indicated number of bytes for a data area
• RESW: Reserve the indicated number of words for a data area
9. Basics of Assembler Design[4]
TEST START 1003
FIRST LDA FIVE
STA ALPHA
ALPHA RESW 1 /*symbolic variable*/
FIVE WORD 5 /*symbolic constant, Literal */
END FIRST
LABEL Instruction Operand Psuedo Opcode OR
Assembler Directives
START
RESW
WORD,
END
10. Basics of Assembler Design[5]
Line numbers (for
reference)
Address labels
Mnemonic opcode
operands
comments
13. Basics of Assembler Design[8]
• Example Program with Object Code • The first column shows the line
number for that instruction,
second column shows the
addresses allocated to each
instruction.
• The third column indicates the
labels given to the statement, and
is followed by the instruction
consisting of
opcode and operand.
• The last column gives the
equivalent object code.
14. Basics of Assembler Design[9]
• The most important things which need to be concentrated is the generation of Symbol table
and resolving forward references.
• Symbol Table:
• This is created during pass 1
• All the labels of the instructions are symbols
• Table has entry for symbol name, address value.
• Forward reference:
• Symbols that are defined in the later part of the program are called forward referencing.
• There will not be any address value for such symbols in the symbol table in pass 1.
15. Object Program[1]
The object code later will be loaded into memory for execution. The simple
object program we use contains three types of records:
• Object Program Format
• Header
Col. 1 H
Col. 2~7 Program name
Col. 8~13 Starting address of object program (hex)
Col. 14-19 Length of object program in bytes (hex)
• Text
Col.1 T
Col.2~7 Starting address for object code in this record (hex)
Col. 8~9 Length of object code in this record in bytes (hex)
Col. 10~69 Object code, represented in hexa (2 col. per byte)
• End
Col.1 E
Col.2~7 Address of first executable instruction in object
program (hex)
16. Object Program[2]
• H COPY 001000 00107ª
• T 001000 1E 141033 482039 001036 281030 301015 482061 3C1003 00102A 0C1039
00102D
T 00101E 15 0C1036 482061 081044 4C0000 454F46 000003 000000
T 002039 1E 041030 001030 E0205D 30203F D8205D 281030 302057 549039 2C205E
38203F
T 002057 1C 101036 4C0000 F1 001000 041030 E02079 302064 509039 DC2079 2C1036
T 002073 07 382064 4C0000 05
• E 001000
17. Design and Implementation Issues
• Some of the features in the program depend on the architecture of the machine.
• If the program is for SIC machine, then we have only limited instruction formats and hence limited
addressing modes.
• We have only single operand instructions; the operand is always a memory reference.
• Hence the improved version of SIC/XE machine provides more instruction formats and hence more
addressing modes.
• The moment we change the machine architecture the availability of number of instruction formats and the
addressing modes changes.
• Therefore the design usually requires considering two things:
• Machine-dependent features and
• Machine-independent features.
18. Assembler Features
Machine-Dependent Assembler Features
• Instruction formats
• Addressing modes
• Program relocation
Machine Independent Assembler Features
• Literals
• Symbol-defining statements
• Expressions
• Program blocks
• Control sections and program linking
19. Machine-Dependent Features
(Instruction Format and Addressing Mode)
• The instruction formats depend on the memory organization and the size of the memory.
• In SIC machine the memory is byte addressable.
• How Assembler Recognizes the Addressing Mode e.g. SIC/XE
• PC-relative or Base-relative addressing: op m
• Indirect addressing: op @m
• Immediate addressing: op #c
• Extended format: +op m
• Index addressing: op m,x
• Register-to-register instructions
• Larger memory -> multi-programming (program allocation)
20. Machine-Dependent Features
(Instruction Format and Addressing Mode)
• Translations for the Instruction involving Register-Register addressing mode
• During pass 1 the registers can be entered as part of the symbol table itself. The value for these registers is their equivalent
numeric codes.
• During pass 2, these values are assembled along with the mnemonics object code. If required a separate
table can be created with the register names and their equivalent numeric values.
• Translation involving Register-Memory instructions:
• In SIC/XE machine there are four instruction formats and five addressing modes.
• Among the instruction formats, format -3 and format-4 instructions are Register-Memory type of instruction. One of the operand is always in a register and the other
operand is in the memory.
• The addressing mode tells us the way in which the operand from the memory is to be fetched.
21. Machine-Dependent Features
(Program Relocation)
• The larger main memory of SIC/XE
• Several programs can be loaded and run at the same time.
• This kind of sharing of the machine between programs is called multiprogramming
• To take full advantage
• Load programs into memory wherever there is room
• Not specifying a fixed address at assembly time
• Called program relocation
22. Machine-Dependent Features
(Relocatable Program)
• Modification record
• Col 1 M
• Col 2-7: Starting location of the address field to be modified, relative to the beginning
of the program
• Col 8-9: length of the address field to be modified, in half-bytes
23. Machine-Independent Features
• Features are not closely related to machine architecture.
• More related to issues about:
• Programmer convenience
• Software environment
• Common examples:
• Literals
• Symbol-defining statements
• Expressions
• Program blocks
• Control sections
• Assembler directives are widely used to support these features
24. Machine-Independent Features
(Literals)
• Literal is equivalent to:
• Define a constant explicitly and assign an address label for it
• Use the label as the instruction operand
• Why use literals:
• To avoid defining the constant somewhere and making up a label for it
• Instead, to write the value of a constant operand as a part of the instruction
• How to use literals:
• A literal is identified with the prefix =, followed by a specification of the literal value
25. Machine-Independent Features
(Literals vs. Immediate Operands)
• Same:
• Operand field contains constant values
• Difference:
• Immediate addressing: the assembler put the constant value as part of the machine
instruction
• Literal: the assembler store the constant value elsewhere and put that address as part of
the machine instruction
26. Machine-Independent Features
(Literal Pool)
• All of the literal operands are gathered together into one or more literal
pools.
• literal pool:
• At the location where the LTORG directive is encountered
• To keep the literal operand close to the instruction that uses it
• At the end of the object program, generated immediately following the END statement
28. Machine-Independent Features
(Literal Implementation)
• Data structure: a literal table LITTAB
• Literal name
• Operand value and length
• Address
• LITTAB is often organized as a hash table, using the literal name or value as
the key
29. Machine-Independent Features
(Symbols)[1]
• How to define symbols and their values
• Address label
• The label is the symbol name and the assigned address is its value
FIRST STL RETADR
• Assembler directive EQU
symbol EQU value
• This statement enters the symbol into SYMTAB and assigns to it the value specified
• The value can be a constant or an expression
• Assembler directive ORG
ORG value
30. Machine-Independent Features
(Symbols)[2]
• Use of EQU
• To improve the program readability, avoid using the magic numbers, make it easier to find and change
constant values
• +LDT #4096
• MAXLEN EQU 4096
+LDT #MAXLEN
• To define mnemonic names for registers
• A EQU 0
• X EQU 1
• BASE EQU R1
• COUNT EQU R2
31. Machine-Independent Features
(Symbols)[3]
• Use of ORG
• Indirect value assignment:
ORG value
• When ORG is encountered, the assembler resets its LOCCTR to the specified value
• ORG will affect the values of all labels defined until the next ORG
• If the previous value of LOCCTR can be automatically remembered, we can return to
the normal use of LOCCTR by simply write
ORG
32. Machine-Independent Features
(Symbols)[4]
• Forward reference is not allowed for EQU and ORG.
• That is, all terms in the value field must have been defined previously in the
program.
• The reason is that all symbols must have been defined during Pass 1 in a two-
pass assembler.
Allowed
Not allowed
33. Machine-Independent Features
(Symbols)[5]
• Usages of Symbols
• Establish symbolic names to improve readability in place of numeric values.
• E.g., +LDT #4096 can be changed to : MAXLEN EQU 4096 +LDT #MAXLEN
• When the assembler encounters the EQU statement, it enters MAXLEN into SYMTAB
(with value 4096).
• During assembly of the LDT instruction, the assembler searches SYMTAB for the symbol
MAXLEN, using its value as the operand in the instruction.
• Define mnemonic names for registers
34. Machine-Independent Features
(Expressions)[1]
• A single term as an instruction operand can be replaced by an expression.
STAB RESB 1100
STAB RESB 11*100
STAB RESB (6+3+2)*MAXENTRIES
• The assembler has to evaluate the expression to produce a single operand address or value.
• Expressions consist of
• Operator
• +,-,*,/ (division is usually defined to produce an integer result)
• Individual terms
• Constants
• User-defined symbols
• Special terms, e.g., *, the current value of LOCCTR
35. Machine-Independent Features
(Expressions)[2]
• Expressions are classified as either absolute expression or relative
expressions depending on the type of value they produce.
• Absolute Expressions: The expression that uses only absolute terms is absolute
expression. Absolute expression may contain relative term provided the relative terms
occur in pairs with opposite signs for each pair. Example: MAXLEN EQU BUFEND-
BUFFER
• Relative Expressions: All the relative terms except one can be paired as described in
“absolute”. The remaining unpaired relative term must have a positive sign. Example:
STAB EQU OPTAB + (BUFEND – BUFFER)
36. Machine-Independent Features
(Expressions)[3]
• Illegal Expressions
• These expressions represent neither absolute nor location within the program.
Therefore, these expression are considered illegal.
• BUFEND + BUFFER
• 100 – BUFFER
• 3 * BUFFER
37. Machine-Independent Features
(Program blocks)
• Collect many pieces of code/data that scatter in the source program but have the same kind
into a single block in the generated object program.
• For example, code block, initialized data block, un-initialized data block. (Like code, data
segments on a Pentium PC).
• Advantage:
• Because pieces of code are closer to each other now, format 4 can be replaced with format 3, saving
space and execution time.
• Code sharing and data protection can better be done.
• With this function, in the source program, the programmer can put related code and data
near each other for better readability.
39. Machine-Independent Features
(Control Sections)
• A control section is a part of the program that maintains its identity after assembly.
• Each such control section can be loaded and relocated independently of the others. (Main
advantage)
• Different control sections are often used for subroutines or other logical subdivisions of a
program.
• The programmer can assemble, load, and manipulate each of these control sections
separately.
40. Machine-Independent Features
(Control Sections External References)
• Symbols that are defined in one control section cannot be used directly by another control
section.
• They must be identified as external references for the loader to handle.
• Two assembler directives are used:
• EXTDEF (external definition)
• Identify those symbols that are defined in this control section and can be used in other control sections.
• Control section names are automatically considered as external symbols.
• EXTREF (external reference)
• Identify those symbols that are used in this control section but defined in other control sections.
41. Assembler Design Options[4]
• The assembler design can be done:
• One pass assembler
• Passes over the file once, that is it collects all the information in one loop
• Two pass assembler:
• Two passes over the source file:
• In first pass, looks for label definitions and introduces them in the symbol table
• In the second pass, after the symbol table is complete, it does the actual assembly by translating the
operations into machine codes and so on.
• A strict 1-pass scanner cannot assemble source code which contains forward references.
42. Assembler Design Options[4]
• Forward Referencing in Pass 2 Assembler:
• Instruction contains the forward reference, i.e. if the used symbol is not
yet defined.
• Since, if the program is processed ( scanning and parsing and object code
conversion) is done line-by-line, we will be unable to resolve the address
of this symbol.
• Due to this problem most of the assemblers are designed to process the
program in two passes.
43. One-Pass Assembler[1]
• The whole process of scanning, parsing, and object code conversion is done
in single pass.
• The only problem with this method is resolving forward reference.
• This is shown with an example below:
44. One-Pass Assembler[2]
• Main problem
• Forward references
• Solution
• Require that all areas be defined before they are referenced.
• It is possible, although inconvenient, to do so for data items.
• Forward jump to instruction items cannot be easily eliminated.
• So, a multi-pass assembler resolves the forward references and then converts
into the object code.
45. One-Pass Assembler[3]
• There are two types of one-pass assemblers:
• One that produces object code directly in memory for immediate execution
(Load-and-go assemblers).
• The other type produces the usual kind of object code for later execution.
• Forward Reference in One-pass Assembler
• Omits the operand address if the symbol has not yet been defined
• Enters this undefined symbol into SYMTAB and indicates that it is undefined
• Adds the address of this operand address to a list of forward references associated with the
SYMTAB entry
46. One-Pass Assembler[4]
• Load-and-go assembler generates their object code in memory for immediate
execution.
• No object program is written out, no loader is needed.
• It is useful in a system with frequent program development and testing
• The efficiency of the assembly process is an important consideration.
• Programs are re-assembled nearly every time they are run; efficiency of the
assembly process is an important consideration.
47. Two-Pass Assembler[1]
• A two-pass assembler performs two sequential scans over the source code:
1. Pass 1: symbols and literals are defined
2. Pass 2: object program is generated
• For a two pass assembler, forward references in symbol definition are not
allowed
• Prohibiting forward references in symbol definition is not a serious
inconvenience.
• Forward references tend to create difficulty for a person reading the program.
48. Two-Pass Assembler[2]
Pass 1
• Assign addresses to all statements in the
program
• Save the values (addresses) assigned to all labels
(including label and variable names) for use in
Pass 2 (deal with forward references)
• Perform some processing of assembler
directives (e.g., BYTE, RESW these can affect
address assignment)
• Defines the symbols in the symbol table(generate the
symbol table)
Pass 2
• Assemble instructions (generate opcode and
look up addresses)
• Generate data values defined by BYTE,
WORD
• Perform processing of assembler directives not
done in Pass 1
• Write the object program and the assembly
listing
49. Two-Pass Assembler[3]
• Simple assembler main internal data structures:
• Operation Code Table (OPTAB): Contains symbolic instructions, their lengths and their
op-codes (or subroutine to use for translation)
• Symbol Table (SYMTAB): Contains labels and their values
• Location Counter(LOCCTR): Points to the next location where the code will be placed
50. Two-Pass Assembler[4]
• OPTAB looks up mnemonic opcodes & translates them to their machine language equivalents
• SYMTAB stores values (addresses) assigned to labels
51. Operation Code Table (OPTAB)[1]
• Used to look up mnemonic operation codes and translate them into machine
language equivalents
• Contains the mnemonic operation code and its machine language equivalent
• In more complex assemblers, contains information like instruction format and
length
Instruction Op code Length (bytes)
ADD m 18 3
LDA m 00 3
52. Operation Code Table (OPTAB)[2]
• Content
• The mapping between mnemonic and machine code. Also include the instruction
format, available addressing modes, and length information
• Characteristic
• Static table - the content will never change
• Contents are not normally added/deleted (predefined)
• Implementation
• Array or hash table, easy for search
• Gives optimum performance for the particular set of keys being stored
53. Symbol Table (SYMTAB)[1]
• Used to store values (addresses) assigned to labels
• Includes the name and value for each label
• Flags to indicate error conditions, e.g. duplicate definition of
labels
• May contain other info like type or length about the data area or
instruction labeled
COPY 1000
FIRST 1000
CLOOP 1003
ENDFIL 1015
EOF 1024
THREE 102D
ZERO 1030
RETADR 1033
LENGTH 1036
BUFFER 1039
RDREC 2039
WRREC 2061
LABEL Address (LOC value)
FIRST 1003
ALPHA 1009
FIVE 1012
54. Symbol Table (SYMTAB)[2]
• Content
• Flags to indicate error conditions, e.g. duplicate definition of labels
• Characteristic
• Dynamic table (i.e., symbols may be inserted, deleted, or searched in the table)
• Implementation
• Hash table can be used to speed up search
• Organized generally as hash table, for efficiency of insertion & retrieval
• Because variable names may be very similar (e.g., LOOP1, LOOP2), the selected hash
function must perform well with such non-random keys
55. Location Counter (LOCCTR)
• Used to help in the assignment of addresses
• Initialized to the beginning address specified in the START statement
• After each source statement is processed, the length of the assembled instruction
or data area to be generated is added
• Gives the address of a label
56. Pseudo Code for Pass 1 (SIC)[1]
• 1st
find starting address of the program
• START – its operand will be the starting address
57. Pseudo Code for Pass 1 (SIC)[2]
• Whenever we find a label, save it in the symbol table
•Set the error flag if an unrecognized opcode is found OR
if a symbol is encountered more than 1 time
Anything to be fetched from memory requires more time.
Benefits of SIC/XE Addressing Modes
Register-to-register instructions
Shorter than register-to-memory instructions
No memory reference
Immediate addressing mode
No memory reference. The operand is already present as part of the instruction
Indirect addressing mode
Avoids the needs for another instruction
Relative addressing mode
Shorten than the extended instruction
Easy program relocation
START directive specifies a beginning program address of 0: a relocatable program.
Register-to-register instructions: simply convert the mnemonic name to their number equivalents
OPTAB: for opcodes
SYMTAB: preloaded with register names and their values
Considering Instruction Formats
Relative addressing: op m
1st choice: PC relative (arbitrarily chosen)
2nd choice: base relative (if displacement is invalid in PC relative mode)
3rd choice: error message (if displacement is invalid in both relative modes