Rugxulo Jun 25, 2012 to freedos-devel Hi, On Mon, Jun 25, 2012 at 6:24 AM, Tom Ehlert wrote: > >> KEYB.EXE 11,446 06-24-12 > >> leaves, when running, a huge memory hole. at least with only HIMEM >> loaded. note the HUGE memory hole behind KEYB > > the problem is > > function MCBAlloc ( para: word ) : word; > var allocs,f,m: word; > > mov ah, $58 { set alloc strategy } > mov al, 1 > xor bh,bh >>>> mov bl, $41 > int $21 > > using 'best fit' is virtually ALWAYS a bug for a TSR > > solution 2) use > mov bl, $82 last fit, try high then low memory > > this allocates memory from top, but doesn't create holes. > > unfortunately I'm not able to compile this; awaiting the maintainer > to fix this bug Surely a simple binary patch is possible in the meantime. I've not tested this (yet), but you could try this: upx -d keyb.exe hiew keyb.exe (or similar hex editor) offset 0x3E06 is "mov bl, 0x41" change offset 0x3E07 from 0x41 to 0x82 run modified version for comparison (keyb.exe /blah ...)