hey guys,
thanks to some help from you and another one of my friends, i finally got some code that works, here it is:
int main(int argc, const char *argv[])
{
int x;
int xpos = 0;
FILE *bin = fopen((const char*)argv[1], "r");
int length = ftell(bin);
program = (int*) malloc(length);
while ((x = (int)getw(bin)) != EOF)
{
program[xpos] = x;
xpos++;
}
run();
return 0;
}