MMIX Stopwatch Example |
||
Content
|
This WIN32 example demonstrates a simple embedded system: a stop watch.
Besides a MMIX CPU, it features a small ROM containing the software, a millisecond timer, a sevensegment display, and three buttons for START, STOP, and RESET. The configuration is described in the file default.vmb.
It illustrated interrupt handling with MMIX in a very simple setting. Since the whole program runs in negative addresses, there is no switching between user mode and operating system mode. Further, there is no need for forced TRAPs, since there is no user program anyway.
RunningTo run the example, you need the configuration file default.vmb and the ROM image bios.img as well as the usual vmb software package from the VMB Homepage (minimum software requirement: button, sevensegment, timer, rom, mother and mmixcpu). To start the Stopwatch, just double click on the default.vmb File and then click the power button on the motherboard.Pressing the green START button starts the stopwatch and pressing the red STOP button stops it. The display can be reset to zero by pressing the black RESET button. Building the SoftwareTo build the software you will nedd the mmix assembler and a converter from object files to ROM images.From the bios.mms source file, the bios.mmo object file is created using the mmix assembler like this: mmixal bios.mms
The ROM Image File bios.img is then created from the object file
bios.mmo using
mmoimg with the command
Modifying the SoftwareTo modify the software, edit the source file bios.mms and repeat the build process.To undestand the source code better, some remarks may be helpful.
|
Please help to keep this site up to date! If you want to point out important material or projects that are not listed here, if you find errors or want to suggest improvements, please send email to