Topics • assembly language. • Characteristics • Different Programming Languages. • Assemblers. • Most commonly Used Assemblers. • MASM and its installation. • Syntax and simple program in MASM 06/26/2022 1
May 22, 2015
04/12/2023 1
Topics
• assembly language.• Characteristics• Different Programming Languages.• Assemblers.• Most commonly Used Assemblers.• MASM and its installation.• Syntax and simple program in MASM
04/12/2023 2
ASSEMBLERAssembler tutorial and its installation
04/12/2023 3
What is Assembly language?• It is a low-level symbolic code converted by an
assembler
Characteristics of assembly language• Assembly language is a symbolic representation of
a processor's native code.• Using machine code allows the programmer to
control precisely what the processor wants to do.
04/12/2023 4
• The resulting program is normally very fast and very compact.
• Assembly language is used to write the program using alphanumeric symbols (or mnemonic), e.g. ADD, MOV, PUSH etc.
• Mnemonics: Mnemonics are predefined assembly-language names for machine instructions, pseudo-ops, directives, and data allocation statements. Mnemonics are not case-sensitive.
Continue….
04/12/2023 5
Different programming languages?
• 1> Basic: It is the widely used , easy to learn general purpose language.
• 2> Cobol: A standardized language used for commercial application.
• 3> Fortran: Developed for solving mathematical and scientific problems.
04/12/2023 6
• 4> C: It is used for all purposes like,,,scientific application, commercial application,developing games etc
• 5> C++: It’s a general purpose computer programming language which is used to make different programs and application
Continue…
04/12/2023 7
Assemblerwhat is assembler ?• A program for converting instructions
written in low-level symbolic code into machine code.
Flow of program development
Program.asm Object file.obj Executable file .exe
04/12/2023 8
• MASM (Macro Assembler)• The Microsoft Macro Assembler (MASM) is
an 32BIT assembler that uses the Intel syntax for MS-DOS and Microsoft Windows.
• Beginning with MASM 8.0 there are two versions of the assembler -
• One for 16-bit and 32-bit assembly sources, • And another (ML64) for 64-bit sources only
Most commonly used assembler
04/12/2023 9
• How to run MASM 8086 Software on your System
Explain • First Download Three files to proceed with the
further steps• Program - DOSBox 0.74 Installer • Program - 8086 Assembler• Program - Notepad ++
MASM Installation
04/12/2023 10
• Now after the downloading part• next open the second file (8086 Assembler) • which is a compressed file so you have to extract the files in it to the C Drive
on your system. (Windows Driver)
Continue….
04/12/2023 11
• For that just select the 8086 folder > right click and click Extract file .
Continue….
04/12/2023 12
• Then select C Drive >
• Finally Click on Ok!
Continue….
04/12/2023 13
• Extracting start
• Now GOTO the c drive (windows drive) and you can see the folder name (MASM)
Continue….
04/12/2023 14
• Click on the folder name MASM and open the folder to conform all the files are extracted
• Now next we are going to install DOSBOX
Continue….
04/12/2023 15
• Now here we have a file
• Click(double click) on the file DOSBOX
Continue….
04/12/2023 16
• Click yes for administrator permission.• Click on heck box and click next
Continue….
04/12/2023 17
• Select the drive where you want to install by click on browse select the drive and click install
Continue….
04/12/2023 18
• (c: by default)• Installation start• Click on close Button and installation is done and
and read work
Continue….
04/12/2023 19
• Now its done!
• Now we going to install NOTEPAD++
Continue….
04/12/2023 20
• Click(double click) on the notepad++ file • Click yes if you got the administrator message
• click oK
Continue….
04/12/2023 21
• Click next
• Click I agree
Continue….
04/12/2023 22
• Again next
• Select the first and 3rd option and click install
Continue….
04/12/2023 23
• Click finished and its done
Continue….
04/12/2023 24
• What is the syntax ?• The structure of statements in a computer language
Basic assembly syntax• Each MASM standard source line contains a
combination of the 4 fields:
Syntax And Simple Program In MASM
04/12/2023 25
• Notes:1. backslash (\) uses as the line continuation
character: if a line ends with backslash, the next line is considered to be a part of the backslash-ended line
2. No restrictions on white space within a line3. A colon after a label is optional
Continue….
04/12/2023 26
• Examples:• 1. mov ax, 2 ; moves constant 2 to the register ax
Running Simple hello world program in assembly• 1.First open notepad ++• 2. Write the code on notepad++ and save the
program in .asm extension
Continue….
04/12/2023 27
• 3. Now copy the .asm source file in to the folder of MASM which in c: drive
• 4. Then open the DOSBOX and write the command ( mount c c:\masm8086\ ) then press enter then we
see drive is mounted
Continue….
04/12/2023 28
5. now type the next command c: press enter it will change the drive to c:\> from drive
z:\>
Continue….
04/12/2023 29
6. Then type dir to see the contents in directory
7 .now type masm program.asm• press enter • after that obj will be created
Continue….
04/12/2023 30
• Like this
8. now type link (program) AND press enter
Continue….
04/12/2023 31
• After that program.exe will be created in the folder of MSAM
10. now run the last command is program.exeand your program will be executed
Continue….
04/12/2023 32
Questions Please…
04/12/2023 33
Thank you !