home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / baswiz19.zip / BW$BAS.ZIP / GN2PRINT.BAS < prev    next >
BASIC Source File  |  1993-01-29  |  1KB  |  36 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        BASWIZ  Copyright (c) 1990-1993  Thomas G. Hanlin III         |
  4. '   |                                                                      |
  5. '   |                      The BASIC Wizard's Library                      |
  6. '   |                                                                      |
  7. '   +----------------------------------------------------------------------+
  8.  
  9.    DECLARE FUNCTION GN2GetPel% (BYVAL X%, BYVAL Y%)
  10.    DECLARE FUNCTION Power2I% (BYVAL PowerOf2 AS INTEGER)
  11.  
  12.    DEFINT A-Z
  13.  
  14. SUB GN2Print (Device$)
  15.    Handle = FREEFILE
  16.    OPEN Device$ FOR OUTPUT AS Handle
  17.    WIDTH #Handle, 255
  18.    PRINT #Handle, CHR$(27); "3"; CHR$(24);
  19.    FOR Row = 0 TO 639 STEP 8
  20.       St$ = ""
  21.       PRINT #Handle, CHR$(27); "K"; CHR$(224); CHR$(1);
  22.       FOR Col = 0 TO 479
  23.          Posn = 0
  24.          FOR RowOfs = 0 TO 7
  25.             IF GN2GetPel(Col, Row + RowOfs) THEN
  26.                Posn = Posn + Power2I%(7 - RowOfs)
  27.             END IF
  28.          NEXT
  29.          St$ = St$ + CHR$(Posn)
  30.       NEXT
  31.       PRINT #Handle, St$
  32.    NEXT
  33.    PRINT #Handle, CHR$(27); "2"; CHR$(12);
  34.    CLOSE Handle
  35. END SUB
  36.