****************************************************************** ***************** Assignment #5 for CS341 ********************* ***** Due Wednesday 11/14/01 ***** ****************************************************************** Part 1. Take the circle() code given to you in "circle.s" and draw 5 concentric circles (any position, any reasonable size). Complete the design with a cross through the middle. Once the design is finished, use GX blit to copy it to another place on the screen, but invert the whole thing (you will have to use the GX_XOR drawing function to get things inverted). Part 2. Adapt the circle() code so that it invokes a new trap (trap #7) for the line draws. This should replace drawing the lines by writing to the GX device directly. For example, the code for drawing a diagonal line across the screen would be converted as follows: mov 0, %r8 mov 0, %r8 st %r8, [%r1 + GX_LINE_X1] mov 0, %r9 st %r8, [%r1 + GX_LINE_Y1] ===> mov 511, %r10 mov 511, %r8 mov %r10, %r11 st %r8, [%r1 + GX_LINE_X2] ta 7 st %r8, [%r1 + GX_LINE_Y2] mov GX_LINE, %r8 st %r8, [%r1 + GX_CMD] The supervisor code containing trap #7 will be provided - you simply have to assemble, link, load, and run it instead of the default supervisor code. All these steps will be shown in lab. Of course, use your program in Part 1 to test it. The purpose of doing GX operations in traps will become apparent during the last programming assignment. ----------------------------------------------------------------------------- Turn-in two files: (1) your main program to draw the archery circles, etc. (2) a modified "circle.s" file that does the lines via the trap method