int main(void) { static int opcode, operand, num_instruct; int instruction = 0; num_instruct = load_instructions(); system("cls"); do { dump_memory(); read_and_parse_sml(instruction, &opcode, &operand); handle_instruction(&instruction, opcode, operand); system("cls"); } while ((HALT != opcode) && (instruction < num_instruct)); if (HALT == opcode) printf("HALTED\n"); else printf("No more instructions\n"); system("pause"); return 0; }
double papi_instructions::load_instructions_ratio() const { return load_instructions() / (double) total_instructions(); }