I'm using masm32 for learning programing 32bit assembly programs. I want to know how i can directly read from input (like 16-bit assembly, call interrupt or something like) without use of io.h predefined macros and procs? Is it possible?
thanks
Using older OSes like DOS, you can call e.g. INT 16h to ask the BIOS for a keypress. Unfortunately, this is not possible under NT-like Windows. For a bunch of reasons (security and stability being the most important), access to BIOS interrupts is controlled by the Windows kernel, and is therefore restricted for regular apps.
In other words, you have to get all keystrokes through Windows kernel calls, directly or indirectly. There is no other way. You call the OS, the OS calls the kernel, the kernel calls the BIOS.
But anyway, in case you still want to use interrupts, there is a possibility — at the cost of becoming even more platform-dependent than after choosing MASM32 as the target language.
Under 32-bit Windows, many of the Windows APIs from NTDLL can be accessed via INT 2Eh. The problem is that different versions of Windows (sometimes even different builds of the same version) differ in INT 2Eh function numbers.
Think twice whether you want such level of platform-dependence before you start researching this topic.