SlideShare uma empresa Scribd logo
1 de 11
BIRLA INSTITUE OF TECHNOLOGY,MESRA
JAIPUR CAMPUS
TOPIC : MACRO ASSEMBLER
BY
MEGHAJ KUMAR MALLICK
(MCA/25017/18)
MCA 2ND YEAR, 4TH SEMESTER
Design of a Macro Assembler
Design of Macro Assembler
• 3 passes in macro Assembler.
Pass 1:
– Macro definition processing.
– SYMTAB construction.
Pass 2:
– Macro expansion.
– Memory allocation & LC processing.
– Processing of Literals.
– Intermediate Code Generation.
pass 3:
– Target code Generation.
– Macro processor can be added asa
processor to an assembler.
– It is implemented in pass 1 of the
assembler.
Design of Macro AssembleR
Advantages:
– Many functions don’t have to be
implemented twice.
– Less overhead during processing.(by
removing intermediate code)
– More flexibility is available to the
programmer.
Design of Macro AssembleR
Disadvantages:
• Combined pass 1 of the assembler &
macro processor may be too large for a
program to fit into core of some
machine.
• Complexity of such program maybe
overwhelming.
Design of Macro AssembleR
PAPASSSPASS 1
R
SeSeararcchh
ppsseeuuddoo-o-oppTTablabl
Search
pseudo-op Table
SeSeararcchh
MMacacrroonnamamee TTaablbl
Search
Macro name Table
SeSeararcchh
mmaacchihinnee-o-opp TTbllee
Search
machine-op Table
GGoo ttoo
PAPASSS
S22
Go to
PASS 2Type ?
Process
Process
Pseudo-ops
Process
Machine instruction
Setup macro
stack frame ,etc.
READ
R
R
R
Maccro definition
Found, macro
calls R
Found
Not
Not
End
pseudo-op
Others
Macro
pseudo-op
Microsoft Macro Assembler
 MASM is an assembler for the x86 family of microprocessors,
originally produced MS-DOS operating system. The MASM is the
example of high level assembler. It supports following main
features-
i) A wide variety of macro facilities
ii) Structure programming idioms
iii)High level constructions for looping, procedure calls , and
alteration
The later versions of MASM added the capability of producing
program for the windows operating system. The example of this
type is MASM – 32 which work on the program which already
written API based code in windows .
Comparison of Macro Processors
Design
Single pass
 every macro must be defined before it is called
 one-pass processor can alternate between macro definition and
macro expansion
 nested macro definitions may be allowed but nested calls are
not
 Two pass
 Pass1: Recognize macro definitions
 Pass2: Recognize macro calls
 nested macro definitions are not allowed
Tables generated while macro
processing
The macro processing leads to generation of three
types of tables –
1. DEFTAB – the definition of the macro is stored in
this table.
2. NAMTAB – the name of the macro is stored in
this table.
3. ARGTAB – all the arguments of macro is stored
in this table.
MACRO ASSEBLER

Mais conteúdo relacionado

Mais procurados

Systolic, Transposed & Semi-Parallel Architectures and Programming
Systolic, Transposed & Semi-Parallel Architectures and ProgrammingSystolic, Transposed & Semi-Parallel Architectures and Programming
Systolic, Transposed & Semi-Parallel Architectures and Programming
Sandip Jassar (sandipjassar@hotmail.com)
 

Mais procurados (6)

Case study 1
Case study 1Case study 1
Case study 1
 
Mule Resequencer Filter
Mule Resequencer FilterMule Resequencer Filter
Mule Resequencer Filter
 
Program and Network Properties
Program and Network PropertiesProgram and Network Properties
Program and Network Properties
 
program flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architectureprogram flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architecture
 
Systolic, Transposed & Semi-Parallel Architectures and Programming
Systolic, Transposed & Semi-Parallel Architectures and ProgrammingSystolic, Transposed & Semi-Parallel Architectures and Programming
Systolic, Transposed & Semi-Parallel Architectures and Programming
 
Compiler optimization
Compiler optimizationCompiler optimization
Compiler optimization
 

Semelhante a MACRO ASSEBLER

33443223 system-software-unit-iv
33443223 system-software-unit-iv33443223 system-software-unit-iv
33443223 system-software-unit-iv
Shaniya Fathimuthu
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and Microcontrollers
Islam Samir
 
EVOLUTION OF SYSTEM
EVOLUTION OF SYSTEM EVOLUTION OF SYSTEM
EVOLUTION OF SYSTEM
Sahil Garg
 

Semelhante a MACRO ASSEBLER (20)

Macro-processor
Macro-processorMacro-processor
Macro-processor
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
 
Ss4
Ss4Ss4
Ss4
 
Parallelization and Optimization of Time-Domain Electronic Scattering Simulat...
Parallelization and Optimization of Time-Domain Electronic Scattering Simulat...Parallelization and Optimization of Time-Domain Electronic Scattering Simulat...
Parallelization and Optimization of Time-Domain Electronic Scattering Simulat...
 
Micro Assembler
Micro AssemblerMicro Assembler
Micro Assembler
 
Lect_1.pptx
Lect_1.pptxLect_1.pptx
Lect_1.pptx
 
33443223 system-software-unit-iv
33443223 system-software-unit-iv33443223 system-software-unit-iv
33443223 system-software-unit-iv
 
Ijetr042175
Ijetr042175Ijetr042175
Ijetr042175
 
Microassembler a10
Microassembler a10Microassembler a10
Microassembler a10
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
Module 5.pdf
Module 5.pdfModule 5.pdf
Module 5.pdf
 
LP-I_Lab Manual_TE_AY2023-24_updated.pdf
LP-I_Lab Manual_TE_AY2023-24_updated.pdfLP-I_Lab Manual_TE_AY2023-24_updated.pdf
LP-I_Lab Manual_TE_AY2023-24_updated.pdf
 
Introduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and MicrocontrollersIntroduction to Embedded Systems and Microcontrollers
Introduction to Embedded Systems and Microcontrollers
 
18CS44-MES-Module-1.pptx
18CS44-MES-Module-1.pptx18CS44-MES-Module-1.pptx
18CS44-MES-Module-1.pptx
 
Constructing DSMLs
Constructing DSMLsConstructing DSMLs
Constructing DSMLs
 
EVOLUTION OF SYSTEM
EVOLUTION OF SYSTEM EVOLUTION OF SYSTEM
EVOLUTION OF SYSTEM
 
Matlab introduction lecture 1
Matlab introduction lecture 1Matlab introduction lecture 1
Matlab introduction lecture 1
 
ARM.pdf
ARM.pdfARM.pdf
ARM.pdf
 
An Optimising Compiler For Generated Tiny Virtual Machines
An Optimising Compiler For Generated Tiny Virtual MachinesAn Optimising Compiler For Generated Tiny Virtual Machines
An Optimising Compiler For Generated Tiny Virtual Machines
 
Unit 2
Unit 2Unit 2
Unit 2
 

Mais de Meghaj Mallick

Mais de Meghaj Mallick (20)

24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
 
PORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSSPORTFOLIO BY USING HTML & CSS
PORTFOLIO BY USING HTML & CSS
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Introduction to System Programming
Introduction to System ProgrammingIntroduction to System Programming
Introduction to System Programming
 
Icons, Image & Multimedia
Icons, Image & MultimediaIcons, Image & Multimedia
Icons, Image & Multimedia
 
Project Tracking & SPC
Project Tracking & SPCProject Tracking & SPC
Project Tracking & SPC
 
Peephole Optimization
Peephole OptimizationPeephole Optimization
Peephole Optimization
 
Routing in MANET
Routing in MANETRouting in MANET
Routing in MANET
 
Architecture and security in Vanet PPT
Architecture and security in Vanet PPTArchitecture and security in Vanet PPT
Architecture and security in Vanet PPT
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
 
Text Mining of Twitter in Data Mining
Text Mining of Twitter in Data MiningText Mining of Twitter in Data Mining
Text Mining of Twitter in Data Mining
 
DFS & BFS in Computer Algorithm
DFS & BFS in Computer AlgorithmDFS & BFS in Computer Algorithm
DFS & BFS in Computer Algorithm
 
Software Development Method
Software Development MethodSoftware Development Method
Software Development Method
 
Secant method in Numerical & Statistical Method
Secant method in Numerical & Statistical MethodSecant method in Numerical & Statistical Method
Secant method in Numerical & Statistical Method
 
Motivation in Organization
Motivation in OrganizationMotivation in Organization
Motivation in Organization
 
Communication Skill
Communication SkillCommunication Skill
Communication Skill
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 
Hashing In Data Structure
Hashing In Data Structure Hashing In Data Structure
Hashing In Data Structure
 
Complexity Analysis of Recursive Function
Complexity Analysis of Recursive FunctionComplexity Analysis of Recursive Function
Complexity Analysis of Recursive Function
 
Array implementation & Construction of Heap
Array implementation & Construction of HeapArray implementation & Construction of Heap
Array implementation & Construction of Heap
 

Último

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

MACRO ASSEBLER

  • 1. BIRLA INSTITUE OF TECHNOLOGY,MESRA JAIPUR CAMPUS TOPIC : MACRO ASSEMBLER BY MEGHAJ KUMAR MALLICK (MCA/25017/18) MCA 2ND YEAR, 4TH SEMESTER
  • 2. Design of a Macro Assembler
  • 3. Design of Macro Assembler • 3 passes in macro Assembler. Pass 1: – Macro definition processing. – SYMTAB construction. Pass 2: – Macro expansion. – Memory allocation & LC processing. – Processing of Literals. – Intermediate Code Generation.
  • 4. pass 3: – Target code Generation. – Macro processor can be added asa processor to an assembler. – It is implemented in pass 1 of the assembler. Design of Macro AssembleR
  • 5. Advantages: – Many functions don’t have to be implemented twice. – Less overhead during processing.(by removing intermediate code) – More flexibility is available to the programmer. Design of Macro AssembleR
  • 6. Disadvantages: • Combined pass 1 of the assembler & macro processor may be too large for a program to fit into core of some machine. • Complexity of such program maybe overwhelming. Design of Macro AssembleR
  • 7. PAPASSSPASS 1 R SeSeararcchh ppsseeuuddoo-o-oppTTablabl Search pseudo-op Table SeSeararcchh MMacacrroonnamamee TTaablbl Search Macro name Table SeSeararcchh mmaacchihinnee-o-opp TTbllee Search machine-op Table GGoo ttoo PAPASSS S22 Go to PASS 2Type ? Process Process Pseudo-ops Process Machine instruction Setup macro stack frame ,etc. READ R R R Maccro definition Found, macro calls R Found Not Not End pseudo-op Others Macro pseudo-op
  • 8. Microsoft Macro Assembler  MASM is an assembler for the x86 family of microprocessors, originally produced MS-DOS operating system. The MASM is the example of high level assembler. It supports following main features- i) A wide variety of macro facilities ii) Structure programming idioms iii)High level constructions for looping, procedure calls , and alteration The later versions of MASM added the capability of producing program for the windows operating system. The example of this type is MASM – 32 which work on the program which already written API based code in windows .
  • 9. Comparison of Macro Processors Design Single pass  every macro must be defined before it is called  one-pass processor can alternate between macro definition and macro expansion  nested macro definitions may be allowed but nested calls are not  Two pass  Pass1: Recognize macro definitions  Pass2: Recognize macro calls  nested macro definitions are not allowed
  • 10. Tables generated while macro processing The macro processing leads to generation of three types of tables – 1. DEFTAB – the definition of the macro is stored in this table. 2. NAMTAB – the name of the macro is stored in this table. 3. ARGTAB – all the arguments of macro is stored in this table.