0% found this document useful (0 votes)
151 views25 pages

Presentation On: Assemble Language, Common Assemble Syntax and Code

This document provides an overview of assembly language including: - Assembly language is a low-level programming language that can be converted to machine code. It provides better control over hardware and faster execution than high-level languages. - The document discusses different types of assembly languages like CISC, RISC, DSP, and VLIW. It also covers basic assembly syntax like keywords, registers, and instructions. - Examples of assembly code are provided to demonstrate an addition program and checking if a number is even or odd. Key aspects like data segments, code segments, procedures, and main functions are illustrated. - In conclusion, the document gives a high-level introduction to assembly language concepts,

Uploaded by

faridul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views25 pages

Presentation On: Assemble Language, Common Assemble Syntax and Code

This document provides an overview of assembly language including: - Assembly language is a low-level programming language that can be converted to machine code. It provides better control over hardware and faster execution than high-level languages. - The document discusses different types of assembly languages like CISC, RISC, DSP, and VLIW. It also covers basic assembly syntax like keywords, registers, and instructions. - Examples of assembly code are provided to demonstrate an addition program and checking if a number is even or odd. Key aspects like data segments, code segments, procedures, and main functions are illustrated. - In conclusion, the document gives a high-level introduction to assembly language concepts,

Uploaded by

faridul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

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

2. RISC Assembly Language: Response to growing use of compilers


Easier-to-target, uniform instruction sets.
Example: Examples: SPARC, MIPS, HP-PA, PowerPC

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.

4. VLIW Assembly Language: Response to growing desire for


instruction-level parallelism Using more transistors cheaper than
running them faster Many parallel ALUs
Examples: Itanium, TI 320C6000

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

The register in microprocessor perform many operation for example:


ADD, SUB, DIV, SBB, MUL, INX, DAD etc

ADD : Used to add the provided byte to byte/word to word. ADC −


Used to add with carry.
Example: ADD AX BX

SUB : Used to sub the provided byte to byte/ word to word.


Example: SUB AX BX

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

SBB : Used to perform subtraction with borrow.


Operand Explanation Example
R A = A-P-Prev. SUB B
carry
MUL : Used to multiply unsigned byte by byte/word by word.
Operand Explanation Example
8-bit register AX=AL*8-bit MUL BH

13
STRUCTURE OF ASSEMBLEL ANGUAGE
TITLE ……..
MODEL ...
STACK
DATA          ; Beginning of data segment.
…………..
…………..
CODE          ; Beginning of code segment.
start:            ; Indicates the beginning of instructions.
......
......

Main PROC ; Beginning of procedure (if necessary)


……………
…………..
Main ENDP ; End of procedure.

END start     ; End of instruction.

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.

MODEL: selects a standard memory model for the programs.

STACK: sets the size of the program stack which may b any size up
to 64kb.

CODE: identifies the part of the program that contains instructions .

15
KEYWORDS USING IN ASSEMBLEL ANGUAGE
PROC: creates a name and a address for the beginning of a procedure.

ENDP: indicates the end of the 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

• ADDITION OF TWO NUMBER


• CHECK WHEATHER NUMBER IS EVEN NOR NOT

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

• What is assemble language?


• Which things are needed for assemble
language?
• Discussion about assemble program with
example.

24
Thanks
for being with us

25

You might also like