문제

I have written a small 16-bit assembly program that writes some values in some memory locations.Is there a way I can test it in 32-bit protected mode on Linux?

도움이 되었습니까?

해결책

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top