44 lines
759 B
C
44 lines
759 B
C
/**
|
|
*
|
|
* naegling.c
|
|
*
|
|
* Naegling: a compiling Beowulf reimplementation.
|
|
*
|
|
* The memory management subsystem.
|
|
*
|
|
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
|
* Licensed under GPL version 2.0, or, at your option, any later version.
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
#include "memory.h"
|
|
#include "version.h"
|
|
|
|
__attribute__((__cdecl__))
|
|
extern int lisp_entry();
|
|
|
|
|
|
void showbits( unsigned int x )
|
|
{
|
|
int i=0;
|
|
for (i = (sizeof(int) * 8) - 1; i >= 0; i--)
|
|
{
|
|
putchar(x & (1u << i) ? '1' : '0');
|
|
}
|
|
printf("\n");
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
printf( "Naegling, a compiler for Beowulf: version %s\n", VERSION);
|
|
|
|
int val = lisp_entry();
|
|
printf("%d\n", val);
|
|
return 0;
|
|
}
|
|
|
|
return 0;
|
|
}
|