Irvine32 library function


Using the Irvine32 library functions

1. Get familiar the functions of Irvine32 library.

Note:

2. Please comment your code liberally

3. Please mark various questions in the code with a comment shown below and employ 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 expectantly answer the question. Do the following in your code.

a. Open files “InputFile.txt”, read contents.

Hint: if your file open handle doesn’t work, check that you have the InputFile.txt file in 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 file decoded string to the console window

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

e. Use the comment in your asm file to answer.

A note on the XOR operation

XOR operation is a Boolean operation just like OR, NOT, and so forth the truth table the XOR is 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 subsequent is an example of how you would use it and the result to anticipate:

     mov      al,02h        ;initialize a1 to 02 hex
     xor      al,0ffh        ;xor 02h and 0ffh

The outcome will be 0fdh in register al. You might use https://en.wikipedia.org/wiki/Exclusive_or for a comprehensive description.

2. Generate 32 random points which have (x, y) co-ordinates. The co-ordinates are constrained to be in the subsequent range:

(-15<= x <= 14) and (-15<=y <=14)

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

a. Plot the co-ordinate in the console screen with a different colour 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

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Irvine32 library function
Reference No:- TGS01618

Expected delivery within 24 Hours