English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Asm / Hardware (https://eab.abime.net/forumdisplay.php?f=112)
-   -   DIVS overflow question... (https://eab.abime.net/showthread.php?t=106738)

DanScott 26 April 2021 10:36

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 ?

Thomas Richter 26 April 2021 10:51

Quote:

Originally Posted by DanScott (Post 1479350)
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 ?


Correct, yes.

DanScott 26 April 2021 12:29

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 :)


All times are GMT +2. The time now is 05:21.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.08002 seconds with 11 queries