ALWAYS end in newlines. Also, added vm.c/.h skeletons.

This commit is contained in:
kvothe. 2020-08-29 21:17:28 -04:00
parent 3874f745a2
commit 8f68462d36
6 changed files with 25 additions and 4 deletions

View File

@ -1,8 +1,10 @@
#include <u.h> #include <u.h>
#include <libc.h> #include <libc.h>
#include "memlist.h" #include "memlist.h"
#include "vm.h"
void main(void) void
main(void)
{ {
/* setup */ /* setup */
allocmemblock(); allocmemblock();
@ -11,6 +13,8 @@ void main(void)
print("loading mem list:\n"); print("loading mem list:\n");
loadmemlist("assets/MEMLIST.BIN"); loadmemlist("assets/MEMLIST.BIN");
initvm();
/* run */ /* run */
print("\nrunning!\n\n"); print("\nrunning!\n\n");
@ -20,4 +24,4 @@ void main(void)
printmemptrs(); printmemptrs();
exits(nil); exits(nil);
} }

View File

@ -2,4 +2,4 @@
#define GRAPHICS_H #define GRAPHICS_H
void initGraphics(Point *pBallPos); void initGraphics(Point *pBallPos);
void render(void); void render(void);
#endif /* GRAPHICS_H */ #endif /* GRAPHICS_H */

View File

@ -39,4 +39,4 @@ void allocmemblock(void);
void freememblock(void); void freememblock(void);
void printmemptrs(void); void printmemptrs(void);
#endif /* MEMLIST_H */ #endif /* MEMLIST_H */

2
mkfile
View File

@ -3,10 +3,12 @@ TARG=anotherplan anotherplan_tests
OFILES=\ OFILES=\
graphics.$O\ graphics.$O\
memlist.$O\ memlist.$O\
vm.$O\
HFILES=\ HFILES=\
graphics.h\ graphics.h\
memlist.h\ memlist.h\
vm.h\
BIN=/$objtype/bin/games BIN=/$objtype/bin/games
</sys/src/cmd/mkmany </sys/src/cmd/mkmany

9
vm.c Normal file
View File

@ -0,0 +1,9 @@
#include <u.h>
#include <libc.h>
#include "vm.h"
void
initvm(void)
{
print("vm initialized!\n");
}

6
vm.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef VM_H
#define VM_H
void initvm(void);
#endif /* VM_H */