int32_t execute(const uint8_t* command) { dentry_t fentry; int return_val = -1; if (-1 == read_dentry_by_name(command,&fentry)) { return -1; } asm volatile ( "movl %0 , %%eax\n\t" "movl %%eax , %%CR3" : : "r"(ppagedir) : "%eax" ); copy_file(fentry); asm volatile ( "pushl %2\n\t" "pushl %4\n\t" "pushl $0x0202 \n\t" "pushl %3\n\t" "pushl %0\n\t" "mov %2,%%ax\n\t" "mov %%ax,%%ds\n\t" "iret" : : "g"(tss.eip),"g"(tss.ebp),"g"(USER_DS),"g"(USER_CS),"g"(tss.esp) : "%eax" ); return return_val; }