Corning Community College
CSCS2650 Computer Organization
More time to complete BIA.
You will want to go here to edit and fill in the various sections of the document:
In Breakout coded in C, we used an array of brick structs to keep track of all the bricks on the field. When porting over to assembly, the approach needs to be changed due to a multitude of factors.
Arrays don't formally exist in assembly. Since in array is simply an unchanging space of sequential memory, the stack must include the data for all the bricks in order. For breakout, each brick has five properties:
Accessing an individual array element uses an ID value to get that position's specific data. In Assembly, we use a register to hold the memory address of a given element's first property. Here's an example in practice:
The first Brick's X Position is in BP-24
(The 24th element in the Stack). We copy this memory address and store it within a general register (preferably a later one so its not likely to get overwritten):
mov R0, BP isub R0, 24 mov R10, R0
Within our for-loop we use to access all the bricks sequentially, we reference individual elements through R10. (i.e. [R10-3]
is the current Brick's color value.)
When moving from one brick to the next, we directly adjust the memory address stored in R10. It's simple in practice:
isub R10, 5
This reference point moves from the current Brick's X Position, to the next Brick's X Position. This way, our relative point R10 doesn't change when inside any brick. This allows for loops to work with arrays.
To be successful in this project, the following criteria (or their equivalent) must be met:
Let's say you have completed work on the project, and are ready to submit, you would do the following:
lab46:~/src/SEMESTER/DESIG/PROJECT$ submit DESIG PROJECT file1 file2 file3 ... fileN
You should get some sort of confirmation indicating successful submission if all went according to plan. If not, check for typos and or locational mismatches.
I'll be evaluating the project based on the following criteria:
65:bia1:final tally of results (65/65) *:bia1:functional and original assembly implementation [65/65]