Menu

#189 Beep function freezes on recently intel platform (skylake/kabylake)

open
nobody
5
2018-09-04
2017-06-09
flyer
No

Freecom library beep_l.c & beep_n.c use delay() funtion that caused freezes.
Delay() function uses port 0x61 timer counter which is removed on recently intel platform (skylake/kabylake).
Thus we can use intrpt 0x15 instead of delay() to avoid this issue.

Discussion

  • Anthony Williams

    This has already been reported recently:

    https://sourceforge.net/p/freedos/mailman/message/35079762/

    Just to summarize, you can make a simple binary patch to disable the beeping entirely:

    "VER" says: "FreeCom version 0.84-pre2 XMS_Swap [Aug 28 2006 00:29:00]"

    upx -d %COMSPEC%

    --- binary patch begins here ---

    Comparing CMD.OLD and CMD.COM
    00008293: 55 C3
    000082AF: 55 C3

    I know this isn't a perfect solution, but it's an acceptable workaround, IMHO. Please tell us if this doesn't suffice for your usage. (Heavier improvements to FreeCOM are still TODO, but so far no one has volunteered to actively maintain it.)

     
  • Shidel

    Shidel - 2017-06-20

    Um, may want to avoid using the "High Precision Timer" INT 0x15. I've run across some issues when using im with some emulators and under different DOS kernels (like PC-DOS, I think)

     
  • Bart Oldeman

    Bart Oldeman - 2018-09-04

    The OpenWatcom built-in delay() and the one I wrote for GCC use int21/ah=0x2c instead, to go via DOS.
    sound() itself still uses port 0x61 bits 0 and 1 to turn the PC speaker on and off.
    commandg.com and commandw.com in the newest pre's use that (at github.com/FDOS/freecom)

     

Log in to post a comment.