This chapter is rather a look into the not-so-distant past of the computing and a brief introduction into what we will be dealing with along the course of the book.
There is a widespread misbelief that one should, by all means, avoid using x86 Assembly language (we will further use the term “Assembly” for simplicity) as it is complicated, error-prone, high-level language compilers make better optimizations than one could make by hand and because programming in Assembly requires much more effort. While the accuracy of these statements is sometimes arguable and sometimes equals to 0, writing a book to merely refute them would be an inexcusable waste of time and effort, just like arguing whether chicken preceded the egg or vice versa. Instead, the intention behind this work is to show why it is essential to know what lies beneath all the technology, even in this era of virtually unlimited resources and a wide variety of software building instruments for every taste, and demonstrate how such knowledge can be applied to daily work.
Many books have been written on Assembly programming before. However, most of them successfully walk you through 16-bit DOS programming and stop somewhere at the beginning of the 32-bit world and only a few dare to touch the “long mode” (64-bit universe). Others teach you how to write programs for a specific platform (e.g., Windows, Linux). A variety of interesting and handy tutorials and informative articles may be found on the internet; however, such resources tend to focus on author’s field of interest at the moment of writing or target particular audiences. While all the sources above are extremely valuable, it is often too complicated to find needed information.
With this book, I would like to invite you to join me on a marvelous journey through the flowering tree of software development technology. Starting with the underlying infrastructure and processor internals, through different modes of processor operation and up to advanced programming techniques and approaches in software development on modern operating systems, while discovering some undocumented features thereof.
An attempt has been made not to target a specific audience with this book, but instead provide information and reference for anyone, starting with complete neophytes and up to experienced developers. Some programming experience or otherwise achieved understanding of specific basic terms (e.g., bit, byte, hexadecimal) is highly recommended.
What we would need, however, is a PC emulator of your choice. It may be Oracle VM VirtualBox (https://www.virtuabox.org) or VMware Workstation (http://www.vmware.com/products/workstation.html); more advanced readers may decide to use QEMU (http://wiki.qemu.org/Main_Page). My suggestion would be VirtualBox, not only because it is free and rather simple, but because we hardly need a bulldozer for playing in a sandbox.
Another product that we will need along our journey is an assembler (a program that translates Assembly code into machine code). You are free to choose any of the many available on the Internet. However, I would suggest Flat Assembler (https://flatassembler.net) as it is the one used for all the examples in this book, and it is free and very powerful. However, since the idea is not to teach the reader specific assembler syntax or features, but rather introduce the power of Assembly Language, the choice is free.