Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Error in XMS specification? - emu2 (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 09.01.2026, 21:53

> The error is that forward moves (DF=UP, cld) work properly on overlapping
> destination and source when the *destination* is below the source. This is
> the other way around than what the specification lists. From what I can
> tell, drivers actually implement the forwards movement.

Just fixed this in my fork of emu2.

Quoting the long comment:

The overlap check was the wrong way around. It's likely because
it was incorrectly stated in the XMS specification.

Refer to https://www.bttr-software.de/forum/forum_entry.php?id=15907

Example:

  src < dst C=8
  SSSSOOOODDDD
  12345678
  ^ copy 1234 to OOOO
      ^ copy 1234 to DDDD

  src > dst C=8
  DDDDOOOOSSSS
      12345678
      ^ copy 1234 to DDDD
          ^ copy 5678 to OOOO


I did correct the check, but also disabled it and instead used memmove for every case. This simplifies the used code a lot. As it so happens, memcpy also worked on our Debian amd64 server, regardless of which way the overlap was, but I understand that this is not a well-behaved assumption.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
23493 Postings in 2218 Threads, 408 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum