home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / ASM / INTEXEC.ZIP / SAMPLE.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-19  |  942 b   |  34 lines

  1. //A sample calling program which calls intexec.asm
  2.  
  3. #include <iostream.h>
  4. #include <conio.h>
  5.  
  6. extern "C" execute(char,int,int,int,int,int);
  7.  
  8. void main(void)
  9. {
  10. unsigned int intno,AXVAL,BXVAL,CXVAL,DXVAL,FLAGVAL;
  11.  
  12. cout << "This program demonstrates to call any real mode interrupt in ";
  13. cout << "8086 assembly" << endl;
  14. cout << "Please Be Warned about the Interrupt Number you give" << endl;
  15. cout << "Press a key to continue" << endl;
  16. getch();
  17.  
  18.  
  19. cout << "Enter the value for AX: " << endl;
  20. cin >> hex >> AXVAL;
  21. cout << "Enter the value for BX: " << endl;
  22. cin >> hex >> BXVAL;
  23. cout << "Enter the value for CX: "  << endl;
  24. cin >> hex >> CXVAL;
  25. cout << "Enter the value for DX: " << endl;
  26. cin >> hex >> DXVAL;
  27. cout << "Enter the value for FLAGS: " << endl;
  28. cin >> hex >> FLAGVAL;
  29. cout << "Please Enter the Interrupt Number: " << endl;
  30. cin >> hex >> intno;
  31.  
  32. execute(intno&0x00ff,AXVAL,BXVAL,CXVAL,DXVAL,FLAGVAL);
  33. }
  34.