Example #1
0
File: errors.c Project: i12345/LLLL
void throw_err_assertion_faulty() {
	printf("faulty assertion");

#if DEBUG
	error_crash();
#endif

	for (;;) {}
}
Example #2
0
File: errors.c Project: i12345/LLLL
void throw_err_not_implemented() {
	printf("not implemented");

#if DEBUG
	error_crash();
#endif

	for (;;) {}
}
Example #3
0
File: errors.c Project: i12345/LLLL
void throw_err_invalid() {
	printf("invalid");

#if DEBUG
	error_crash();
#endif

	for (;;) {}
}
Example #4
0
void instruction_execute(_pmachine m, _pinstruction ins)
{
    //ÉèÖÃĬÈϵÄÖ¸Áî
    register_set_content(&m->_r_pc, (int)ins->next);
    switch (ins->op)
    {
    case MOV:
        instruction_execute_mov(m, ins);
        break;
    case CMP:
        instruction_execute_cmp(m, ins);
        break;
    case JE:
        instruction_execute_je(m, ins);
        break;
    case JG:
        instruction_execute_jg(m, ins);
        break;
    case JL:
        instruction_execute_jl(m, ins);
        break;
    case JMP:
        instruction_execute_jmp(m, ins);
        break;
    case PUSH:
        instruction_execute_push(m, ins);
        break;
    case POP:
        instruction_execute_pop(m, ins);
        break;
    case CALL:
        instruction_execute_call(m, ins);
        break;
    case RET:
        instruction_execute_ret(m, ins);
        break;
    case ADD:
        instruction_execute_add(m, ins);
        break;
    case SUB:
        instruction_execute_sub(m, ins);
        break;
    default:
        error_crash("unknown operation");
    }
}