More About Jumps Than You Wanted to Know

https://news.ycombinator.com/rss Hits: 2
Summary

Let's Learn x86-64 Assembly! Part 4 - More About Jumps Than You Wanted To Know published on Jul 20 2025 This post is a part of a series on x86-64 assembly programming. Check out parts 0, 1, 2 and 3! . The header image shows the #2 most-liked piece of internet communication ever made by the author, which humorously demonstrates the importance of this post's subject matter. It's wild to think that I started this series almost five years ago. Back then, the intention was to share my notes from revitalizing my own knowledge of x86 assembly programming, and provide a starting point for anyone who'd like to explore that topic further: an intro to the environment, tools, and a brief overview of a subset of the x86-64 ISA. The latter was supposed to include a chapter on conditional instructions and controlling program flow, but I never got around to it, until now! As it often happens with these things, I found that simple, naturally arising questions demanded rather in-depth answers, which I would prefer to not skip. As a result, this post touches on quite a bit more interesting stuff than just the topic of program flow. This will also be the final post in the series. It has certainly been fun going back to revisit these topics and improving my own understanding of them, but I have other things I want to write about. Introduction If you've been following this tutorial, you might have noticed that we haven't really addressed how to skip executing certain instructions based on some condition, or how to repeat the execution of some instructions as long as some condition holds true. In other words, we haven't really talked about branches (ifs) and loops. And if you have programmed in any language at all, you know those are important. In fact, if the title image of this post is to be believed, those are all that there is to programming! Assembly doesn't have branches or for loops in the same form as most high-level programming languages do. Instead, it provides basic building bl...

First seen: 2025-10-16 01:45

Last seen: 2025-10-16 02:45