comparison z80_to_x86.c @ 1147:06468b25a543

Fix implementation of Z80 HALT instruction
author Michael Pavone <pavone@retrodev.com>
date Tue, 03 Jan 2017 21:37:36 -0800
parents 5c8b1c33ca10
children 2a799f24563f
comparison
equal deleted inserted replaced
1146:3e24de8d8073 1147:06468b25a543
1409 break; 1409 break;
1410 case Z80_HALT: { 1410 case Z80_HALT: {
1411 code_ptr loop_top = code->cur; 1411 code_ptr loop_top = code->cur;
1412 //this isn't terribly efficient, but it's good enough for now 1412 //this isn't terribly efficient, but it's good enough for now
1413 cycles(&opts->gen, num_cycles); 1413 cycles(&opts->gen, num_cycles);
1414 check_cycles_int(&opts->gen, address); 1414 check_cycles_int(&opts->gen, address+1);
1415 jmp(code, loop_top); 1415 jmp(code, loop_top);
1416 break; 1416 break;
1417 } 1417 }
1418 case Z80_DI: 1418 case Z80_DI:
1419 cycles(&opts->gen, num_cycles); 1419 cycles(&opts->gen, num_cycles);