How to run 16 bit code on 32 bit Linux?

柔情痞子 提交于 2019-12-06 14:10:40

Yes, 16-bit code is supported in user processes in Linux. The system call to do it is called vm86() (there's a man page, but there's not much in it). It is, naturally, only works on x86 platforms (and 32-bit only).

If you want an example, the ELKS project has a complete tool for running ELKS 8086 binaries on Linux, which uses it:

https://github.com/lkundrak/dev86/tree/master/elksemu

Look for the run_elks() function. It's pretty straightforward.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!