Table of Contents

Corning Community College

CSCS2650 Computer Organization

PROJECT: C(onvert) To Assembly (CTA1)

OBJECTIVE

This week the effort will be towards completing the functional pong game in assembly.

EDIT

You will want to go here to edit and fill in the various sections of the document:

CTA1

Assembly

Storing Data Within the Stack:

With 16 Registers, and only 11 of which can be used for general purpose value storage, it's impossible to store every variable one might need within the Registers only. This can be mediated by using the Stack.

At the beginning of the main function, it's optimal to shove SP down the stack quite a ways, and store your variables within the stack between BP and SP. Use BP as a reference point to access each individual value on the stack.

Note: You'll only be able to access these variables within the main function. Once you enter a sub-function with a sub-stack, you can't use BP as a reference. Thus, when passing variables into functions as parameters, copy and push those variables to the stack first.

Integers and Floats

Upon coding using trigonometry with angle conversions between integers and floats, making use of the CIF (convert int to float) and CFI (convert float to int) instructions was key, along with using the appropriate arithmetic instructions depending on the type of the data contained within registers.

If Statements

If statements in assembly are fairly straightforward:

  1. Declare the If Start
  2. Declare the If End
  3. Use Comparison Operators as you would in C for the If condition
  4. Use a Jump Instruction to check the comparison that points towards the End.
 

SUBMISSION

To be successful in this project, the following criteria (or their equivalent) must be met:

Submit Tool Usage

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.

RUBRIC

I'll be evaluating the project based on the following criteria:

39:cta1:final tally of results (39/39)
*:cta1:functional and original assembly implementation [39/39]

Pertaining to the collaborative authoring of project documentation

Additionally