Uploaded_11_13_2025
This commit is contained in:
parent
fc24eab83d
commit
82f6bf4467
@ -2304,7 +2304,7 @@ void opcode_0xF6() {
|
||||
else {
|
||||
signed_local_quo = (int16_t)register_ax / signed_local_divr;
|
||||
signed_local_rem = (int16_t)register_ax % signed_local_divr;
|
||||
if (signed_local_quo> 0xFF) { DIV0_Handler(); }
|
||||
if ( (signed_local_quo<-128)||(signed_local_quo>127)) { DIV0_Handler(); }
|
||||
register_ax = signed_local_rem << 8;
|
||||
Write_Register(REG_AL , signed_local_quo);
|
||||
}
|
||||
@ -2369,10 +2369,10 @@ void opcode_0xF7() {
|
||||
signed_local_divr=(int16_t)Fetch_EA();
|
||||
if (signed_local_divr==0) DIV0_Handler();
|
||||
else {
|
||||
local_overflow_test = signed_local_numr / signed_local_divr;
|
||||
local_overflow_test2 = signed_local_numr / signed_local_divr;
|
||||
if ( (local_overflow_test2<-32768)||(local_overflow_test2>32767) ) { DIV0_Handler(); }
|
||||
register_ax = signed_local_numr / signed_local_divr;
|
||||
register_dx = signed_local_numr % signed_local_divr;
|
||||
if (local_overflow_test> 0xFFFF) { DIV0_Handler(); }
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2696,9 +2696,7 @@ void opcode_0xF6() {
|
||||
else {
|
||||
signed_local_quo = (int16_t)register_ax / signed_local_divr;
|
||||
signed_local_rem = (int16_t)register_ax % signed_local_divr;
|
||||
if ( (signed_local_divr>0) && (signed_local_divr>0x7F) ) {DIV0_Handler(); }
|
||||
if ( (signed_local_divr<0) && (signed_local_divr<(0x7F-1) )) {DIV0_Handler(); }
|
||||
|
||||
if ( (signed_local_quo<-128)||(signed_local_quo>127)) { DIV0_Handler(); }
|
||||
register_ax = signed_local_rem << 8;
|
||||
Write_Register(REG_AL , signed_local_quo);
|
||||
}
|
||||
@ -2762,17 +2760,12 @@ void opcode_0xF7() {
|
||||
}
|
||||
break;
|
||||
case 0x7: if (ea_is_a_register==1) clock_counter=clock_counter+175; else clock_counter=clock_counter+181; // # 0xF7 REG[7] - IDIV REG16/MEM16
|
||||
|
||||
signed_local_numr = (int32_t)(register_dx<<16) | (int32_t)register_ax;
|
||||
signed_local_divr=(int16_t)Fetch_EA();
|
||||
if (signed_local_divr==0) DIV0_Handler();
|
||||
else {
|
||||
local_overflow_test = signed_local_numr / signed_local_divr;
|
||||
//if (local_overflow_test> 0xFFFF) { DIV0_Handler(); }
|
||||
|
||||
if ( (signed_local_divr>0) && (signed_local_divr>0x7FFF) ) { DIV0_Handler(); }
|
||||
if ( (signed_local_divr<0) && (signed_local_divr<(0x7FFF-1) )) { DIV0_Handler(); }
|
||||
|
||||
local_overflow_test2 = signed_local_numr / signed_local_divr;
|
||||
if ( (local_overflow_test2<-32768)||(local_overflow_test2>32767) ) { DIV0_Handler(); }
|
||||
register_ax = signed_local_numr / signed_local_divr;
|
||||
register_dx = signed_local_numr % signed_local_divr;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user