Autumn 2022 | Exercises for introductory lowlevel programming course
Go to file
Oystein Kristoffer Tveit 7f07304ba5
Finished course
2022-12-19 18:06:38 +01:00
ex1 Finished course 2022-12-19 18:06:38 +01:00
ex2 Finished course 2022-12-19 18:06:38 +01:00
ex2_haskell Finished course 2022-12-19 18:06:38 +01:00
ex3 Finished course 2022-12-19 18:06:38 +01:00
.arm_cheat_sheet.png Finished course 2022-12-19 18:06:38 +01:00
.gitignore Finished course 2022-12-19 18:06:38 +01:00
LICENSE Finished course 2022-12-19 18:06:38 +01:00
README.md Finished course 2022-12-19 18:06:38 +01:00

README.md

TDT4258 - Lowlevel Programming

Course link

Exercise 1

For this exercise, we were tasked with writing a palindrome finder in assembly.

The code should be able to run on a DE1-SoC emulator, that can be found at CPUlator.

ARM Assembly Resources

ARM Assembly cheat sheet

Source: Azeria Labs

StackOverflow - What are assembler section directives used for?

Exercise 2 - Cache Simulator

In this exercise, we were tasked with writing a cache simulator.

This should run on almost any machine with a proper C compiler.

There is a Makefile and a python script included, which builds both release and debug versions of the program, and tests it with some hardcoded values.

Run the tests by executing:

user@<...>/ex2 $ make test

Haskell variant

I tried writing a haskell clone of this program just for fun, but I ended up never finishing it.

The code exists within a separate folder.

Exercise 3 - Tetris on Raspberry Pi

NOTE: You will need a Raspberry Pi with a sense hat to run this code.

For this exercise, we were tasked with making an existing tetris program run on a sense hat, by writing directly to a Linux framebuffer, and reading joystick input from the Linux input driver.

Move both the Makefile and the code over to the raspberry pi before running.