Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views6 pages

Assembly Basic Program

This document contain most important and frequently asked program of assembly laungage, they operate by using nasm (netwide compiler). They are written in a very simple and easy laungage for better undertanding.

Uploaded by

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

Assembly Basic Program

This document contain most important and frequently asked program of assembly laungage, they operate by using nasm (netwide compiler). They are written in a very simple and easy laungage for better undertanding.

Uploaded by

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

Assembly launguage manual

Final project

Project 1

Project 2

Project 3
[org 0x0100]
mov ax, [num1]
mov bx, [num1+2]
add ax, bx
mov bx, [num1+4]
add ax, bx
mov [num1+6], ax
mov ax, 0x4c00
int 0x21
num1: dw 5
dw 10
dw 15
dw 0
Assembly launguage manual
Project 4 Final project

Project 5
[Org 0x0100]
Mov al, [num1]
Mov bl, [num1+1]
Add al, bl
Mov bl, [num1+2]
Add al, bl
Mov [num1+3], al
Mov ax, 0x4c00
Int 0x21
num1: db 5, 10, 15,0

Project 6
Assembly launguage manual
Project 7
Final project

Project 8
Assembly launguage manual
Project 9 Final project

Project 10

Project 11
Assembly launguage manual
Project 12
Final project

Project 13

[org 0x0100]
jmp start
multiplicand: dd 1300
multiplier: dw 500
result: dd 0
start: mov cl, 16
mov bx, 1
checkbit: test bx, [multiplier]
jz skip
mov ax, [multiplicand]
add [result], ax
mov ax, [multiplicand+2]
adc [result+2], ax
skip: shl word [multiplicand], 1
rcl word [multiplicand+2], 1
shl bx, 1
dec cl
jnz checkbit
mov ax, 0x4c00
int 0x21

Project 14
[org 0x0100]
jmp start
data: dw 60, 55, 45, 50, 40, 35, 25, 30, 10, 0
swap: db 0
bubblesort: dec cx
shl cx, 1
mainloop: mov si, 0
mov byte [swap], 0
innerloop: mov ax, [bx+si]
cmp ax, [bx+si+2]
jbe noswap
Assembly launguage manual
mov dx, [bx+si+2]
mov [bx+si], dx Final project
mov [bx+si+2], ax
mov byte [swap], 1
noswap: add si, 2
cmp si, cx
jne innerloop
cmp byte [swap], 1
je mainloop
ret
start: mov bx, data
mov cx, 10
call bubblesort
mov ax, 0x4c00
int 0x21

Project 15

[org 0x0100]
jmp start
data: dw 60, 55, 45, 50, 40, 35, 25, 30, 10, 0
data2: dw 328, 329, 898, 8923, 8293, 2345, 10, 877, 355, 98
dw 888, 533, 2000, 1020, 30, 200, 761, 167, 90, 5
swapflag: db 0
swap: mov ax, [bx+si]
xchg ax, [bx+si+2]
mov [bx+si], ax
ret
bubblesort: dec cx
shl cx, 1
mainloop: mov si, 0
mov byte [swapflag], 0
innerloop: mov ax, [bx+si]
cmp ax, [bx+si+2]
jbe noswap
call swap
mov byte [swapflag], 1
noswap: add si, 2
cmp si, cx
jne innerloop
cmp byte [swapflag], 1
je mainloop
ret
start: mov bx, data
mov cx, 10
call bubblesort
mov bx, data2
mov cx, 20
call bubblesort
mov ax, 0x4c00
int 0x21

You might also like