Ejemplo n.º 1
0
int main()
{
    char progname[30];
    int i=0,locctr,li=1,ol,end;
    ol=optabcall();
    printf("\nEnter the Input Program:");
    gets(progname);
    li=loadcode(progname,&locctr);
    end=Passone(locctr,li,ol);
    Text(li,locctr,end);
    printf("\nObject Program is stored in OBJECT.txt\n\n");
    read();
    return 0;
    getch();

}
Ejemplo n.º 2
0
int main(int argc, char **argv) {

    if(argc < 2) {
        printf("Especifique o arquivo com o codigo\n");
        exit(0);
    }

    init_memory();

    init_stack();

    loadcode(argv[1]);

    init_cpu();

    while(cpu_cycle());

    memory_dump();

    free_memory();
    return 0;
}