Learn ASM
Home Up Learn ASM PC Tools PC Docs

 

1. 'null' Program
2. Print 'Hello'
3. Using DEBUG
4. Using ML
5. COM?
6. The PSP
7. EXE?
8. Linking
9. Memory Use

My very first program, the very first one I had to write as an assignment in the only computer programming course I took in high school, was one to calculate the value of PI. This program was to be written for the CARDIAC computer, a cardboard computer developed by Bell Labs in 1969 for teaching about computers. In essence, the programming was in very low level machine code, except that a human (me) was required in order to run the program. I really enjoyed the effort in thinking through and testing my program and repairing "bugs" I then found.

You too can get started learning machine coding and assembly right away. It takes only 5 text lines or so to make a small assembly program. And even fewer, if you write your code directly into a debugger. Once you get over the small details needed to actually prepare a trivial program, you can then try your hand at writing useful ones. Who knows? You might enjoy it!

Getting Started

The very first thing you need to do is to make certain that you have the right programming tools at hand. You can either write your first program with a debugger or else with an assembler and linker.

One debugger tool is called DEBUG.EXE and it is from Microsoft. It is sometimes installed from the CD-ROM onto the hard disk when the operating system is first placed there. But not always. (It is on the CD-ROM, but not always copied to the hard disk.) Another possible debugger is a 16-bit capable debugger like GRDB from David Lindauer. While Microsoft traditionally includes DEBUG on most operating systems it makes, it isn't always installed. If you cannot find it on your machine, consider using GRDB from David's site (see my PC Tools web page, near the bottom of the page.)

For more general purpose assembly programming, you will need an assembler and linker. ML is an assembler from Microsoft and LINK is the linker, also from Microsoft. They are also pointed at by my PC Tools web page. I'd recommend getting all of these you can and installing them. That way you can try out various ways of writing your programs.

Be sure that you update your PATH variable so that these programs are accessible from the command line or else put them all into a common directory where you will be working and just create your programs there.

Examples

I'll work through specific examples, available from the links on the left.

 

Feel free to email me.

Last updated: Sunday, July 11, 2004 11:48