Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dos.h>
- #include <stdio.h>
- #include <conio.h>
- #define IRQ1_OFF outp(0x21,0x02)
- #define IRQ1_ON outp(0x21,0x00)
- void buf_wyj(void);
- void main(void)
- {
- unsigned char scan_code;
- IRQ1_OFF;
- clrscr();
- printf("Nacisnij dowolny klawisz ESC-Zakonczenie.\n\n\n");
- do
- {
- buf_wyj();
- scan_code=inp(0x60);
- printf("\t%d",scan_code);
- }
- while (scan_code!=0x01);
- IRQ1_ON;
- }
- void buf_wyj(void)
- {
- unsigned char rej_stanu;
- do
- rej_stanu=inp(0x64);
- while((rej_stanu & 0x01)!=0x01);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement