Assembly languuage for x86 processor

Narayan
csc310test.docx

Note: all these programs should be written for x86 processor.

INSTRUCTIONS:

Save this document with your added your name take home problem number

Example AScheiman takehomeproblem3

. You will only submit the appropriate asm files.

Of course, copying from a friend will cause great harm to both of your final grades.

1) Using the following form

.data

.code

coding

call Create RandomArray

call PrintArray

call PrintReverseArray

call CountArray

call PrintCount

call PrintCountGraph

more coding

main endp

All methods

· Write the program to create 100random numbers from 20 to 30 and print them in an array called TestArray

· Print the array out with all numbers

· The print the numbers in reverse

· Print the array out us1ng ptr

· The count how many of each number there was.

· Print the count out as numbers

· Print the counts out a a bar graph

Ex 20 ****

21 ******

25 ****

· The graph must use a drawline method

· Extra credit if you can print out the numbers sorted ---

for example 20 20 20 20 21 21 21 21 21 25 25 25 25 26 28 30 30

2) Read the following paragraph:

How quickly can you find out what is so unusual about this paragraph? It looks so ordinary that you would think that nothing is wrong with it at all, and, in fact, nothing is. But it is unusual. Why? If you study it and think about it, you may find out, but I am not going to assist you in any way. You must do it without coaching. No doubt, if you work at it for long, it will dawn on you. Who knows? Go to work and try your skill. Par is about half an hour.

The write to count the number of times each letter appears in the paragraph.

By the way, can you answer the puzzle?

3)

a) Using drawline, print out the lower case o and m in the word “from” exactly like it is shown in the picture. Use the letter program given in class.

b) Make part a into a procedure and draw the letters starting at x = 2 and y = 7

c) Make the letters move across the screen like the class demo for m. Then backward and the up and down

Hint, use ecx and adding only

4) Create a method called multiply. Use it to multiply read in to integers and multiply them and the print out: 23*6 = 138

(assume the ints were 3 and