On 2/5/2024 3:04 PM, Bernd Böckmann via Freedos-devel wrote:
On 05.02.2024 23:14, Ralf Quint via Freedos-devel wrote:
Sorry, was just confused as to why all the sudden this was brought up.
No one was harmed :-) I wanted to explain why I set DS to zero and
probably went a bit off-topic by referring why the Watcom manual
recommends it.
The longer I think about it the more I wonder if not setting DS to
zero, what a "good" value for it would be when calling the BIOS.
Random values are probably not a good idea. I do not think that there
should be a distinction between "good" and "bad" memory corruptions. A
memory corruption is by definition bad. But if there were a way for
example the kernel to mitigate such BIOS bugs by choosing a "better"
segment register, it should be worth a consideration. But I do not
know what would be the side effects of choosing F000, for example.
Eric brought brought me closer to this idea. F000 should most often be
read-only, but could impose other problems.
I can't re-read the thread right now, but now I am even more confused. I
can't see any reason as to why a data segment on a BIOS call should be
set to any random value. The side effects for choosing F000 could be for
example that you would create incompatibilities with "non-IBM PC" PCs.
As far as DOS goes (as slim as the chances are that someone has such a
machine in 2024 đ ), it should be possible to have it (and programs
like FDISK) running on machine like an Tandy 1000, DEC Rainbow or Victor
9000/Sirius 1, and I know for sure that on the later, F000 is the video
RAM segment on that machine...
I will re-read that thread and see what the issue with the DS would be,
but again, I can't see how it possibly could be a "random" segment. You
either want to read a value at a specific offset (not much harm done
beside not getting back the value you are looking for) or in worst case
scenario, you are trying to write to that address and that could cause
havoc depending on your random value for DS...
l8r,
Ralf
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel