Project #80060 - week 4 assignment

Using the Irvine32 library functions

The goals for this week’s assignment are the following:

1.      Get familiar the functions of the Irvine32 library that is part of this week’s reading.

Note:

2.      Please comment your code generously

3.      Please mark the various questions in the code with a comment shown below and use the waitMsg function between each question. Example is shown below:

.code
;Question 1

Enter the code for problem 1 here…
….

Call WaitMsg                                    ;this will allow one to observe the output
;Question 2

Enter the code for problem 2 here…
…..

Call WaitMsg                                     ;this will allow one to observe the output
(and so on)

Problems:

1.      The file myInputFile.txt is an encrypted file. Your assignment is to decrypt this file and hopefully answer the question for bonus points. Do the following in your code.

a.      Open the file “InputFile.txt”, read the contents.
Hint: if your file open handle does not work, check that you have the InputFile.txt file in the project directory and not the debug directory.

b.      XOR each byte of the file with 0ffh. (Please refer to the note on XOR operation below)

c.      Print the contents of the file decoded string to the console window

d.      Print the output to a file “OutputFile.txt”

e.      Use a comment in your asm file to answer the bonus question.

A note on the XOR operation

XOR operation is a Boolean operation just like OR, NOT, AND etc… The truth table the XOR is the following, where Input A and Input B are binary values.

 Input A Input B Result 0 0 0 0 1 1 1 0 1 1 1 0

The following is an example of how you would use it and the result to expect:
mov      al,02h          ;initialize a1 to 02 hex
xor      al,0ffh         ;xor 02h and 0ffh
The result will be 0fdh in register al. You can read more about this function on pg. 637 in your text book or you may use http://en.wikipedia.org/wiki/Exclusive_or for a comprehensive explanation.

2.      Create 32 random points which have (x, y) co-ordinates. The co-ordinates are constrained to be in the following range:
(-15<= x <= 14) and (-15<=y <=14)

(Hint – generate a random # between 0 and 29 then subtract 15 from this).

a.      Plot the co-ordinate in the console screen with a different color if it lies in the following quadrants:
Quadrant 1 points gets a yellow *
Quadrant 2 points gets a cyan *
Quadrant 3 points gets a red *
Quadrant 4 points gets a green *

b.      Draw the x and y axis too

All project files should be zipped and submitted.

 Subject Computer Due By (Pacific Time) 08/30/2015 11:00 am
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews
sharadgreen

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy