Nectar.
- NeBuild
- CoreUtils
- Git
- MinGW/Clang
- libDDK.dll
This first exercise will focus on implementing a simple DDK in C, which prints a simple 'Hello, World!' to NeKernel's console output.
#include <ddk/ddk.h>
DDK_EXTERN void simple_kputc(const char ch) {
char assembled[2] = {0};
assembled[0] = ch;
ke_call_dispatch("ke_put_string", 1, assembled, 1);
}
DDK_EXTERN void hello_ddk(void) {
const char* message = "Hello, World!\n";
const char* ptr = message;
while (*ptr != 0) {
simple_kputc(*ptr);
ptr++;
}
}
One shall use NeBuild to compile the DDK as follows:
nebuild hello_ddk_manifest.{json, toml}
Where the manifest files contains the needed metadata to build the DDK driver. Which links against libDDK.dll.