Lab10 - drawing a box on the screen PDF

Title Lab10 - drawing a box on the screen
Author joshua tan
Course Computer Systems
Institution Swinburne University of Technology
Pages 2
File Size 145.3 KB
File Type PDF
Total Downloads 65
Total Views 137

Summary

drawing a box on the screen ...


Description

Identify the parameters required when calling drawPixel, and identify what happens to them in the drawPixel function. Parameter: x, y, color In the drawpixel file, value of color, x and y were calculated and stored into the registers. Code snippet below shows the calculation of the x value.

Now identify the code which controls the calling of drawPixel, particularly the counter incrementing code and the test to see the loop should continue. What is this code doing? With bl drawpixel, the drawpixel function then is called into the compiler and run the code. The value for the x will be assign to register 1 and the y value will be in r2. Whereas the color were fist initialize into r6 and then it will be move to r3 in the drawPixel function.

Box drawing code Below are the code snippet for drawing the box onto the screen....


Similar Free PDFs