The Discipline of Working Directories

Programmers generally count from 0, and if we're counting steps in the assembly language development process, step 0 consists of setting up a system of directories on your Linux PC to manage the files you'll be creating and processing as you go.

There's a rule here that you need to understand and adopt right up front: Store only one project in a directory. That is, when you want to write a Linux program called TextCaser, create a directory called TextCaser, and keep nothing in that directory but files directly related to the TextCaser project. If you have another project in the works called TabExploder, give that project its own separate directory. This is good management practice, first of all, and it prevents your makefiles from getting confused. (More on this later when I take up make and makefiles.)

I recommend that you establish a directory scheme for your assembly development projects, and my experience suggests something like this: Create a directory under your Linux Home directory called ''asmwork'' (or make up some other suitably descriptive name) and create your individual project directories as subdirectories under that overall assembly language directory.

By the way, it's OK to make the name of a directory the same as the name of the main .ASM file for the project; that is, textcaser.asm is perfectly happy living in a directory called textcaser.

At this point, if you haven't already downloaded and unpacked the listings archive for this book, I suggest you do that—you're going to need one of the

Previously assembled modules

Previously assembled modules

No errors

Works perfectly!

Start Here

Debugger

You're done!

Figure 5-9: The assembly language development process

Start Here

Debugger

No errors

Works perfectly!

You're done!

Figure 5-9: The assembly language development process files in the archive for the demonstration in this section. The archive file is called asmsbs3e.zip, and it can be found at

www.copperwood.com/pub

or, alternatively, at

www.junkbox.com/pub

(I have these two domains on two different Internet hosting services so that at least one of them will always be up and available. The file is identical, whichever site you download it from.)

When unpacked, the listings archive will create individual project directories under whatever parent directory you choose. I recommend unpacking it under your asmwork directory, or whatever you end up naming it.

Was this article helpful?

0 0

Post a comment