# problems running 16-bit code[solved]

## Adel Ahmed

Whenever I try running one of my old games under wine I get the following error:

modify_ldt: Invalid argument

err:module:attach_process_dlls "krnl386.exe16" failed to initialize, aborting

err:module:LdrInitializeThunk Main exe initialization for L"C:\\windows\\system32\\winevdm.exe" failed, status c0000005

after some googling I found some people mentioning that some update in the linux kernel prevents running 16 bit programs under 64 bit cpus, they've also added that  running:

#echo 1 > /proc/sys/abi/ldt16

will allow you to run 16-bit games

my question is:

bash: /proc/sys/abi/ldt16: No such file or directory

sys-kernel/gentoo-sources-3.12.21-r1:3.12.21-r1

what do I have to do to get 16-bit games to run againLast edited by Adel Ahmed on Thu Jul 24, 2014 11:48 am; edited 1 time in total

----------

## the.root

Can you install a newer kernel? I'm on 3.15.6 and have the "/proc/sys/abi/ldt16" file. According to https://www.kernel.org/pub/linux/kernel/v3.0/ChangeLog-3.12.22 it says they added in support for it as a runtime option in 3.12.22 - which is a newer kernel then you have. I also skimmed some forums where it said it certain 3.13.0 versions had the security feature, but they had removed the runtime option. 

http://bugs.winehq.org/show_bug.cgi?id=36664

Also suggest 3.12.21 will not work. There may be patches you can try, I didn't really dig that deep.

----------

## VoidMage

This problem will be fixed for real in 3.16, once it's out - probably a couple weeks.

----------

## Yamakuzure

16bit? Isn't this something DosBox is for?

----------

## Adel Ahmed

excellent, the new sources are working just fine for now

there are some 16 bit windows applications that cannot be run by dosbox

thanks everyone

----------

## Yamakuzure

 *blakdeath wrote:*   

> there are some 16 bit windows applications that cannot be run by dosbox

 That would be of the windows-3.1[1] era, right?

I wonder, if those programs are still worth to be used, why there isn't any upgrade. Maybe it is possible to contact the author[s] asking to release the sources into public domain? (Yes, I know, those chances are slimmer than slim...)

----------

## VoidMage

wine devs, when prompted on this, said that many win32 programs before 64bit era had still 16bit installers.

----------

## Adel Ahmed

yup, that era, and it's not about being worth it, it's about old games/nostalgia

----------

