Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<dos.h>
- #include<iostream.h>
- #include <conio.h>
- long long A = 125;
- long long B = 0;
- void interrupt(*old)(...);
- void interrupt cmp_int(...)
- {
- cout << "Interrapt" << endl;
- _asm
- {
- lea si, A
- lea di, B
- mov ax, 0
- mov dx,[si]
- shl dx, 1
- mov[di], dx
- mov dx, 0
- mov dx,[si + 4]
- rol dx, 1
- mov[di + 4], dx
- }
- }
- void interrupt cmp_int1(...)
- {
- cout << "Interrapt" << endl;
- _asm
- {
- lea si, A
- lea di, B
- mov ax, 0
- mov dx,[si]
- shl dx, 1
- mov[di], dx
- mov dx, 0
- mov dx,[si + 4]
- rol dx, 1
- mov[di + 4], dx
- mov cx, 2
- mov[bp + 18], cx
- }
- }
- void main(void)
- {
- clrscr();
- int aa;
- aa = 1;
- old = getvect(0xf0);
- disable();
- setvect(0xf0, cmp_int);
- setvect(0, cmp_int1);
- enable();
- aa = aa / 0;
- geninterrupt(0xf0);
- cout << B << endl;
- getch();
- puts("v1=v2");
- setvect(0xf0, old);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement