User Tools

Site Tools


notes:comporg:spring2024:projects:cta0

This is an old revision of the document!


CTA0

To update your vircon DevTools to v24.2.4, go to this link

https://github.com/vircon32/ComputerSoftware/releases/tag/devtools-v24.2.4

Then, depending on the system you use for class, follow the appropriate steps on the github page to install. There is even a section labeled “How to Install.

The examples we went over in class can be found in the public class directory under “examples”:

cd /var/public/spring2024/comporg/examples

the most recent example is 06_hello_memory

Assembly

Random Spawn

To have your snake food spawn randomly, we will use the built-in random function that is offered by Vircon32. In C, it is extremely simple to implement. You would simply do the following:

#include "misc.h"
 
// Seeding srand
srand(get_time());
 
// Getting random X and Y cords for apple
int xApple = rand() % (screen_width);
int yApple = rand() % (screen_height);

Text Area

Data

Registers

Instructions

notes/comporg/spring2024/projects/cta0.1708962768.txt.gz · Last modified: 2024/02/26 15:52 by wgates1