Time to try it out

Below I have included two sample programs. After them you should start with the win95asm tutorial (It begins with the Window01.htm) tutorial and then proceeds onwards. In the source code of this program I've included many comments to explain the code and discuss how it works. I've also included the actual executable file that is created so you can see what the program does if you're having problems with your compiler. Again, contact me if this is the case and maybe I could help you out.

Sample 1
This is the program I walked you through on the last tutorial. Read the comments, they explain a lot.
Sample 2
Here I've added to the above program it's own cursor, and capture mouse button events. It also shows you who to change the title of the window, how to paint on the window, and how to beep!


Compiling struggles? Can't get started?

If you're getting desperate, follow these instructions (this was one of my biggest problems):

  1. Get TASM 5.0, trust me it's the best one. Borland rules!
  2. Download and installMicroasm now (it's about a quarter meg). Make sure it's installed on the same drive as TASM if you have multiple hard drives.
  3. Make sure TASM is installed in its own directory on the drive (not in a subdirectory). In the TASM directory there should be folders called include, lib, bin, and some others but those three are crucial. Now create a folder called Projects in that location. This is where you'll be saving all your current work.
  4. Now create a batch file with the following commands in it:
    echo off
    tasm32 /ml /i\tasm50\include \tasm50\Projects\%1.asm
    IF ERRORLEVEL 1 GOTO EXIT
    tlink32 /Tpe /aa /c /x \tasm50\projects\%1.obj,,,\tasm50\lib\import32.lib 
    IF ERRORLEVEL 1 GOTO EXIT
    echo We are go for launch, compilation was a success!
    :EXIT
    
    Replace tasm50 with the name of the folder of your version of TASM. Now save this file as a batch file (call it compile.bat or something) in the bin directory.
  5. Now in Microasm, go to Program Options in the Options menu. Click the button next to Command and find the above batch file. Double click it. Now clear the text field next to Arguments if it isn't already. Then click the button next to Arguments and choose File name.
That's it! Now all you have to do is press F7 to compile your code anytime you want. And this ain't no Java, compiling is instant (obviously! There's hardly any interpreting to do!). You have to remember to always save it in the Projects directory we've created before you compile. There is a check box in the Editor Options that let's you automatically save your file everytime you compile. So once you save it once, you can change it all you want, and compile it all you want. Oh, one more thing, you have to save it with the extension .asm. If you want another extension just change the %1.asm to %1.yourext and make sure you always use the same extension. So in short, save it in projects, give it the .asm extension, then press F7 and you're done. Find the program and run it now!
 
Now I recommend downloading the win95asm tutorial since they pick up nicely where I left off and even retrace some details I left out . . .

Home - Next

1