Preface

Computers are useless. They can only give you answers. (Pablo Picasso)
 

 

You do not have to learn assembly language. Please be aware that it is generally considered to be hard and laborious experience with no immediately visible revenue. But if you started reading this book it is possible that you want to or need to know more about computer architecture, assambly programming, microprocessors and associated electronics. Engineering experience that comes with skills in these areas can hardly be overestimated. Deeper understanding of microprocessors and related electronics is invaluable to both hardware and software engineers. Furthermore, as microprocessors became ubiquitous, it is virtually impossible to avoid them in present-day and future electrical projects.

Cars and computers are often compared as both of these inventions were very disruptive and eventually affected lives of the global population. So, let us make here a similar attempt and compare both technologies from the human point of view. The first car that used microprocessor was Cadillac Seville from 1978. Contemporary cars might have more than 100 microprocessors on board. Drivers and passengers are oblivious to this fact because these embedded systems “just work” and stay invisible unless there is some failure. Vehicular electronics, that strongly relies on microprocessors nowadays, must be highly reliable because human lives are on the stake.

Many drivers can list advertised parameters of their cars such as engine horsepower or fuel efficiency. However, most of them are not skilled in mechanical engineering and need help from professionals in case of problems with vehicle. Similarly, many people know how “fast” their computer is in terms of CPU frequency clocking and how much “memory” (RAM) it has. But it does not make them computer engineers. Did you ever opened computer case and speculated how it works? Or even maybe, did you assemble your own PC computer from individual components? Did you ever wondered how the operating system interacts with the hardware? Maybe you tried to guess how user applications such as colorful computer games or scientific simulations make appearance on the screen? I must assume here that you have enough curiosity about the topic presented in this book.

I need to ask you to acknowledge that there is no guarantee that you will learn something from this book as from any particular book about programming. Effort to code or design computing systems is creative process and as such it is skill built mainly on practice. Reading any book will not replace practical efforts which have to be taken. However, you may need a guide if you are going on a tour in the brave new world of microprocessor engineering. Therefore I hope that this handbook will help you in the efforts you are going to make and support you in your training.

To sum up above paragraphs in brief I consider that we need:

  • awareness – perception of the microprocessors role and importance in the modern world,
  • curiosity – inquisitiveness is the best long-term support to tackle with steep learning curve,
  • commitment – personal obligation beats any amount of learning by heart.

Possibly you are aware of the fact that libraries are full of books about computers, programming and electronics. I can recommend Jeff Dunteman “Assembly Language Step-by-Step: Programming with Linux”  although it is for 32-bit architecture. Perhaps you prefer to browse on-line materials where even more information (but less structured) can be found.

If there are so many books and materials already then why should we have yet another volume on such topic? Exactly because there are so many available sources! For inexperienced person it is not that easy to decide to which extent specific book corresponds to a programming environment that is in use or how much it is related to specific processor architecture. This book was based on more than 10 year of academic experience in teaching Microprocessor Engineering and even more in programming with use of many different high and low-level languages including assemblers of MOS 6502, TMS320, Intel 8051, Intel x86, Intel x86_64 (AMD 64-bit extensions), and ARM Cortex family. It is oriented towards students at Faculty of Electrical Engineering at Warsaw University of Technology and courses that are held there but might be useful for any person interested in this topic.

The book is divided into several chapters. First is dedicated to basic mathematical background which is mainly on numeral systems and logic. Part two is a discussion on key components in modern computing machinery like processors and memory. Third chapter briefly analyzes wired transmission standards that are widely implemented in contemporary microcontrollers and used in electronic systems nowadays. Fourth chapter is introduction to programming environment in Linux operating system. Fifth chapter is core of the book as it contains discussion on practical aspects of programming in x86_64 architecture .

Why Linux-based approach? There are no restrictions often found in commercial or “academic” software where only “first dose” is free of charge and some day you or someone else will have to pay for it.

Linux is vital point in free and open source software ecosystem that grown up from GNU project and liberal licenses like GPL, BSD and MIT. You may run such software as you wish, for any purpose. You may study how such programs work, and change them so they do what you wish. It assumes that source code is always available. You may redistribute such software and share it with others. You may redistribute code modified with your changes so others can use them too .

I consider GNU/Linux as the best choice for systemic education at all levels, self-training purposes, scientific research, technical experimentation, reliable applications and software development. There are numerous tools for programming purposes available on Linux, it is easy to get them and they are free. Free as in “freedom” and also free as in “free beer” . Linux is an Unix-world offspring and “Unix was designed for software development from day one, and it shows” 1.

Disclaimer

It is hardly possible to write technical textbook without references to existing products. Author’s intention was to provide book with practical value hence many brands and companies are mentioned here. However, readers are asked to remember and understand that most products can be replaced with parts with similar functionality. Furthermore we endorse healthy competition in the industry which is not limited to major enterprises. There are many more companies on the market, which in spite of being smaller often specialize and provide products with notable features above the average. Good engineering practice is to analyze current market and seek for optimal solution.

All product names, trademarks and registered trademarks are property of their respective owners. All company, product and service names used in this book are for identification purposes only. Use of these names, trademarks and brands does not imply endorsement.

Licence

Microprocessor Engineering   Copyright © by Łukasz Makowski. All Rights Reserved.