Skip to main content

Posts

Showing posts from November, 2026

NASM: Fizz, Buzz and the art of jumping around

Introduction  Welcome back, my fellow nerds. It's been a while. Almost two years, actually, but who's counting? (Me. I am. It's embarrassing.)  If you recall, in the last post, A Stack to rule them all , we learned what functions and procedures are, how to pass parameters through the stack and why the stack moves in steps of 4 or 8 bytes. We also built an itoa function that I promised to explain in detail "in a later post". Well, this is the later post. Surprise.  But explaining a function on its own is a bit boring, so I'm going to sneak it inside something more fun. Have you ever heard of FizzBuzz? It's a tiny program that interviewers love to throw at people to see if they can actually code. The rules are simple. Count from 1 to 100, but if the number is a multiple of 3 print Fizz , if it's a multiple of 5 print Buzz , and if it's a multiple of both print FizzBuzz . In Python it takes about four lines. In Assembly it takes a bit mor...