assemblystatic-linkingobject-filesmmix

How to link multiple assembler files for MMIX


Assume, I wrote a small lib implementing something "fprint"-likely. The book that teaches me MMIX (Das MMIX-Buch, german) always copies the whole lib into the new program, but I dislike this approach. Is there any way to assemble the library into one object file, the main program into another and link these two together? How to do this?


Solution

  • Check the mmix repository www.mmix.cs.hm.edu there are two examples in the examples folder: Hello World GNU, descrobes step by step how to get and use the GNU Tools and compile and link hello.s (assembler) or hello.c linked with the C library and a second example, running MMIX on MMIX which links together the MMIX executable for MMIX from different c files, and linking together several assembler files and a C library to implement a fat32 file system for MMIX. Martin