home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 11 / 11.iso / m / m110 / 1.ddi / HLL / TC / GRASPTC.C next >
Encoding:
C/C++ Source or Header  |  1990-02-12  |  857 b   |  31 lines

  1. /*
  2.  *    GRASPTC -- program to demonstrate how to interface GRASP
  3.  *    with Turbo C version 1.0
  4.  *    You can ignore the "non-portable pointer assignment"
  5.  *    warning generated by the compiler.
  6.  */
  7.  
  8. #include <string.h>        /* include string funtions */
  9. #include <dos.h>        /* include interrupt support */
  10.  
  11. #define BIOSCALL 0x10
  12.  
  13. void Grasp(char *cmd_str);
  14.  
  15. main()
  16. {
  17.     Grasp("Pload Grasp,1");         /* load picture into buffer 1 */
  18.     Grasp("Pfade 0,1");             /* fade it onto the screen */
  19.     Grasp("Waitkey");               /* wait for user keystroke */
  20. }
  21.  
  22.  
  23. void Grasp(command)
  24. char *command;
  25. {
  26.     _CX = strlen(command);          /* CX = length of command */
  27.     _DX = command;                  /* ES:DX points to string */
  28.     _AH = 'G';                      /* do function 'G' */
  29.     geninterrupt(BIOSCALL);         /* perform the interrupt */
  30. }
  31.