الـواجـب رقم 3

advertisement
Assembly Language – Homework 3
1.
After executing the following assembly program, find the contents of x , y , z , w , al.
2.
Write an 8086 assembly language program that receives the character Y from the
keyboard and displays it on the screen as follows:
%Y
YYY
3.
Write a code fragment to display the characters B and K on the screen.
4.
Write an assembly program to read a character from the keyboard and display it on the
screen.
5.
Write a program to display the message ‘Hello world’ followed by Return and Line-feed.
6.
Write an 8086 assembly language program that receives 2 numbers from the keyboard
and displays the SUM on the screen. The output will be as follows:
Enter First Number: √
Enter Second Number: √
The Result is: √
7.
By using a subroutine to input the numbers, write an 8086 assembly language program
that receives 2 numbers from the keyboard and displays the SUM on the screen.
8.
Write an 8086 assembly language subroutine that calculates Fibonaci series: 1, 1, 2, 3, 5,
8, 13 . . . . . . (Limits to 7 loops). Each number is the sum of the preceding two numbers.
AX should store the current Fibonaci number. Call this subroutine from the main
program.
9.
Write a 8086 assembly program that clears the contents of DX register if AX is less than or
equal 5. Otherwise, it loads Dx register with 33H.
Download