Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

New version DRDOS 7.01.7 & 7.01.8 (Announce)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 12.12.2023, 18:47

> I made some changes to the latest EDR-DOS sources maintained by ecm:
>
> - fixed bug in DRDOS.SYS div32 function, leading to division errors on
> partitions with more than 66535 FAT sectors. There is also a div32 function
> in DRBIO.SYS present, but it did not contain the bug.

https://github.com/SvarDOS/edrdos/commit/167fe71ec058f80b7da47f11f2a34fc66938ad57

div16:
        mov     ax,12[bp]
        mov     dx,14[bp]


Surely you can xor dx, dx here if you already checked that word [bp + 14] is zero?

More to the point if the divisor high word is zero, a two-step division of two 32/16=16 divisions can be done on a 32-bit dividend (with 32-bit quotient) which would be faster than the full 32-bit division (that fully supports 32-bit divisors in addition to dividends/quotients).

The division functions in DRBIO both do not offer the fast path for smaller numbers:

https://github.com/SvarDOS/edrdos/blob/f6584d40d6dda553e63f7682ad672536f53ae6ff/drbio/disk.asm#L3286

https://github.com/SvarDOS/edrdos/blob/f6584d40d6d...e63f7682ad672536f53ae6ff/drbio/bdosldr.a86#L772

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
21998 Postings in 2024 Threads, 395 registered users, 203 users online (0 registered, 203 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum