Lesson 22 Notes



Lesson Outline


Mixing C and assembly

Our compiler follows a certain convention while calling an assembly function from C that involves passing parameters.

Register Input Arguments and Return Values

Lab 4

The basic idea of this lab is using C to call your assembly drawBox subroutine. This lab should be fun! Feel free to see what sorts of crazy ideas you can implement in your games.


Writing Clean Code

Meaningful Names

Bad Code


Let's fix my code!


Revision Control

The Shell

"A shell is software that provided an interface for users of an operating system to access the services of a kernel." - Wikipedia

Basically, a shell gives you direct access to your computer.

To use git, we'll be using a shell - Git Bash. Bash is an acronym for Bourne Again Shell - it is probably the most common shell in existence.

Here are some common shell commands that will prove useful:

[Demo these commands, get them to open shell and practice them]

If you want to learn more, a tutorial is available on the datasheets page.

Common Git Commands


Github is the most popular open source code repository site in the world. It's a web-based hosting service for projects that use Git. It is required for this class.

A sampling of real-world projects hosted there:

Github is a great place to get access to the source code for some of the world's most popular open source projects. It's a great way to keep track of programmers whose work you're interested in. It's also a great way to get involved in the coding community, maybe work on an open source project or release some code of your own.