Monthly Archives: July 2013

GDB Basic Commands

If you never use GDB (The GNU Project Debugger), well, you should! It’s easy to underestimate its usefulness when debugging programs. Below you’ll find some very basic commands that will get you started: First of all you need to compile/assemble your program with the -g flag, which will include in the executable the necessary code […]

A Simple Multi-Tasking Operating System in ARM Assembly

This project was done for the ‘Computer Organization and Assembly Language’ class, with Prof. Borin from Unicamp. Below you’ll find the code that runs a very simple operating system in ARM Assembly. On system start the OS will configure some pieces of hardware (e.g., GPT, UART and TZIC) and it will setup the environment (supervisor […]

Solution to Problem 24 on Project Euler

The problem: — A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are: 012 021 102 120 201 […]