AminetAminet
Search:
84720 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/boot/NoMoreDiv0.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:No more Division by Zero
Author:Holger.Hippenstiel AT gmx.de
Uploader:Holger Hippenstiel nc-online de
Type:util/boot
Version:1.6
Replaces:util/boot/NoMoreDiv0.lha
Architecture:m68k-amigaos >= 2.0.0
Distribution:Aminet
Kurz:Keine Geteilt Durch Null Abstuerze mehr
Date:2021-01-10
Download:http://aminet.net/util/boot/NoMoreDiv0.lha - View contents
Readme:http://aminet.net/util/boot/NoMoreDiv0.readme
Downloads:1210

NoMoreDiv0 V1.6
===============

TL;DR Install NoMoreDiv0 in C:, Call in Startup-Sequence after SetPatch or
in User-Startup. Or put NoMoreDiv0 and it's icon in WBStartup.
Programs wont crash with "Division by Zero" anymore.

   **********************************************************************
   *** Warning - This is a HACK, to make old/buggy programs working ! ***
   ***     No one should develop programs while this is running,      ***
   ***  you should check for division by zero errors in your code !   ***
   **********************************************************************

While working on http://aminet.net/package/util/boot/CopyMemAIO
i noticed for example "TestIt" from
http://aminet.net/package/util/misc/CopyMemQuicker crashes with Division by
Zero. The WinUAE-Emulation is so fast that nearly "no time" has passed,
which causes "TestIt" to try to divide by Zero (time).
And i remembered i had similar problems with other programs aswell,
the only solution was to change the speed to "Approximate A500/A1200 or
cycle exact" and +500% - but thats to slow for me. :P

So my idea was to replace the division by zero, if you think about it
smaller divisors means bigger results:
100/5 = 20, 100/2 = 50, 100/1 = 100 and finally 100/0 = Infinite
Ok, you cant calculate the other way: Infite * 0 = 100
But imho it is the best approximation.

This program will exactly do that, patch the Division by Zero Exception
and change the "faulty" register to 0x7ffffff (Maximum positive Value).
In case of div(u/s)l.l with a Register for the Remainder, it will be cleared.

If you start it again, the Patch will be removed and Returncode 5 is given.

Since V1.4 compatible with the Debug-Version:
http://aminet.net/package/dev/debug/NoMoreDiv0_Debug

Which means they both can remove the other version.

*** Update V1.6:
Wasn't really OS2.0 compatible, fixed.
Can be started from WB now. Added Icon.

*** Rerelease:
Div0Test now also works with OS2.0

Supported Modes are now:

div?l.l LongAddr.l,dy:dz
div?l.l #n,dy:dz
div?l.l Addr.w,dy:dz
div?l.l Addr(pc),dy:dz
div?l.l Addr(pc,dx.z*n),dy:dz
div?l.l off(ax,dx.z*n),dy:dz
div?l.l off(ax),dy:dz
div?l.l dx,dy:dz
div?l.l (ax),dy:dz
div?l.l (ax)+,dy:dz
div?l.l -(ax),dy:dz
div? LongAddr.l,dy
div? #n,dy
div? Addr.w,dy
div? Addr(pc),dy
div? Addr(pc,dx.z*n),dy
div? off(ax,dx.z*n),dy
div? off(ax),dy
div? dx,dy
div? (ax),dy
div? (ax)+,dy
div? -(ax),dy

? = u or s
All div?l.l with or without remainder-register.

*** Known Bugs/Limitations:

Because the code in the exception has to check code -8 from current PC it
could cause enforcer-hits, very very very unlikely - but it can happen.

Memory Indirect Modes are not supported, no one should use crap like:
div(u/s)(l.l) ([Label1,ax/pc,dx.z*n],Label2),dy:dz
... anyway. :P

****************************************************************************
Not supported only means they are not changed, they will still show up in
the debugger-version, they are catched and wont crash your machine either.
****************************************************************************

Check out my other tools:
http://aminet.net/search?readme=%22Holger+Hippenstiel%22&sort=date&ord=DESC

    DISCLAIMER

        This software is subject to the "Standard Amiga FD-Software Copyright
        Note". It is Giftware as defined in paragraph 4g. If you like it and
		use it regulary, please send me a small gift.
		For more information please read "AFD-COPYRIGHT".

        Diese Software unterliegt der "Standard Amiga FD-Software Copyright
        Note". Sie ist Giftware wie definiert in Absatz 4g. Falls du sie magst
		und regelmaessig benutzt, sende bitte ein kleines Geschenk.
		Fuer mehr Informationen lies bitte "AFD-COPYRIGHT".

        (/pub/aminet/docs/misc/AFD-FilesV-XX.lha V=Version,XX=Languages)

    AUTHOR

        Please send comments, bug-reports or small gifts like a Vampire V4
        or a now "worthless :P" NVidia RTX 2080 Ti, or Paypal me to:

        Holger.Hippenstiel AT gmx.de
        Hauptstr. 38
        71229 Leonberg
        Germany


Contents of util/boot/NoMoreDiv0.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                 2898    7381  39.3% -lh5- d49c Sep 28 02:23 afd-copyright
[unknown]                  841    1611  52.2% -lh5- b804 Sep 28 02:23 AFD-COPYRIGHT.info
[unknown]                  633     828  76.4% -lh5- f4d1 Jan 10 17:59 Div0Test
[unknown]                  492     584  84.2% -lh5- 3991 Jan  4 14:01 NoMoreDiv0
[unknown]                 1106    1327  83.3% -lh5- dc23 Jan  4 13:46 NoMoreDiv0.info
[unknown]                 2026    4347  46.6% -lh5- 51f9 Jan 10 18:13 NoMoreDiv0.txt
[unknown]                 1601    5092  31.4% -lh5- 10fb Jan 10 17:58 source/Div0Test.s
[unknown]                 1299    3675  35.3% -lh5- b243 Sep 28 02:26 source/M68k_exceptions.s
[unknown]                 1776    4571  38.9% -lh5- 9c53 Jan  4 14:00 source/NoMoreDiv0.s
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total         9 files   12672   29416  43.1%            Jan 11 04:57

Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>