PC Assembly Programming
AOL Assembly Lesson 1

As we discussed on AOL, the first program will simply print out the famous "Hello, World." message. This code will generate a DOS .COM file and will not use either QBASIC or QB 4.5.

This program can be downloaded directly as project 1's source or you can just look at it directly as pretty project 1. Most assembly program source code files should use the file extension of .ASM and include files are often named with the extension .INC (obvious) or .MAC (for macros.)

Assuming you've read my page on getting and setting up the needed PC assembly tools, use the following command to assemble and link this file:

   ML /Sa /Fl PROJCT01.ASM

(That's "FL", except that the "L" is lower case!) That command invokes Microsoft's ML.EXE assembler. The assembler will read the source code and assemble it into an .OBJ file, where the assembled object code goes: this object code isn't ready to run. But it will then run the first LINK.EXE program it finds to link the object code into a .COM program, which is ready. If you picked up the proper LINK.EXE from Microsoft, as I suggested in my page on getting these tools, you should be just fine.

There should be no error messages. Once done, you will have PROJCT01.OBJ, PROJCT01.COM, and PROJCT01.LST in the directory, too. That's because we added the /Fl command option, which forces the assembler to produce a nice listing for us. The /Sa option just forces the listing to be very complete, putting in everything the assembler can: (sometimes the assembler will hide things if it doesn't think you care about them.)

Well, that's it, so try it out and see what happens.

Quick Links:
 
 
 
    Creation Date:  Mon 29-Mar-1999 15:19:18
    Last Modified:  Sun 09-Apr-2000 21:04:00
    Copyright (C) 1999, 2000 Jonathan Dale Kirwan