Ejemplo n.º 1
0
void lc3_step_one(lc3machine* state)
{
	// If the machine is not halted
	// Fetch an instruction
	// And call lc3_execute 
    if (state->mem[state->pc] != LC3_TRAP_FULL_HALT) {
        u16 instruction = lc3_fetch(state);
        lc3_execute(state, instruction);
    }
}
Ejemplo n.º 2
0
/** lc3_step_one
 *
 * Get the next instrution and execute it if not halted
 *
 * @param state LC3 simulator
 */
void lc3_step_one(lc3machine* state)
{
    // check if machine is running
    if (state->halted)
        return;
    
    // get the next instruciton
	unsigned short instruction = lc3_fetch(state);
    
    // run it
    lc3_execute(state, instruction);
}
Ejemplo n.º 3
0
void lc3_step_one(lc3machine* state)
{
		state->halted = 0; 
		unsigned short instr = lc3_fetch(state); 	// get instruction returned from fetch
		lc3_execute(state, instr);  			// execute that instruction
}