Chapter 2: Coding Standards

Overview

I am not going to bore you to death with coding standards, as there are a multitude of books on the subject already and that is mostly not what this book is about. To become a better programmer, however, you should adopt and rigidly follow a set of coding standards.

I just said I was not going to bore you with coding standards, as this book is about assembly language programming, and this chapter is titled "Coding Standards"? What does one have to do with the other? One actually supports the other. You should have a proper development environment before attempting to write any assembly code in an attempt to make that development project better. If you have read this chapter in my vector book, you can skip to the next chapter, but I would recommend reading it anyway as a refresher. It also contains a bit more information than what was in the vector book.

The source code for this book use terms such as const and assert, as well as naming conventions, which should be a standard that you adopt for your own style of programming, if you have not already. The following coding methods cost very little, only a little extra time to drop them into your code, but they will save you time in the long run, especially when dealing with general-purpose or SIMD assembly code. You can think of them as a couple extra tools for your software development toolbox. They primarily entail the use of const and assert as well as memory alignment. It should be noted that due to page count limitations, they are mostly only used in the first few functions in print and then infrequently. This is not an indicator that they are not needed, only that I did not want the pages in the book to appear to be too verbose in printed computer code. You will find that those equivalent functions will be fully loaded with the use of const and the appropriate assertions.

Workbench Files: \Bench\ x86 \chap02\ project \ platfor m

                         project

platform    

Ram Test

\ ramtest \

\vc6

ram

\ram\

\vc.net



32.64-Bit 80X86 Assembly Language Architecture
32/64-Bit 80x86 Assembly Language Architecture
ISBN: 1598220020
EAN: 2147483647
Year: 2003
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net