x86 Adventures

[Part 0x7] x86 Stringing

Welcome to the seventh chapter of x86 Assembly Adventures. Have you ever wondered how text is represented inside the computer? We have dealt with lots of numbers, but how can we write anything useful to the user? Maybe you have so much to say to the world through your programs, and numbers are just not enough. Don't worry, we are going to cover it here.

In this part we will learn how to represent text characters as numbers (ASCII code) and how to keep text in memory. (In the programming world, a sequence of text character is sometimes referred to as a string.)

Next, we will meet a few x86 instructions that were specially designed to deal with text strings. Those are stos, lods and movs. We also discover the rep prefix, and use it together with our newly learned instructions to copy strings, search characters and more.