A little more follow-up.
First, I should be a little clearer. This is FreeDOS installed in hybrid
mode inside of DOSBox. This is where the all of the utilities provided
with FreeDOS are available and the FreeCOM shell is being used on top of
the DOSBox kernel. This allows for all the additional benefits of
FreeCOM will still having easy access to the HOST file system. The
hybrid install is something the FreeDOS installer has been capable of
since FreeDOS 1.2.
I just noticed that if you are quick enough (or slow DOSBox way down),
pressing a key while doing a short directory listing (one that does not
pause), causes the FreeCOM shell to terminate as well.
So, IDK.
On 5/4/24 03:05, Jerome Shidel via Freedos-devel wrote:
Hi all,
I do a lot of my programming under DOSBox running the FreeCOM shell.
This provides me with the most convenient development process.
However on occasion, FreeCOM would terminate and the simplest thing to
do to get things back to normal would be restart DOSBox.
This is not a new issue. It's been happening for years.
Sometimes there would be some sort of error message. Most often no
message.
I had no idea why this would happen. I just lived with the occasional
nuisance.
Until now.
I figured out what causes that to happen. And it is creditably easy to
reproduce with an 11 byte program.
Fire up DOSBox, run FreeCOM, compile and execute this NASM source:
use16 ; 16-bit code cpu 8086 ; 8086
compatible org 0x100 ; COM file
WaitForKey: ; Label for wait loop mov ah,0x01 ; Check for
keystroke function int 0x16 ; call the BIOS function jz
WaitForKey ; if Zero Flag, then no keystroke, repeat
mov ax, 0x4c00 ; function to exit to dos, with no error int
0x21 ; call the DOS function
For those familiar with assembly, you can see it is very simple. The
program just waits for a key to be pressed. Then terminates leaving
the keystroke in the buffer.
Nothing odd or fancy.
But, leaving a keystroke in the buffer will cause the FreeCOM shell to
terminate under DOSBox.
This can happen in any program when there is a delay in termination
after the last keystroke was pulled from the buffer.
It was happening to me because I sometimes start typing before a build
script (batch file) would completely finish.
I suspect it is not a bug in FreeCOM. But, it is more likely a bug in
DOSBox.
I have not seen it happen when running "Pure" FreeDOS inside a Virtual
Machine or on real hardware.
I have seen it happen under several versions of DOSBox and DOSBox
Staging with both Mac and Linux Hosts.
But, that's just a guess. The bug could be in either.
After all, running the test program again after FreeCOM shuts down,
the key just shows up on the command line like it should.
So, IDK.
Unfortunately, I don't have the time to dive into it further.
:-)
Jerome
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel