HAM Documentation

Home · Downloads · Your Account · Submit News

Documentation Homepage HAMLib reference Back to HAM Homepage |

## Compiling your first Program

Starting up the compiler shell
  When you completed installing HAM, locate the installation directory in your explorer, and you will find a file in there called startham.bat. Double click it and you should see something like this:

    ----------------------------------------
    o  Welcome to HAM v2 with HAMlib!      o
    o          by tubooboo@ngine.de        o
    o                                      o
    o Adding HAM directories to path       o
    o                        ...done.      o
    o Setting HAMDIR to C:\gbadev\ham      o
    o                        ...done.      o
    o ---- IMPORTANT ----                  o
    o If you are unsure what to do now,    o
    o please consult the README.txt that   o
    o came with your HAM release, or even  o
    o better, read the HAM website.        o
    o Also, if you get stuck, use the      o
    o message board, or subscribe to the   o
    o HAM mailing list                     o
    o                                      o
    o More information is on:              o
    o     http://www.ngine.de              o
    ----------------------------------------

After this, a command prompt will appear. Now let us go to a piece of sourcecode, in this case, the Sprite example, type the following commands:

    cd samples
    cd obj
    make vba

... and, as you can see you are all set :-) . You should see the sourcecode in this directory getting compiled, linked, and started in the included GBA emulator.

Next steps
  Basically, any HAM sample can be compiled using the make command. If you want to send the compiled binary to your MBV2-equipped GBA, just append "mbv2" instead of "vba". If you just want to compile, just type make without appending anything. For a list of common make comands, see Standard Makefile Targets .

Documentation Homepage | HAMLib reference | Back to HAM Homepage
documentation created with Doxygen