This tutorial we'll look at coding an assembly version of what's possibly the most famous algorithm in the world, the Euclidean Algorithm. This algorithm finds the greatest common divisor between two integer parameters. We'll use it convert an improper fraction to a proper one. We'll port pseudo code from Wikipedia to assembly. In this step-by-step manner we can see how normal programming constructions are translated to assembly code. Most notably how to code a "while" loop, but also how to deal with a division. It's important to structure the assembly version around having EAX and EDX free to use in this division as they are both implied registers to the idiv instruction. code pour embarquer la vidéo : >>> http://www.youtube.com/embed/SMhlxSaiFqA <<< |