0% found this document useful (0 votes)
2K views12 pages

Mod 3 Class 1 - Machine Dependent Assembler Features (Part 1)

The document discusses the machine-dependent features of an assembler, including instruction formats and addressing modes, and program relocation. It describes the instruction formats, addressing modes, and register representation used by the SIC/XE assembly language. These include PC-relative addressing, indirect addressing, immediate addressing, and different instruction formats. It also explains how the assembler performs register translation and address translation during assembly.

Uploaded by

gjaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views12 pages

Mod 3 Class 1 - Machine Dependent Assembler Features (Part 1)

The document discusses the machine-dependent features of an assembler, including instruction formats and addressing modes, and program relocation. It describes the instruction formats, addressing modes, and register representation used by the SIC/XE assembly language. These include PC-relative addressing, indirect addressing, immediate addressing, and different instruction formats. It also explains how the assembler performs register translation and address translation during assembly.

Uploaded by

gjaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

MOD 3

CLASS 1 – MACHINE DEPENDENT


ASSEMBLER FEATURES
(Part 1)

Chap 2
Assembler Design
A. Machine Dependent Assembler
Features
● instruction formats and addressing modes
● program relocation
B. Machine Independent Assembler
Features
● literals
● symbol-defining statements
● expressions
● program blocks
● control sections and program linking
Chap 2
A. Machine-dependent
Assembler Features
Sec. 2-2
● Instruction formats and addressing modes

● Program relocation
1. Instruction Format and Addressing
Mode
● 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 op r1,r2

Chap 2
Translation
● Register translation
● register name (A, X, L, B, S, T, F, PC,
SW) and their values (0,1, 2, 3, 4, 5,
6, 8, 9)
● preloaded in SYMTAB
● See line 150,125,130 (fig 2.6)
● COMPR A,S A0 04
● CLEAR X B4 10
● CLEAR A B4 00
Chap 2
Chap 2
● Address translation
● Most register-memory instructions use
program counter relative or base
relative addressing
● Format 3: 12-bit address field
● Format 4: 20-bit address field

Chap 2
Refer fig 2.6
● 10 0000 FIRST STL RETADR 17202D

SIC :
STL – 14 , RETADR – 0030
HENCE CODE WILL BE 140030

Chap 2
● 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 op r1,r2

Chap 2
PC-Relative Addressing Modes
● 10 0000 FIRST STL RETADR 17202D

000101000000000000101101
n i x b pe 0 2 D
STL : (14)16
RETADR (0030) - PC (0003) = displacement =2D

000101110010000000101101
1 7 2 0 2 D Chap 2
PC-Relative Addressing Modes
● 20 000A LDA LENGTH 032026

000000000000000000100110
n i x b pe 0 2 6
LDA : (00)16
LENGTH (0033) - PC (000D) = displacement =026

000000110010000000100110
0 3 2 0 2 6 Chap 2
Immediate Addressing
● 55 0020 LDA #3 010003

000000000000000000000011
n i x b pe 0 0 3
LDA : (00)16

000000010000000000000011
0 1 0 0 0 3 Chap 2

You might also like