Advertisement
bartek27210

1

May 22nd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <dos.h>
  2. #include <stdio.h>
  3. #include <conio.h>
  4. #define IRQ1_OFF outp(0x21,0x02)
  5. #define IRQ1_ON outp(0x21,0x00)
  6. void buf_wyj(void);
  7. void main(void)
  8. {
  9.  unsigned char scan_code;
  10.   IRQ1_OFF;
  11.   clrscr();
  12.   printf("Nacisnij dowolny klawisz                        ESC-Zakonczenie.\n\n\n");
  13.   do
  14.   {
  15.    buf_wyj();
  16.    scan_code=inp(0x60);
  17.    printf("\t%d",scan_code);
  18.   }
  19.  while (scan_code!=0x01);
  20.  IRQ1_ON;
  21. }
  22.  
  23. void buf_wyj(void)
  24. {
  25. unsigned char rej_stanu;
  26.  
  27.  do
  28.   rej_stanu=inp(0x64);
  29.  while((rej_stanu & 0x01)!=0x01);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement