Showing posts with label scan. Show all posts
Showing posts with label scan. Show all posts

C Program to Display SCAN and ASCII Codes of Keys on Keyboard Using 8086 Interrupt

output of C program source code to find scan code and ASCII code of any key pressed on keyboard asci ascii A 65 97 32 30 keyboard code using 8086 interrupt 16 0x16 16h INT16 int86 int86x
Output (ASCII and SCAN code) when a is pressed
This program displays SCAN code and ASCII code of any key pressed on the keyboard. We use inregs is made zero in the program. Then interrupt 16h is called using int86() function in dos.h. The arguments are interrupt number (in hexadecimal ; in C 0x16) pointer to input register and pointer to output register.