home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / qb2 / pro20 / hpprnscr.bas < prev    next >
Encoding:
BASIC Source File  |  1988-08-26  |  1.2 KB  |  54 lines

  1.  
  2. '
  3. '
  4. SUB HerculesPrintScreen STATIC
  5.  
  6.    DEFINT A-Z
  7.  
  8.    'Print screen utility for Hercules (tm) and compatible video cards
  9.    'and HP LasetJet family and strictly compatible printers.
  10.  
  11.    DEF SEG = &HB000       'set segment pointer to begining of screen 3 page 0
  12.                                                               
  13.    OPEN "LPT1:BIN" FOR RANDOM AS 1
  14.    'WIDTH "LPT1:", 255
  15.  
  16.    PRINT #1, CHR$(27) + "E";      'reset printer
  17.    PRINT #1, CHR$(27) + "*t100R"; 'resolution = 100dpi
  18.    PRINT #1, CHR$(27) + "&a5C";   'move cursor to column 5
  19.    PRINT #1, CHR$(27) + "*r1A";   'start raster grapics
  20.   
  21.    SCREEN 3, , 0, 1
  22.  
  23.    FOR y = 0 TO &H1E3C STEP &H5A
  24.      
  25.       FOR m = 0 TO 3
  26.  
  27.          'FOR d = 0 TO 1
  28.  
  29.             PRINT #1, CHR$(27) + "*b90W";
  30.            
  31.             FOR x = 0 TO &H59
  32.            
  33.                PRINT #1, CHR$(PEEK(y + x + (m * &H2000)));
  34.                POKE (x + y + (m * &H2000)) + 32768, PEEK(y + x + (m * &H2000))
  35.            
  36.             NEXT x
  37.         
  38.          'NEXT d
  39.  
  40.       NEXT m
  41.   
  42.    NEXT y
  43.  
  44.    PRINT #1, CHR$(27) + "*rB"; 'end raster graphics
  45.    PRINT #1, CHR$(27) + "E";   'reset printer and send FF
  46.    PRINT #1, CHR$(12)
  47.   
  48.    CLOSE 1
  49.  
  50.    SCREEN 3, , 0
  51.  
  52. END SUB
  53.  
  54.