Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 1.42 KB

README.md

File metadata and controls

27 lines (19 loc) · 1.42 KB

mlib

The goal of mlib is to create a clean and nice nonstandard C library for MikeOS that respects the cdecl calling convention. mlib is a C wrapper for all of the MikeOS APIs and it's completely written in assembly (nasm). Currently, the project has finally been finished but it's still maintained. This library should only be used with programs running on MikeOS 4.6.1 and up.

Building

Before you get started, you'll need to have NASM installed on your system. To build mlib, simply run the build script. If you're using Windows, run build-win.bat. If you're using Linux, run build-linux.sh. The output should be an object file, mlib.a, in the root directory of mlib. Use mlib.h in .\include and include mlib.a with your program when compiling. SmallerC is a great compiler for MikeOS.

Example

A small hello world program looks like this:

#include "mlib.h"

int main(int argc, char *argv[]) {
    print_string("Hello, world!\r\n");
    return 0;
}

Contributing

Any kind of contributing is greatly appreciated and submitting an issue or suggestion is also helpful! A list of contributers can be found here.

Licensing

This project is licensed under "Simplified BSD" and can be found in the LICENSE file.

Dependencies