#include #include #include #include #include #include #include #include void bye() { printf("byeee!\n"); } int main() { atexit(bye); printf("Welcome to %s!\n", "Luna"); time_t now = time(NULL); printf("Realtime clock: %ld s\n", now); for (int i = 0; i < atoi("8"); i++) { console_write(".", 1); } console_write("\n", 1); long rc = syscall(SYS_allocate_memory, 4096, PROT_READ | PROT_WRITE); if (rc < 0) { printf("allocate_memory: %s\n", strerror(-rc)); return 1; } char* address = (char*)rc; printf("address: %p\n", address); printf("memory at address: %c\n", *address); *address = 'e'; printf("memory at address: %c\n", *address); syscall(SYS_deallocate_memory, address); }