Hmm interesting... I looked at freecom, and when it's beeping for a tab it calls the beep() function <https://github.com/FDOS/freecom/blob/master/lib/beep_n.c#L49>: void beep(void) { sound(900); delay(200); /* 400 */ nosound(); delay(100); }
Which in turn uses the delay function. The delay function is a busy loop (while(1)) which calls int 28h. The rest is mostly speculation... since I'm not really familiar with freecom... Since FreeCOM uses int 21/AH=07h <https://github.com/FDOS/freecom/blob/master/lib/cgetch.c#L53> to read character input, it doesn't react to Ctrl-C through the kernel <https://fd.lod.bz/rbil/interrup/dos_kernel/2107.html#2599> (so Int 23h is not called), instead it simply sets an internal flag if the input character is Ctrl-C, and then in the command loop it will check if the flag was set. I also found that displaying the matches will call printf which IIRC will be Ctrl-C aware and call int 23h which lands the in FreeCom's CtrlC handler which probably then sets the flag and returns, but I'm not able to verify this, but this interrupt in combination with beeping and int 28h sounds like there could lead to something, but on the other side it seems like this edge case is simply just failing to print the prompt like it should, since the commands seem to work. Soo I'd first write a new outc function which would use int 21h/AH=06h <https://fd.lod.bz/rbil/interrup/dos_kernel/2106.html#2597> instead of printf to print the string, and see if that helps. I think it could potentially help a lot, but with the side effect of the tab-completion not being interruptible (unlessthat is also added in, but then it all becomes a lot more complex...). Oh boy, I almost lost myself in this rabbit hole :P --Wolf -- |\_ | .\---. / ,__/ / /Wolf <wolf+...@bergenheim.net>_ On Sun, Sep 29, 2024 at 1:35 PM Eric Auer via Freedos-devel < freedos-devel@lists.sourceforge.net> wrote: > > Hi! > > I would like to "bump" some interesting tickets on gitlab: > > https://gitlab.com/FreeDOS/issue-reporting/-/issues/60 > > tells that Ctrl-C in context of a TAB / beep situation > (tab completion) can cause a freeze of freecom command.com, > which is similar to what I remember to have noticed in > some situations in dosemu2, assuming that it would have > been related to the beep timing code itself. However, > this ticket uses a quite different twist: > > "Hold Ctrl, keep pressing tab until the system beeps, > then quickly press C." > > A few other scenarios are described in the ticket and > the user has made a custom freecom which does not beep > at all, but still exhibits the described bug. Ideas? > > Regards, Eric > > > > > > _______________________________________________ > 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