trunk/src/emu/cpu/g65816/g65816.c
| r17642 | r17643 | |
| 620 | 620 | |
| 621 | 621 | cpustate->dvdd = data; |
| 622 | 622 | |
| 623 | | if(cpustate->dvdd != 0) |
| 624 | | { |
| 625 | | quotient = cpustate->wrdiv / cpustate->dvdd; |
| 626 | | remainder = cpustate->wrdiv % cpustate->dvdd; |
| 627 | | } |
| 628 | | else |
| 629 | | { |
| 630 | | quotient = 0xffff; |
| 631 | | remainder = 0x000c; |
| 632 | | } |
| 623 | quotient = (cpustate->dvdd == 0) ? 0xffff : cpustate->wrdiv / cpustate->dvdd; |
| 624 | remainder = (cpustate->dvdd == 0) ? 0x000c : cpustate->wrdiv % cpustate->dvdd; |
| 633 | 625 | |
| 634 | 626 | cpustate->rddiv = quotient; |
| 635 | 627 | cpustate->rdmpy = remainder; |