Presentation On: Assemble Language, Common Assemble Syntax and Code
Presentation On: Assemble Language, Common Assemble Syntax and Code
BY
Group 5
1
INTRODUCTION TO GROUP MEMBER
• Mehedi Hasan 1405001
• Rakib Hasan 1405019
• Sadhan Pal 1405029
• Rajib Hasan 1405026
• Hamidur Hahaman1405031
• Faisal Ahmed 1405030
• Moniruzzaman 1405016
2
ASSEMBLE LANGUAGE
An assembly language is a low-level programming
language designed for a specific type of processor.
Assembly code can be converted to machine code using an
assembler.
3
Advantages:
• Execution Time
• Memory space
• complex jobs done in an easier way
4
Generation of Assemble Language
1st 2nd
3
rd
4
th 5th
generation generation generation generation generation
5
Types of Assemble Language
1. CISC Assembly Language: Developed when people wrote assembly
language complicated, often specialized instructions with many effects
examples from x86 architecture.
Example: Intel x86, 68000, PDP-11
6
3. DSP Assembly Language: Digital signal processors designed
specifically for signal processing algorithms lots of regular arithmetic
on vectors.
Example: TI 320, Motorola 56000, Analog Devices.
7
ASSEMBLE LANGUAGE
ADVANTAGE
1. It is memory efficient, as it requires less memory.
2. Provides better control over your hardware and
Written programs run very faster.
3. By using this language we can contact directly to
the hardware.
4. Assembly language is more difficult and time
consuming than high-level languages.
8
Limitation:
1. It takes a lot of time and effort to write the code for the
same.
2. It is very complex and difficult to understand.
3. The syntax is difficult to remember.
4. It has a lack of portability of program between
different computer architectures
9
Why Need to Study
1. The learning of assembly language is still important for
programmers. It gives us more control over the system.
2. Assembly Language helps in contacting the hardware directly.
10
Register
Registers are temporary storage locations inside the CPU that hold data
and addresses. The register file is the component that contains all the
general purpose registers of the microprocessor. A few CPUs also place
special registers such as the PC and the status register in the register file.
11
Some Basic Operation on Register
12
DIV : Used to divide the unsigned word by byte or unsigned double
word by word.
Operand Explanation Example
8-bit register AX=AX\ 8-bit register DIV BL
13
STRUCTURE OF ASSEMBLEL ANGUAGE
TITLE ……..
MODEL ...
STACK
DATA ; Beginning of data segment.
…………..
…………..
CODE ; Beginning of code segment.
start: ; Indicates the beginning of instructions.
......
......
14
KEYWORDS USING IN ASSEMBLEL ANGUAGE
TITLE: identifies the program listing title. Any text typed to the
right side of the directive is printed at the top of each page in the
listing file.
STACK: sets the size of the program stack which may b any size up
to 64kb.
15
KEYWORDS USING IN ASSEMBLEL ANGUAGE
PROC: creates a name and a address for the beginning of a procedure.
DATA: all variables pertaining to the program are defined in the area
following this directive called data segment.
END: terminates assembly of the program. Any lines of text placed
after this directive is ignored.
16
START
17
PROGRAM OF ASSEMBLE LANGUAGE
18
ADDITION OF TWO NUMERS
.model small
.stack 100h
.data
NUM1 DB ?
NUM2 DB ?
RESULT DB ?
MSG1 DB 10,13,"ENTER FIRST NUMBER TO ADD : $"
MSG2 DB 10,13,"ENTER SECOND NUMBER TO ADD : $"
MSG3 DB 10,13,"RESULT OF ADDITION IS : $"
19
ADDITION OF TWO NUMERS
.code
main proc
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV NUM1,AL
20
ADDITION OF TWO NUMERS
LEA DX,MSG2
MOV AH,9
INT 21H
MOV AH,1
INT 21H
SUB AL,30H
MOV NUM2,AL
ADD AL,NUM1
MOV RESULT,AL
MOV AH,0
21
ADDITION OF TWO NUMERS
AAA
ADD AH,30H
ADD AL,30H
MOV BX,AX
LEA DX,MSG3
MOV AH,9
INT 21H
MOV AH,2
MOV DL,BH
INT 21H
MOV AH,2
MOV DL,BL
INT 21H
22
ADDITION OF TWO NUMERS
MOV AH,4CH
INT 21H
main endp
end main
23
OVERWIEW OF THE HOLD TOPIC
24
Thanks
for being with us
25