What are techniques for determining running OS in assembly language at runtime?
问题 What are techniques for determining running OS in assembly language at runtime? If there are direct ways to determine this, that'd be awesome. I was also thinking of how there are tricks in Javascript to determine what browser you're running in... Are there similar techniques for determining OS or even CPU arch in a low level language like Intel assembly? Thanks, Chenz 回答1: CPU architecture will be next-to-impossible to determine. Machine code differs greatly between CPU architectures, and so