Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dos.h>
- #include <stdio.h>
- int a = 0;
- int b = 0;
- int c = 1;
- void interrupt clocktick(){
- b++;
- outp(0x20, 0x20);
- outp(0x36, 0x43);
- }
- int main(void){
- /* set PIT mode*/
- outp(0x36, 0x43);
- outp(0x01,0x40); /* send low byte*/
- outp(0x00,0x40); /* send high byte*/
- setvect(0x08, clocktick);
- while(c == 1){
- printf("b%i\n", b);
- }
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement