33 lines
617 B
C
33 lines
617 B
C
#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <sys/mman.h>
|
|
#include <time.h>
|
|
|
|
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);
|
|
|
|
char* address = (char*)malloc(1);
|
|
printf("address: %p\n", address);
|
|
printf("memory at address: %c\n", *address);
|
|
*address = 'e';
|
|
printf("memory at address: %c\n", *address);
|
|
|
|
free(address);
|
|
}
|