1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
12 #include "sjme/boot.h"
14 #include "sjme/nvmFunc.h"
15 #include "sjme/payload.h"
18 int main(int argc
, char** argv
)
20 sjme_nvm_bootConfig bootConfig
;
21 sjme_nvm_state
* state
;
24 /* Setup boot configuration. */
25 memset(&bootConfig
, 0, sizeof(bootConfig
));
26 bootConfig
.payload
= &sjme_static_payload_data
;
28 /* Boot the virtual machine. */
30 if (!sjme_nvm_boot(NULL
, &bootConfig
, &state
, argc
, argv
))
33 /* Constantly ticks the virtual machine until it stops. */
34 while (sjme_nvm_tick(state
, -1))
37 /* Cleanup the virtual machine. */
38 exitCode
= EXIT_FAILURE
;
39 if (!sjme_nvm_destroy(state
, &exitCode
))