|
|||
ASSEMBLY PROGRAMMING AND OS DESIGN
<HOME> |
CH2. Intro to Assembly
Assembly language is the lowest level language available to programmers. It allows us to look at machine language in a meaningful manner and design code that talks directly to the hardware and does not rely on any other code being in place. Because of this capability, assembly is the fastest language in terms of execution speed and is perfect for the design of an operating system (OS). Moreover, assembly does not allow you the convenience of relying on prepackaged code. In assembly, either you understand the task, or your code just doesn't work. By the time you have finished this book, writing an OS in a higher level language will not only be painfully easy,
but will also seem painfully limiting. Before we can begin discussing the ins and outs of the OS we are about to write, we must first have a basic understanding of the language we are going to write it in. At this point, you must exhibit some patience. Even the simplest program that produces the well known "Hello World!!" on the screen requires knowledge of a wide range of subjects to understand. This first chapter will seem like a fire hose of information and you may need to read through it several times. To help you out, I have saturated the chapter with example code that I encourage you to type in and run. This will not only get you familiar with NASM, but will also get you used to typing and seeing the basic commands that you will use millions of times before this book is done. Assembly language is composed of small instructions that are only capable of working with very basic data types. I am assuming no previous knowledge of programming, so I am going to start from the very very beginning of introducing the world of the microprocessor. For the first part of this text, we will only focus on 16 bit, or word sized registers. We will get into 32 bit code after we have written our first OS. |
| www.cynergysoft.com |
Email any questions to the author, Nathan Daniels. |
Copyright © 2001 |