The task is to obtain information about the computer using the int 11h system interrupt, which writes the state word (configuration) to the AX register. Interrupts can be accessed from dos.h , but the function that provides work with int86() interruption was found only in compiler libraries and headers for 1993, MS Visual 1.52 (1993) 16-bit, which does not suit me, due to the presence of 64-bit OS. The following code was written:
/*#include <stdio.h> int main() { short a=0; __asm { int 11h mov a, ax } printf("%d",a); return 0; } which displays a status word in the numeric value of -14302 . And it seems that everything suits, but there are a few, but which could not be solved:
- This code is also compiled only by the above specified compiler (I work VirtualBox with Win7 (32 bit)). More precisely, it turned out to compile in MS Visual C ++ 2010 Express, but when the program starts it crashes and the problem is in the line
int 11h - This magic number
-14302is the result also on the tablet (Windows 8.1, 32 bit). And on another computer (WinXP, 32 bit).
The second "but" suggests that something is working incorrectly. Can the same status word be on 3 completely different computing devices (tablet, laptop, computer)?
I ask for advice on solving this problem.