Table of Contents

Early August work

2023-08-06

Some developments happened this week.

FreeDOS kernel changes for WIN31SUPPORT build option

In response to a stackexchange question on running MSWindows 3.11 in 386 Enhanced mode, I wanted to prepare a build of the latest kernel revision with its WIN31SUPPORT build option enabled.

However, I found that the sources with this option enabled used seg and wrt terms that NASM's elf output format does not support.

I added some conditional code to work around this. In kernel.asm this adds more variables and makes those and another global. In the interrupt 2Fh handler, the three new variables are filled with the segmented address parts they need.

I did check the result, but I do not know entirely that it is correct.

In one of the places, I found that a segmented far pointer is stored with the segment first. I do not know whether this is correct, but I left it as is.

FreeDOS mailing list reply on booting FreeDOS off an 8088 machine

I prepared a long reply to the freedos-devel mailing list on how to boot off a CF card on an 8088 machine, but preparing the card on another machine. I basically presented three options:

Bonus

A while ago I wrote about how to install FreeDOS to a logical partition and/or a partition that is not DOS's drive C:.

lDebug work

A bug in the S command accessing a byte behind its sss_silent_count_used variable was fixed.

The S command's SILENT keyword clause was documented.

The S command's data dump's displacement display was documented.

The /A= switch was documented.

A new flag was introduced which controls whether serial I/O is used. Prior to that, the DCO option was directly used to control this. Besides being a shoddy design, this led to a bug when running a command like install serial,timer,amis. When this bug happened, the INSTALL command's output would try to use the buffers for serial output that were not initialised yet. This would make the debugger corrupt parts of its process as the pointers happened to be zero.

The /A= switch is now also supported when loading as a device driver. Largely this shares the code used for adjusting the history segment and the code segments for the application mode /A= switch. However, it also needs to rewrite a convenience signature at the end of the debugger's allocation and adjust the device driver size in one debugger variable as well as in the device request header passed by the DOS.

The RH command keyword COUNT allows to display the RH step number for every displayed step, in hexadecimal and decimal.

There are more places which accept commas as separators.

There is a new command, CLEAR, to attempt to clear the screen. This is done by emitting two escape sequences. If the output is to a ROM-BIOS int 10h interface and the application is not running in a -dumb mode dosemu2 then one of the escape sequences is translated into int 10h calls to blank the screen and reset the cursor position.

Finally, the D strings commands were changed to buffer their outputs into line_out instead of calling getc for every single byte. This improves the performance, but also allows the debugger's escape sequences for inverting the display attributes and for clearing the screen to be used by the D strings commands' output. (These escape sequences must be passed in full to a single puts call in order to be recognised.)