Google Code Jam 2013: Round 1B Problam A

Armin is playing Osmos, a physics-based puzzle game developed by Hemisphere Games. In this game, he plays a “mote”, moving around and absorbing smaller motes. A “mote” in English is a small particle. In this game, it’s a thing that absorbs (or is absorbed by) other things! The game in this problem has a similar […]

Google Code Jam 2013 – Round 1A Problem B

You’ve got a very busy calendar today, full of important stuff to do. You worked hard to prepare and make sure all the activities don’t overlap. Now it’s morning, and you’re worried that despite all of your enthusiasm, you won’t have the energy to do all of this with full engagement. You will have to […]

Google Code Jam 2013 – Round 1A Problem A

Maria has been hired by the Ghastly Chemicals Junkies (GCJ) company to help them manufacture bullseyes. A bullseye consists of a number of concentric rings (rings that are centered at the same point), and it usually represents an archery target. GCJ is interested in manufacturing black-and-white bullseyes. Maria starts with t millilitres of black paint, […]

Printing in Binary Form – ARM Assembly

When programming in assembly there are many occasions where you need to examine the bits at a particular register or memory address. Printf doesn’t offer the option to print in binary form, so you need to create your own function if you want to do that. Here’s one that will do just that. It prints […]

Optimizing for Speed with ARM Assembly

You probably already heard that if you want to squeeze every last cycle of performance from your programs you need to be able to tweak them in assembly, right? Well, unless you know what you are doing jumping into assembly won’t help, and in some cases it might even hurt. As I started playing around […]

ProjectEuler.net Problem 4 – ARM Assembly

I am starting to play around with ARM Assembly, and to practice I decided to solve some problems on Project Euler with it. Below you’ll find problem 4 and its solution. Keep in mind that the code is not that efficient right now, as it’s taking about 2 minutes to run, but it does solve […]

IAS Assembler in C

A couple of posts ago I started talking about the IAS architecture, mentioning that given its simplicity you can program it directly in machine code. That being said, any program slightly more complex will be painful to write in machine code. For instance, image how boring it would be if you needed to declare an […]