Translate your c program transposec from assignment 1 part


Translate your C program transpose.c from Assignment 1, Part 1 (as specified in there) into an equivalent rPeANUt assembly program transpose.s. You may alternately use the sample solution instead.

For full marks, your program should contain a function to print the matrix (any local variables should also be implemented n the stack). Your program must include the given simpleIO.s library and use the writeInt() function to print numbers, and writeStr() to print strings. It must also use the function readUInt() to read n. Givenchar *s; int x; unsigned int n; these have the following usage: In the program transBuf.s, write an rPeANUt program to write a pattern into the frame buffer, and then transpose the square part of it (160 by 160 portion of it). Note that it must perform an actual transposition of a 160 by 160 bit array. The pattern should set every word this square part to a value that is neither 0 or -1, and it should not be symmetric (so that it is obvious that the transposed image is different from the original).
Up to 2 bonus marks may be awarded if the pattern is considered particularly `interesting'.
Coding Style and Marking: as for Part 1. It should be possible to document (almost) all of your code with valid C code, and this will be expected.

Hints: You can view the square part of the frame buffer as a 160 by 5 word integer array, where element (i,j) is at offset i*6+j. I suggest that you partition the frame buffer into columns of 32 words; each such chunk may now be transposed into another chunk (or into itself, if it corresponds to the diagonal of the 160 by 160 bit array). It will probably be necessary to have a temporary array of 32 words to form the transpose of a chunk; you may find it useful have a function which can do this. I recommend that you actually write and debug your algorithm in C (transBuf.c) first, beginning from a modified version of transpose2.c. It does the bitwise transpose of a 160 by 5 integer array into itself. Of course you will not be able to use the frame buffer and to `see' the result you will have to resort to using -p x.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Translate your c program transposec from assignment 1 part
Reference No:- TGS01244072

Expected delivery within 24 Hours