Tuesday, October 5, 2010

Title :
Write a assembly language program to display two messages on the screen for 20 time.
Algorithm :
1. Start the process
2. Declare the model as small
3. Take 100 sized stack
4. Declare the messages to display in 20 times
5. Load the effective address of the message in Dx register
6. Display and execute the message form Dx
7. Return to DOS mode
8. End of process.


Programming Code :
model small
stack 100h
data
msg1 db ‘Bangladesh University $’
msg2 db ‘Dhaka $’
code
main proc
mov ax, @ data
mov ds, ax
lea dx, msg1
lab1:
int 21h
loop lab1
mov cx,20
lea dx, msg2
mov ah, 9
lab2:
int 21h
loop lab2
mov ah, 4ch
int 21h
main endp
end main


Output :

Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka Dhaka

No comments:

Post a Comment

Simple and Complete E-commerce PL/SQL Code

This is a Database of e-commerce solution. This database is quite simple but complete one.  The script (.sql file) contain all the nece...