Table of Contents

programming from the ground up
Programming from the Ground Up
byJonathan Bartlett ISBN:0975283847
Bartlett Publishing 2004 (332 pages)

This text uses Linux assembly language to take you one step at a time how processors view memory, how the processor works, how programs interact with an OS, how computers represent data internally, and much more.

Table of Contents
Programming from the Ground Up
Chapter 1 - Introduction
Chapter 2 - Computer Architecture
Chapter 3 - Your First Programs
Chapter 4 - All About Functions
Chapter 5 - Dealing with Files
Chapter 6 - Reading and Writing Simple Records
Chapter 7 - Developing Robust Programs
Chapter 8 - Sharing Functions with Code Libraries
Chapter 9 - Intermediate Memory Topics
Chapter 10 - Counting like a Computer
Chapter 11 - High-Level Languages
Chapter 12 - Optimization
Chapter 13 - Moving on From Here
Appendix A - GUI Programming
Appendix B - Common x86 Instructions
Appendix C - Important System Calls
Appendix D - Table of ASCII Codes
Appendix E - C Idioms in Assembly Language
Appendix F - Using the GDB Debugger
Appendix G - Document History
Appendix H - GNU Free Documentation License
Appendix I - Personal Dedication
List of Figures
List of Tables
List of Examples
List of Sidebars

The difference between mediocre and star programmers is that star programmers understand assembly language, whether or not they use it on a daily basis. Programming from the Ground Up gives programmers the edge they need to be successful.

Assembly language is the language of the computer itself. To be a programmer without ever learning assembly language is like being a professional race car driver without understanding how your carburetor works. To be a truly successful programmer, you have to understand exactly what the computer sees when it is running a program. Nothing short of learning assembly language will do that for you. Assembly language is often seen as a black art among today's programmers - with those knowing this art being more productive, more knowledgeable, and better paid, even if they primarily work in other languages.

Programming from the Ground Up uses Linux assembly language to take you a step at a time through these concepts:

  • How the processor views memory
  • How the processor operates
  • How programs interact with the operating system
  • How computers represent data internally
  • How to do low-level and high-level optimization

Programming from the Ground Up

Jonathan Bartlett

Edited by Dominick Bruno, Jr.

Copyright 2004 by Jonathan Bartlett

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in Appendix H. In addition, you are granted full rights to use the code examples for any purpose without even having to credit the authors.

To receive a copy of this book in electronic form, please visit the website This site contains the instructions for downloading a transparent copy of this book as defined by the GNU Free Documentation License.

All trademarks are property of their respective owners.

ISBN 0-9752838-4-7

Published by Bartlett Publishing in Broken Arrow, Oklahom

Library of Congress Control Number: 2004091465

Bartlett Publishing Cataloging-in-Publication Data

Bartlett, Jonathan, 1977-
          Programming from the ground up / Jonathan Bartlett ; edited by Dominick
            p.     cm.
         Includes index.

ISBN 0-9752838-4-7

1. Linux. 2. Operating systems (Computers) 3. Computer programming. I. Bruno, Dominick. II. Title.

QA76.76.O63 2004

005.268—dc22 2004091465

This book can be purchased at

This book is not a reference book, it is an introductory book. It is therefore not suitable by itself to learn how to professionally program in x86 assembly language, as some details have been left out to make the learning process smoother. The point of the book is to help the student understand how assembly language and computer programming works, not to be a reference to the subject. Reference information about a particular processor can be obtained by contacting the company which makes it.