Champ: Hello World, your first program, made on a real MSX1!

Gilbert Francois Duivesteijn

< Back to main page


The picture above shows the final result on a real MSX, loaded as binary from a cassette. Follow the steps below and you have it running yourself in minutes.

The tutorial is as close as possible equal to the version cross-platform developed on a PC or Mac, described in Hello World: compile, run and debug on openMSX, deploy on a real cartridge.


Step 1: Watch the tutorial from ChibiAkumas to know what the code is doing:

Lesson H3 - Hello World on the MSX by ChibiAkumas


Step 2: Follow the description below...

Type in the code. Note the small differences, compared to ROM version mentioned earlier. This binary will be loaded from tape. The ORG address is different and when the program finishes, we return to Basic, instead of calling the HALT instruction.Champ 01
Put in an empty cassette in the datarecorder. Go to <assemble> mode and press S followed by a 6 character long filename to store your source code to tape.Champ 02
To compile the program, press A,2. For other options, refer to Champ: First steps....Champ 02
To run the program, press ESC to enter the <debug> mode. Note that we used $C000 as our org address, that will be the starting point to call our program. Type in G $C000 to start and run the program.Champ 02
Voila! It works. Because we started the program with the command G, we are back in Champ development environment when the program finishes. So ending our code with with RET instead of HALT is important here ;)Champ 02
Finally, we want to save our binary to cassette, to be able to run it everywhere. To be able to do that, we need to find the end address of our binary. Goto <debug> mode and list the program with Q $C000.Champ 02
The format for saving a binary is: W saddr faddr filename. So in our case it will be W C000 C033 HELLOB, where hellob is a random chosen filename.Champ 02
Moment of truth. The source file and binary file have been saved to tape. Let's reset the computer, rewind the tape and run our fresh made program: bload"cas:",rChamp 02
Yay!Champ 02


If you're ready for using Champ in its full potential, check out Champ: Debug, set breakpoints, monitor registers, step though code.