main.c

00001 /*
00002 # This file is Copyright 2007, 2009 Dean Hall.
00003 #
00004 # This file is part of the Python-on-a-Chip program.
00005 # Python-on-a-Chip is free software: you can redistribute it and/or modify
00006 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
00007 # 
00008 # Python-on-a-Chip is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
00012 # is seen in the file COPYING up one directory from this.
00013 */
00014 
00015 
00016 #include "pm.h"
00017 #define WIN32_LEAN_AND_MEAN
00018 #include "windows.h"
00019 #include "tchar.h"
00020 
00021 // the usr modules that were converted to C from Python
00022 extern unsigned char usrlib_img[];
00023 
00024 
00025 #if defined(_CONSOLE)
00026     int _tmain(int argc, _TCHAR* argv[])
00027 #else
00028     int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
00029 #endif
00030  {
00031     PmReturn_t retval;
00032 
00033     retval = pm_init(MEMSPACE_PROG, usrlib_img);
00034     PM_RETURN_IF_ERROR(retval);
00035 
00036     retval = pm_run((uint8_t *)"main");
00037     return (int)retval;
00038 }

Generated on Mon Oct 18 07:40:46 2010 for Python-on-a-chip by  doxygen 1.5.9