SlideShare a Scribd company logo
1 of 12
Download to read offline
Topic: Assembler Numerical in System Programming
Author Name: Pratibha Paras waghale
(Assistant Professor-CSE)
System Software and Assembler
1. System Software: The System Software is a collection of program that
bridges the gap between the level at which interact with the computer and level
at which the computer is capable of operating.
2. Components of system software
¾ Assembler: Assembler to convert assembler language program using
of system program database and produce machine language program.
¾ Complier: A Complier is a system program that accepts the program in
high level language program and produces object program in machine
language program.
¾ Interpreter: Interpreter translates the high level program into the
machine language program. It translates the program line by line and
requires less space or main memory.
¾ Microprocessor: Microprocessor is a system program required to
execute macros. Macro is a line abbreviation for the group of program.
¾ Loader: Loader is a system program that places a program into
memory and prepares them for execution.
¾ Formal System: Formal System are used to specify the syntax and
semantic of programming language.
¾ Operating System: Operating system is a collection of system
program that controls overall operation of computer systems.
Question 1:For the followig AL code,geerate the Symbol table,literal table,base table and machine
code using the 2 pass assembler algorithm.(Ref-1)
START 0
BEGIN BALR 15,0
USING *,15
L 3,OLDOH
A 3,RECPT
S 3,ISSUE
ST 3, NEWOH
OLDOH DC F’9’
RECPT DC F’4’
ISSUE DC F’6’
NEWOH DS F
END
Solution:
1. Assign Location Counter
Sr. No. INSTRUCTIONS LC
1 START 0 0
2 BEGIN BALR 15,0 0
3 USING *,15 2
4 L 3,OLDOH 2
5 A 3,RECPT 6
6 S 3,ISSUE 10
7 ST 3, NEWOH 14
8 OLDOH DC F’9’ 18
9 RECPT DC F’4’ 20
10 ISSUE DC F’6’ 24
11 NEWOH DS F 28
12 END 32
2. Symbol Table:
SR. NO. LEBEL Value R/A
1 BEGIN 0 R
2 OLDOH 18 R
3 RECPT 20 R
4 ISSUE 24 R
5 NEWOH 30 R
3. No Literal Table
4. Base Table
Sr. No. BASE VALUE CONTEXT
1 15 2
5. MACHINE CODE:
LC Instruction
0 BALR 15,0
2 L 3,16(0,15)
6 A 3,18(0,15)
10 S 3,22(0,15)
14 ST 3,28(0,15)
18 9
20 4
24 6
28 -
Question 2: For the followig AL code,geerate the Symbol table,literal table,base table and machine
code using the 2 pass assembler algorithm.(Ref-1)
TEST START
BEGIN BALR 15,0
USING BEGIN+2,15
SR 4,4
L ,3=F=’10’
LOOP L, 2,DATA(4)
A 2,=F’49’
ST 2,DATA(4)
A 4,=F’4’
BCT 3,*-16
BR 14
DATA DC F’1,2,3,4’
END
Solution:
1.Assign Location Counter
Sr. No. INSTRUCTIONS LC
1 TEST START 0
2 BEGIN BALR 15,0 0
3 USING BEGIN+2,15 2
4 SR 4,4 2
5 L ,3=F=’10’ 4
6 LOOP L, 2,DATA(4) 8
7 A 2,=F’49’ 12
8 ST 2,DATA(4) 16
9 A 4,=F’4’ 20
10 BCT 3,*-16 24
11 BR 14 28
12 DATA DC F’1,2,3,4’ 30
13 END 44
2.Symbol Table:
SR. NO. LEBEL Value R/A
1 TEST 0 R
2 BEGIN 0 R
3 LOOP 8 R
4 DATA 30 R
3. Literal Table
SR.NO. LITERAL VALUE R/A
1 =F’10’ 32 R
2 =F’49’ 36 R
3 =F’4’ 40 R
4. Base Table
Sr. No. BASE VALUE CONTEXT
1 15 2
5. MACHINE CODE:
LC Instruction
0 BALR 15,0
2 SR 4,4
4 L 3,30(0,15)
8 L 2,28(4,15)
12 A 2,34(0,15)
16 ST 2,28(4,15)
20 A 4,38(0,15)
24 BCT 3,22(0,15)
28 BCR 15,14
32 10
36 49
40 4
44 1
48 2
52 3
-
Question 3: For the followig AL code,geerate the Symbol table,literal table,base table and machine
code using the 2 pass assembler algorithm.(Ref-1)
PROG START 0
BALR 15,0
USING *,15
LR 5,15
LH 1 DATA1
USING *,10
BR 14
DATA2 DC F’11’
DATA1 DC H’22’
TRS DC H’23’
BCK DS F
AA EQU 1
DP EQU 2
BALR 2,0
USING * + AA,TRS
LA 7,=A(BCK)
BR 6
DC H ‘64’
DROP DP
L 9=A(DATA1)
A 9 TRS
LTROG
ST Q=F’100
END
Solution:
1.Assign Location Counter
SR. NO. INSTRUCTIONS LC
1 PROG START 0 0
2 BALR 15,0 0
3 USING *,15 2
4 LR 5,15 2
5 LH 1 DATA1 4
6 USING *,10 8
7 BR 14 8
8 DATA2 DC F’11’ 12
9 DATA1 DC H’22’ 16
10 TRS DC H’23’ 20
11 BCK DS F 24
12 AA EQU 1 28
13 DP EQU 2 28
14 BALR 2,0 28
15 USING * + AA,TRS 30
16 LA 7,=A(BCK) 30
17 BR 6 34
18 DC H ‘64’ 36
19 DROP DP 38
20 L 9=A(DATA1) 38
21 A 9 TRS 42
22 LTROG 48
23 ST Q=F’100 56
24 END 60
2.Symbol Table:
SR. NO. LEBEL Value R/A
1 PROG 0 R
2 DATA2 12 A
3 DATA1 16 A
4 TRS 20 A
5 BCK 24 A
6 AA 1 A
7 DP 2 R
3. Literal Table
SR.NO. LITERAL VALUE R/A
1 =A(BCK) 48 R
2 =A(DATA1) 52 R
3 =F’100’ 56 R
4. Base Table
Sr. No. BASE VALUE CONTEXT
1 15 2
2 10 8
3 23 30
5. MACHINE CODE:
LC Instruction
0 BALR 15,0
2 LR 5,15
4 LH 1,14(0,15)
8 ACR 15,14
12 11
16 22
20 23
24 -
28 BALR 2,0
30 LA 7,17(0,23)
34 BCR 15,6
36 64
38 L 9,21(0,23)
42 A 9,20
48 24
52 16
56 100
60 ST Q,25(0,23)
Question 5: For the followig AL code,geerate the Symbol table,literal table,base table and machine
code using the 2 pass assembler algorithm.
Program START 0
USING *15
LA,15,SETUP
SR TOTAL ,TOTAL
AC EQU 2
INDEX EQU 3
TOTAL EQU 4
DATABASE EQU 13
SETUP EQU *
USING SETUP 15
L,DATABASE,=A(DATA1)
USING DATAAREA, DATABASE
SR INDEX,INDEX
LOOP L, AC DATA1(INDEX)
AR TOTAL AC
A,AC , F=’5’
ST AC SAVE(INDEX)
A INDEX=F’4’
C INDEX=F’8000’
BNE LOOP
LR 1,TOTAL
BR,14
LTROG
SAVE DS 2000F
DATAAREA EQA *
DATA1 DC F ‘25’,’26’,’97’,’101’...
[2000 numbers]
END
Solution:
1. Assign Location Counter (LC)
SR. NO. INSTRUCTION LC
1 Program START 0 0
2 USING *15 0
3 LA,15,SETUP 0
4 SR TOTAL ,TOTAL 4
5 AC EQU 2 6
6 INDEX EQU 3 6
7 TOTAL EQU 4 6
8 DATABASE EQU 13 6
9 SETUP EQU * 6
10 USING SETUP 15 6
11 L,DATABASE,=A(DATA1) 6
12 USING DATAAREA, DATABASE 10
13 SR INDEX,INDEX 10
14 LOOP L, AC DATA1(INDEX) 12
15 AR TOTAL AC 16
16 A,AC , F=’5’ 18
17 ST AC SAVE(INDEX) 22
18 A INDEX=F’4’ 26
19 C INDEX=F’8000’ 30
20 BNE LOOP 34
21 LR 1,TOTAL 38
22 BR,14 40
23 LTROG 42
24 SAVE DS 2000F 64
25 DATAAREA EQA * 8064
26 DATA1 DC F ‘25’,’26’,’97’,’101’... 8064
27 [2000 numbers] 8068
28 END
2. SYMBOL TABLE
SR. NO. LEBEL Value R/A
1 PROGRAM 0 R
2 AC 2 A
3 INDEX 3 A
4 TOTAL 4 A
5 DATABASE 13 A
6 SETUP 6 A
7 LOOP 12 R
8 SAVE 64 R
9 DTA AREA 8064 A
10 DATA1 8064 R
3. LITERAL TABLE
SR.NO. LITERAL VALUE R/A
1 =A(DATA1) 48 R
2 =F ‘5’ 52 R
3 =F’4’ 56 R
4 =F ‘8000’ 16064 R
4.BASE TABLE
Sr. No. BASE VALUE CONTEXT
1 15 0
2 15 6
3 13 8064
5.MACHINE CODE:
LC Instruction
0 LA 15,6(0,15)
4 SR 4,4
6 L 13,42(0,15)
10 SR 3,3
12 L,2,0(3,13)
16 AR 4,2
18 A 2,8012(0,13)
22 ST 2,8000(3,13)
26 A 3,8000(0,13)
30 C 3,8004(0,13)
34 BC 7
38 LR 1,4
40 BCR 15,14
48 8064
52 5
56 6
60 8000
64 25
8064 26
8068 97
-
-
References:
1.https://www.youtube.com/watch?v=gN4ZZ3SE2T8

More Related Content

What's hot

central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipelineRai University
 
Database User and Administrator
Database User and AdministratorDatabase User and Administrator
Database User and AdministratorA. S. M. Shafi
 
Shift micro operations & 4 bit combinational circuit shifter
Shift micro operations &  4 bit combinational circuit shifterShift micro operations &  4 bit combinational circuit shifter
Shift micro operations & 4 bit combinational circuit shifterMonika Chauhan
 
Instruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxInstruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxYash346903
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitabdosaidgkv
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction FormatsRaaviKapoor
 
Basic computer organization
Basic computer organizationBasic computer organization
Basic computer organizationNitesh Singh
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memoryRohini Shinde
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentationchantellemallia
 
Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Raj Naik
 

What's hot (20)

central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipeline
 
Sql commands
Sql commandsSql commands
Sql commands
 
Database User and Administrator
Database User and AdministratorDatabase User and Administrator
Database User and Administrator
 
PL/SQL TRIGGERS
PL/SQL TRIGGERSPL/SQL TRIGGERS
PL/SQL TRIGGERS
 
Shift micro operations & 4 bit combinational circuit shifter
Shift micro operations &  4 bit combinational circuit shifterShift micro operations &  4 bit combinational circuit shifter
Shift micro operations & 4 bit combinational circuit shifter
 
Instruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxInstruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptx
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Instruction Formats
Instruction FormatsInstruction Formats
Instruction Formats
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Basic computer organization
Basic computer organizationBasic computer organization
Basic computer organization
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Representation of binary tree in memory
Representation of binary tree in memoryRepresentation of binary tree in memory
Representation of binary tree in memory
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Assembler
AssemblerAssembler
Assembler
 
Fetch decode-execute presentation
Fetch decode-execute presentationFetch decode-execute presentation
Fetch decode-execute presentation
 
Sql queries
Sql queriesSql queries
Sql queries
 
Design of a two pass assembler
Design of a two pass assemblerDesign of a two pass assembler
Design of a two pass assembler
 
Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive Data Types - Premetive and Non Premetive
Data Types - Premetive and Non Premetive
 

Similar to Assembler Numerical in System Programming: Symbol Tables, Literal Tables, Base Tables and Machine Code Generation

Assembler numericals by aniket bhute
Assembler numericals by aniket bhuteAssembler numericals by aniket bhute
Assembler numericals by aniket bhuteAniket Bhute
 
3.ASSEMBLERS.pptx
3.ASSEMBLERS.pptx3.ASSEMBLERS.pptx
3.ASSEMBLERS.pptxGaganaP13
 
Basic computer organization design
Basic computer organization designBasic computer organization design
Basic computer organization designndasharath
 
8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdfFloraKara
 
MPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptxMPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptxkaustubhshedbalkar1
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copymkazree
 
Write a Pep8 Assembly program that reads in and stores two integers .pdf
Write a Pep8 Assembly program that reads in and stores two integers .pdfWrite a Pep8 Assembly program that reads in and stores two integers .pdf
Write a Pep8 Assembly program that reads in and stores two integers .pdfrushabhshah600
 
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.pptAshwini864432
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 

Similar to Assembler Numerical in System Programming: Symbol Tables, Literal Tables, Base Tables and Machine Code Generation (20)

Assembler numericals by aniket bhute
Assembler numericals by aniket bhuteAssembler numericals by aniket bhute
Assembler numericals by aniket bhute
 
3.ASSEMBLERS.pptx
3.ASSEMBLERS.pptx3.ASSEMBLERS.pptx
3.ASSEMBLERS.pptx
 
OptimizingARM
OptimizingARMOptimizingARM
OptimizingARM
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
 
Memory Reference instruction
Memory Reference instructionMemory Reference instruction
Memory Reference instruction
 
Basic computer organization design
Basic computer organization designBasic computer organization design
Basic computer organization design
 
1.pdf
1.pdf1.pdf
1.pdf
 
8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf
 
Assembler
AssemblerAssembler
Assembler
 
Assembler
AssemblerAssembler
Assembler
 
Sp chap2
Sp chap2Sp chap2
Sp chap2
 
6.pptx
6.pptx6.pptx
6.pptx
 
MPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptxMPMC Architecture of 8085 Microprocessor and Programming.pptx
MPMC Architecture of 8085 Microprocessor and Programming.pptx
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
PROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNITPROCESSOR AND CONTROL UNIT
PROCESSOR AND CONTROL UNIT
 
Write a Pep8 Assembly program that reads in and stores two integers .pdf
Write a Pep8 Assembly program that reads in and stores two integers .pdfWrite a Pep8 Assembly program that reads in and stores two integers .pdf
Write a Pep8 Assembly program that reads in and stores two integers .pdf
 
Switch Control and Time Delay - Keypad
Switch Control and Time Delay - KeypadSwitch Control and Time Delay - Keypad
Switch Control and Time Delay - Keypad
 
Assembler
AssemblerAssembler
Assembler
 
assembler_full_slides.ppt
assembler_full_slides.pptassembler_full_slides.ppt
assembler_full_slides.ppt
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 

Recently uploaded

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Assembler Numerical in System Programming: Symbol Tables, Literal Tables, Base Tables and Machine Code Generation

  • 1. Topic: Assembler Numerical in System Programming Author Name: Pratibha Paras waghale (Assistant Professor-CSE)
  • 2. System Software and Assembler 1. System Software: The System Software is a collection of program that bridges the gap between the level at which interact with the computer and level at which the computer is capable of operating. 2. Components of system software ¾ Assembler: Assembler to convert assembler language program using of system program database and produce machine language program. ¾ Complier: A Complier is a system program that accepts the program in high level language program and produces object program in machine language program. ¾ Interpreter: Interpreter translates the high level program into the machine language program. It translates the program line by line and requires less space or main memory. ¾ Microprocessor: Microprocessor is a system program required to execute macros. Macro is a line abbreviation for the group of program. ¾ Loader: Loader is a system program that places a program into memory and prepares them for execution. ¾ Formal System: Formal System are used to specify the syntax and semantic of programming language. ¾ Operating System: Operating system is a collection of system program that controls overall operation of computer systems.
  • 3. Question 1:For the followig AL code,geerate the Symbol table,literal table,base table and machine code using the 2 pass assembler algorithm.(Ref-1) START 0 BEGIN BALR 15,0 USING *,15 L 3,OLDOH A 3,RECPT S 3,ISSUE ST 3, NEWOH OLDOH DC F’9’ RECPT DC F’4’ ISSUE DC F’6’ NEWOH DS F END Solution: 1. Assign Location Counter Sr. No. INSTRUCTIONS LC 1 START 0 0 2 BEGIN BALR 15,0 0 3 USING *,15 2 4 L 3,OLDOH 2 5 A 3,RECPT 6 6 S 3,ISSUE 10 7 ST 3, NEWOH 14 8 OLDOH DC F’9’ 18 9 RECPT DC F’4’ 20 10 ISSUE DC F’6’ 24 11 NEWOH DS F 28 12 END 32 2. Symbol Table: SR. NO. LEBEL Value R/A 1 BEGIN 0 R 2 OLDOH 18 R 3 RECPT 20 R 4 ISSUE 24 R 5 NEWOH 30 R 3. No Literal Table
  • 4. 4. Base Table Sr. No. BASE VALUE CONTEXT 1 15 2 5. MACHINE CODE: LC Instruction 0 BALR 15,0 2 L 3,16(0,15) 6 A 3,18(0,15) 10 S 3,22(0,15) 14 ST 3,28(0,15) 18 9 20 4 24 6 28 - Question 2: For the followig AL code,geerate the Symbol table,literal table,base table and machine code using the 2 pass assembler algorithm.(Ref-1) TEST START BEGIN BALR 15,0 USING BEGIN+2,15 SR 4,4 L ,3=F=’10’ LOOP L, 2,DATA(4) A 2,=F’49’ ST 2,DATA(4) A 4,=F’4’ BCT 3,*-16 BR 14 DATA DC F’1,2,3,4’ END Solution: 1.Assign Location Counter Sr. No. INSTRUCTIONS LC 1 TEST START 0 2 BEGIN BALR 15,0 0 3 USING BEGIN+2,15 2 4 SR 4,4 2 5 L ,3=F=’10’ 4 6 LOOP L, 2,DATA(4) 8 7 A 2,=F’49’ 12 8 ST 2,DATA(4) 16
  • 5. 9 A 4,=F’4’ 20 10 BCT 3,*-16 24 11 BR 14 28 12 DATA DC F’1,2,3,4’ 30 13 END 44 2.Symbol Table: SR. NO. LEBEL Value R/A 1 TEST 0 R 2 BEGIN 0 R 3 LOOP 8 R 4 DATA 30 R 3. Literal Table SR.NO. LITERAL VALUE R/A 1 =F’10’ 32 R 2 =F’49’ 36 R 3 =F’4’ 40 R 4. Base Table Sr. No. BASE VALUE CONTEXT 1 15 2 5. MACHINE CODE: LC Instruction 0 BALR 15,0 2 SR 4,4 4 L 3,30(0,15) 8 L 2,28(4,15) 12 A 2,34(0,15) 16 ST 2,28(4,15) 20 A 4,38(0,15) 24 BCT 3,22(0,15) 28 BCR 15,14 32 10 36 49 40 4 44 1 48 2 52 3 -
  • 6. Question 3: For the followig AL code,geerate the Symbol table,literal table,base table and machine code using the 2 pass assembler algorithm.(Ref-1) PROG START 0 BALR 15,0 USING *,15 LR 5,15 LH 1 DATA1 USING *,10 BR 14 DATA2 DC F’11’ DATA1 DC H’22’ TRS DC H’23’ BCK DS F AA EQU 1 DP EQU 2 BALR 2,0 USING * + AA,TRS LA 7,=A(BCK) BR 6 DC H ‘64’ DROP DP L 9=A(DATA1) A 9 TRS LTROG ST Q=F’100 END Solution: 1.Assign Location Counter SR. NO. INSTRUCTIONS LC 1 PROG START 0 0 2 BALR 15,0 0 3 USING *,15 2 4 LR 5,15 2 5 LH 1 DATA1 4 6 USING *,10 8 7 BR 14 8 8 DATA2 DC F’11’ 12 9 DATA1 DC H’22’ 16 10 TRS DC H’23’ 20 11 BCK DS F 24 12 AA EQU 1 28
  • 7. 13 DP EQU 2 28 14 BALR 2,0 28 15 USING * + AA,TRS 30 16 LA 7,=A(BCK) 30 17 BR 6 34 18 DC H ‘64’ 36 19 DROP DP 38 20 L 9=A(DATA1) 38 21 A 9 TRS 42 22 LTROG 48 23 ST Q=F’100 56 24 END 60 2.Symbol Table: SR. NO. LEBEL Value R/A 1 PROG 0 R 2 DATA2 12 A 3 DATA1 16 A 4 TRS 20 A 5 BCK 24 A 6 AA 1 A 7 DP 2 R 3. Literal Table SR.NO. LITERAL VALUE R/A 1 =A(BCK) 48 R 2 =A(DATA1) 52 R 3 =F’100’ 56 R 4. Base Table Sr. No. BASE VALUE CONTEXT 1 15 2 2 10 8 3 23 30
  • 8. 5. MACHINE CODE: LC Instruction 0 BALR 15,0 2 LR 5,15 4 LH 1,14(0,15) 8 ACR 15,14 12 11 16 22 20 23 24 - 28 BALR 2,0 30 LA 7,17(0,23) 34 BCR 15,6 36 64 38 L 9,21(0,23) 42 A 9,20 48 24 52 16 56 100 60 ST Q,25(0,23)
  • 9. Question 5: For the followig AL code,geerate the Symbol table,literal table,base table and machine code using the 2 pass assembler algorithm. Program START 0 USING *15 LA,15,SETUP SR TOTAL ,TOTAL AC EQU 2 INDEX EQU 3 TOTAL EQU 4 DATABASE EQU 13 SETUP EQU * USING SETUP 15 L,DATABASE,=A(DATA1) USING DATAAREA, DATABASE SR INDEX,INDEX LOOP L, AC DATA1(INDEX) AR TOTAL AC A,AC , F=’5’ ST AC SAVE(INDEX) A INDEX=F’4’ C INDEX=F’8000’ BNE LOOP LR 1,TOTAL BR,14 LTROG SAVE DS 2000F DATAAREA EQA * DATA1 DC F ‘25’,’26’,’97’,’101’... [2000 numbers] END Solution: 1. Assign Location Counter (LC) SR. NO. INSTRUCTION LC 1 Program START 0 0 2 USING *15 0 3 LA,15,SETUP 0 4 SR TOTAL ,TOTAL 4 5 AC EQU 2 6 6 INDEX EQU 3 6 7 TOTAL EQU 4 6 8 DATABASE EQU 13 6 9 SETUP EQU * 6 10 USING SETUP 15 6 11 L,DATABASE,=A(DATA1) 6 12 USING DATAAREA, DATABASE 10 13 SR INDEX,INDEX 10
  • 10. 14 LOOP L, AC DATA1(INDEX) 12 15 AR TOTAL AC 16 16 A,AC , F=’5’ 18 17 ST AC SAVE(INDEX) 22 18 A INDEX=F’4’ 26 19 C INDEX=F’8000’ 30 20 BNE LOOP 34 21 LR 1,TOTAL 38 22 BR,14 40 23 LTROG 42 24 SAVE DS 2000F 64 25 DATAAREA EQA * 8064 26 DATA1 DC F ‘25’,’26’,’97’,’101’... 8064 27 [2000 numbers] 8068 28 END 2. SYMBOL TABLE SR. NO. LEBEL Value R/A 1 PROGRAM 0 R 2 AC 2 A 3 INDEX 3 A 4 TOTAL 4 A 5 DATABASE 13 A 6 SETUP 6 A 7 LOOP 12 R 8 SAVE 64 R 9 DTA AREA 8064 A 10 DATA1 8064 R 3. LITERAL TABLE SR.NO. LITERAL VALUE R/A 1 =A(DATA1) 48 R 2 =F ‘5’ 52 R 3 =F’4’ 56 R 4 =F ‘8000’ 16064 R 4.BASE TABLE Sr. No. BASE VALUE CONTEXT 1 15 0 2 15 6 3 13 8064 5.MACHINE CODE:
  • 11. LC Instruction 0 LA 15,6(0,15) 4 SR 4,4 6 L 13,42(0,15) 10 SR 3,3 12 L,2,0(3,13) 16 AR 4,2 18 A 2,8012(0,13) 22 ST 2,8000(3,13) 26 A 3,8000(0,13) 30 C 3,8004(0,13) 34 BC 7 38 LR 1,4 40 BCR 15,14 48 8064 52 5 56 6 60 8000 64 25 8064 26 8068 97 - -