home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_01_06 / 1n06058b < prev    next >
Text File  |  1990-08-24  |  839b  |  35 lines

  1. 'QuickBASIC 4.5 version of Print Screen BIOS call'
  2. '
  3. 'NOTE: The Quick Library QB.QLB must be loaded
  4. 'with QuickBASIC, and program must be compiled
  5. 'with QB.LIB to use CALL INTERRUPT.
  6.  
  7. DIM status AS INTEGER
  8. DIM inregs%(7), outregs%(7)
  9.  
  10.  
  11. 'Execute BIOS interrupt #5, no register
  12. '    parameters needed
  13.  
  14. CALL interrupt(&H5, inregs%(), outregs%())
  15.  
  16.  
  17. 'get Print Screen status byte at 0050:0000
  18.  
  19. DEF SEG = &H50      'point to segment 0050
  20. status = PEEK(0)    'and get byte at offset 0
  21.  
  22. IF status = 1 THEN  'Print Screen interrupt in use
  23.     PRINT "Screen printing in progress."
  24.  
  25. ELSEIF status > 1 THEN  'Print Screen error
  26.     PRINT "Error - could not print the screen."
  27.  
  28. END IF          'default to status=0,
  29.                 '       Print Screen successful
  30.  
  31. DEF SEG         'point back to BASIC data area
  32.  
  33. END
  34.  
  35.