2020-08-20 03:52:10 +00:00
|
|
|
#include <u.h>
|
|
|
|
#include <libc.h>
|
2020-08-22 03:53:35 +00:00
|
|
|
#include "memlist.h"
|
2020-08-30 01:17:28 +00:00
|
|
|
#include "vm.h"
|
2020-08-20 03:52:10 +00:00
|
|
|
|
2020-08-30 01:17:28 +00:00
|
|
|
void
|
|
|
|
main(void)
|
2020-08-20 03:52:10 +00:00
|
|
|
{
|
2020-08-29 15:57:06 +00:00
|
|
|
/* setup */
|
|
|
|
allocmemblock();
|
|
|
|
print("alloc'd mem buffer:\n");
|
|
|
|
printmemptrs();
|
|
|
|
print("loading mem list:\n");
|
2020-08-22 03:53:35 +00:00
|
|
|
loadmemlist("assets/MEMLIST.BIN");
|
2020-08-29 15:57:06 +00:00
|
|
|
|
2020-08-30 01:17:28 +00:00
|
|
|
initvm();
|
|
|
|
|
2020-08-29 15:57:06 +00:00
|
|
|
/* run */
|
|
|
|
print("\nrunning!\n\n");
|
|
|
|
|
|
|
|
/* teardown */
|
|
|
|
freememblock();
|
|
|
|
print("freed mem buffer:\n");
|
|
|
|
printmemptrs();
|
|
|
|
|
2020-08-20 03:52:10 +00:00
|
|
|
exits(nil);
|
2020-08-30 01:17:28 +00:00
|
|
|
}
|