Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
51 views
3 pages
MASM Theory Lab
Masm
Uploaded by
Ajnamol N R
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save MASM theory lab For Later
Download
Save
Save MASM theory lab For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
51 views
3 pages
MASM Theory Lab
Masm
Uploaded by
Ajnamol N R
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save MASM theory lab For Later
Carousel Previous
Carousel Next
Download
Save
Save MASM theory lab For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 3
Search
Fullscreen
12. Famillarization of MASM Programming ‘THe Intel 8086 isa 16 bit processor that is intended to be w Computer. 16 bit indicates the word length of the micro Produces the physical address by adding the effeeti the four segment registers and this way of Addressing, notation, ised as the CPU in the micro processor. The 8086 microprocessor address to the contents of at of the memory is called segment: offset ‘The Microsoft Macro Assembler is an X86 assembler that and Windows, uses the Intel syntax for MS-DOS | Structure of an assembly language program Assembly language programs are divided into four sections © Header © Data | * Code * Closing ‘The header ‘The header contains various directives which do not Produce machine codes. ‘Sample header: ASSUME —CS:CODE, _Ds:DaTA ‘The data segment ‘The data segment begins with the dire. directive. Two kinds of variables are there, “data segment” and ends with ‘data ends* alized and uninitialized, Program data and storage Pseudo ops are used to define data or reserved ‘storage: + DB - byte * DW - word + DD - double word + DQ - Quad word ancl Microprocessors LabCSL.331- Lab Manual, Semester 5, CSE Dept, KMEA3 * DT = Tenbyte Defining data Examples for numeric data values too = decimal 1006 - binary 00h = hexadecimal “100” - ASCII “100 - ASCII A list of vatues can be defined using ARRAY ARRAY = DW 4 Ch, 10b, 13, 0 A? represents an uninitiated storage location RESULT DB? ‘The code segment | Code segment begins with code segment directive and ends with code ends directive. Afier code segment directive START is used to indicate start of program. Each line of the Code is divided into four columns: label, mnemonics, operands and comments Tabels refer to the position of variables and instructions represented by. the mnemonies, Operands are requested by most assembly language instructions and the instructions are operated an the operands. Comments aid in remembering the purpose of Various instructions. ‘The closing of the program is indicated by the directives CODE ENDS END START ‘These directives indicate the assembler that it has reached the end of the Program. Assembling a program : ‘The source file of an assembly language program is usually named with an extension‘The source file ts object file obj ‘The command masm my prog prodices myprog obj ‘The object file tust be linked by the linker (TLINK) to produce an executable file (exe) ‘The command link myprog prosdices myprop.exe ‘TWopat and output using KOK Assembly language Most ingwut and output is not done directly via the © ports because port address vary Aanvong computer inodels, There are BOS routines and DOS routines fay handling VO Castine (interrupt number 21h), Tnterrnpes Te interrupt instevction is vied to cause a software interrupt (System call) Ar (ierrupt interrupts the currently running program and execute the subroutines ancl transfor ‘he control back to the original program after the completion of subroutine, The interrupts ‘may be caused by hardware Or software. int 21h is an example for saflware interrupt ‘Output to monitor ‘DOS internupte: imerruypt 21h is» DOS inerrupt that invokes one of the many SuPpORtng routines provided by KOS. The Dow fimetion is selected via AH register, Other Fepiatars may serve as arguments. For displaying h character ropister AN vortainy the value AN and register Dt cointainn the ASCH value of the charter, Forutpatting a sting the register At contains the vale ODI andl repister DX ‘omuli th offet to the string in tho data sean, The string is torminated with “character, Input w character
You might also like
Assembly Directives in 8051 Microcontroller-1
PDF
No ratings yet
Assembly Directives in 8051 Microcontroller-1
9 pages
SSMP Lab Contents
PDF
No ratings yet
SSMP Lab Contents
123 pages
MI Chapter 3
PDF
No ratings yet
MI Chapter 3
26 pages
Assembly Language For x86 Processors
PDF
No ratings yet
Assembly Language For x86 Processors
59 pages
Lecture_4
PDF
No ratings yet
Lecture_4
54 pages
Debug
PDF
No ratings yet
Debug
90 pages
Embedded Systems - Assembly Language
PDF
No ratings yet
Embedded Systems - Assembly Language
4 pages
Lecture 17 18
PDF
No ratings yet
Lecture 17 18
63 pages
Chapter 4
PDF
No ratings yet
Chapter 4
34 pages
Assembler Directives
PDF
No ratings yet
Assembler Directives
21 pages
EXE FORMAT
PDF
No ratings yet
EXE FORMAT
12 pages
Chapter-6
PDF
No ratings yet
Chapter-6
37 pages
Absolute & Relocation Print
PDF
No ratings yet
Absolute & Relocation Print
3 pages
Solutions Manual
PDF
No ratings yet
Solutions Manual
200 pages
3 Introduction to Assembly Language
PDF
No ratings yet
3 Introduction to Assembly Language
50 pages
Assembly language programming
PDF
No ratings yet
Assembly language programming
33 pages
COAL Lab 6
PDF
No ratings yet
COAL Lab 6
7 pages
Chapter 2: 8051 Assembly Language Programming: - Microcontroller's
PDF
No ratings yet
Chapter 2: 8051 Assembly Language Programming: - Microcontroller's
19 pages
03-IntroAssembly
PDF
No ratings yet
03-IntroAssembly
67 pages
03 IntroAssembly
PDF
No ratings yet
03 IntroAssembly
54 pages
Co All Programs
PDF
No ratings yet
Co All Programs
32 pages
lab 2
PDF
No ratings yet
lab 2
8 pages
CST307
PDF
No ratings yet
CST307
12 pages
Chapt 03
PDF
No ratings yet
Chapt 03
66 pages
Lab 2
PDF
No ratings yet
Lab 2
8 pages
Appendix C
PDF
No ratings yet
Appendix C
18 pages
Lesson 3
PDF
No ratings yet
Lesson 3
29 pages
X 86 Asm
PDF
No ratings yet
X 86 Asm
18 pages
Chapter Four
PDF
No ratings yet
Chapter Four
76 pages
Assembly Tutorial
PDF
100% (2)
Assembly Tutorial
25 pages
Manual
PDF
No ratings yet
Manual
132 pages
Prapti Gandhi Exp 1 60
PDF
No ratings yet
Prapti Gandhi Exp 1 60
11 pages
Objective: To Understand The Basic Concept and Functionality of Assembly Language
PDF
No ratings yet
Objective: To Understand The Basic Concept and Functionality of Assembly Language
9 pages
Chapter 3
PDF
No ratings yet
Chapter 3
34 pages
Lecture #10, Microprocessor-ALP-Intro
PDF
No ratings yet
Lecture #10, Microprocessor-ALP-Intro
33 pages
CS221 Assembly Language Fundamentals: Irvine Chapter 3: Constant Expressions
PDF
No ratings yet
CS221 Assembly Language Fundamentals: Irvine Chapter 3: Constant Expressions
11 pages
MPMC M4 PDF
PDF
No ratings yet
MPMC M4 PDF
17 pages
Assembly Language For x86 Processors
PDF
No ratings yet
Assembly Language For x86 Processors
51 pages
2a Al Fundamentals New Microproceeor Book
PDF
No ratings yet
2a Al Fundamentals New Microproceeor Book
50 pages
Lab Manual Cse
PDF
No ratings yet
Lab Manual Cse
8 pages
8086 Programming
PDF
No ratings yet
8086 Programming
31 pages
Interrupts, Memory Models & Simple Instructions
PDF
No ratings yet
Interrupts, Memory Models & Simple Instructions
7 pages
Lecture3 Assembly
PDF
No ratings yet
Lecture3 Assembly
26 pages
8086 Assembly Language Programming I
PDF
100% (3)
8086 Assembly Language Programming I
46 pages
Chapter Four - Part II
PDF
No ratings yet
Chapter Four - Part II
32 pages
Assembly Language Lab #1: Islamic University of Gaza Computer Engineering Department
PDF
100% (1)
Assembly Language Lab #1: Islamic University of Gaza Computer Engineering Department
8 pages
Introduction To Assembly Language: Advantages
PDF
No ratings yet
Introduction To Assembly Language: Advantages
9 pages
Micro 7
PDF
No ratings yet
Micro 7
79 pages
Microprocessor and Assembly Language
PDF
No ratings yet
Microprocessor and Assembly Language
36 pages
Aaa
PDF
No ratings yet
Aaa
46 pages
Computer Systems Organization With Assembly Language
PDF
No ratings yet
Computer Systems Organization With Assembly Language
31 pages
Lec13 X86asm
PDF
No ratings yet
Lec13 X86asm
71 pages
MPL Labmanual
PDF
No ratings yet
MPL Labmanual
76 pages
Lab 6 Ms
PDF
No ratings yet
Lab 6 Ms
9 pages
Assembly Language Programming: Bilal Zahoor Kashmir University North Campus
PDF
No ratings yet
Assembly Language Programming: Bilal Zahoor Kashmir University North Campus
31 pages
Chapter 4 Constructing The Machine Code For 8086 Instruction
PDF
No ratings yet
Chapter 4 Constructing The Machine Code For 8086 Instruction
50 pages
Chapter 4.1 Introduction To Assembly Language
PDF
No ratings yet
Chapter 4.1 Introduction To Assembly Language
46 pages
LAB#2
PDF
No ratings yet
LAB#2
9 pages
U P R M C: INEL 4206 8086 Microprocessors Introduction To Assembly Programming
PDF
No ratings yet
U P R M C: INEL 4206 8086 Microprocessors Introduction To Assembly Programming
19 pages
Lab Session 1
PDF
No ratings yet
Lab Session 1
13 pages