Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio.h>
- #include <dos.h>
- #include <stdlib.h>
- int main(){
- clrscr();
- union REGS rg,reg;
- for(;;){
- asm mov ah,0x00
- asm int 0x16
- asm mov reg,ax
- asm mov ah,0x02
- asm int 0x16
- asm mov rg,ax
- if(rg.h.al==32){
- if(rg.h.al==2 || rg.h.al==1 || rg.h.al==64)
- printf("%c ",reg.h.al);
- else printf("Numlock pressed \n");
- } else {
- printf("%c ",reg.h.al);
- }
- if(reg.h.ah==1)
- break;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement