26 April 2021, 10:36 | #1 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
|
DIVS overflow question...
If I have something like:
move.l #$00800000,d0 divs d1,d0 if for example, d1 was 3, then an overflow would be detected (as the result does not fit in a word size), and the V flag is set. According to the docs i have read, it says that on overflow, the operands remain unchanged... so can I assume that d0 still contains #$00800000 after the overflow ? Or are there any cases where d0 might change even if an overflow happens ? |
26 April 2021, 10:51 | #2 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,215
|
|
26 April 2021, 12:29 | #3 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,211
|
Ah cool.. handy to know, and in this case, the low word will remain zero which is the desired outcome of an overflow anyway, so no need to handle overflow case
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Overflow: Pipemania Clone | BippyM | Coders. Asm / Hardware | 37 | 20 February 2022 23:08 |
Math [divs] | LeCaravage | Coders. Asm / Hardware | 3 | 23 October 2020 08:39 |
Pull overflow with DirectX 11 on WinUAE 4.3+ | Leandro Jardim | support.WinUAE | 2 | 04 April 2020 12:40 |
SysEx buffer overflow | Ducktale | support.WinUAE | 1 | 30 August 2007 12:20 |
|
|