Step Into Labs

Step Into x64 Assembly · Module exam · Bits & Control Flow

Exam: The Bit Detective

A loop with division, a jump-free clamp and a hand-made leading-zero counter.

Part of Step Into x64 Assembly. The full module exam, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

Three small functions that real libraries contain, each written without the shortcuts. Euclid's algorithm finds the greatest common divisor with nothing but a loop and a remainder. A clamp keeps a value inside a range without a single jump. And a leading-zero counter does by hand what one modern instruction does, because that instruction is not allowed here.

In this module exam

Missions

  1. Three functions, no shortcuts