home *** CD-ROM | disk | FTP | other *** search
- ' ========================= SCR1BITS.BAS ==================================
- ' Quick Basic 4.5
- ' Copyright 1989 - Frederick Volking
- ' All Rights released to public domain by original author on 12/01/89
- '
- ' =====================================================================
- '
- ' This program displays the bit-map for a 16x16 pixel image stored
- ' with the graphics GET image command for Screen 1 - CGA color.
- '
- ' This program requires the function BITON.BAS be merged with it.
- '
- ' ==================================================================
- ' Author: Frederick Volking
- ' Contact: (415)952-3450 [home] (415)378-4640 [work]
- ' USPO Mail: 425 Larch Avenue - South San Francisco, CA 94080
- ' EchoMail: ANY Basic conference (I try to read them all)
- ' Library At: QBCentral BBS - Vancouver Washington (206)892-7500
- ' ==================================================================
- DEFINT A-Z
- CLS
- SCREEN 1
- IntsNeeded = 34
- MaxClrs = 3
- DIM A(1 TO IntsNeeded)
-
- FOR Clr = 1 TO MaxClrs
- CLS
- LINE (0, 0)-(15, 15), Clr, B
- LINE (0, 0)-(15, 15), Clr
- GET (0, 0)-(15, 15), A
- LOCATE 1, 10: PRINT "Integers Used = "; IntsNeeded
- LOCATE 2, 10: PRINT "Array Element 1 = "; A(1)
- LOCATE 3, 10: PRINT "Array Element 2 = "; A(2)
- LOCATE 4, 10: PRINT "Color = "; Clr
- PRINT
-
- FOR C = 3 TO IntsNeeded STEP 2
-
- FOR D = 0 TO 1
- B = C + D
- FOR Bit = 1 TO 8
- IF (BitOn(Bit, A(B))) THEN PRINT "1"; ELSE PRINT "0";
- NEXT
- PRINT " ";
- FOR Bit = 9 TO 16
- IF (BitOn(Bit, A(B))) THEN PRINT "1"; ELSE PRINT "0";
- NEXT
- PRINT " ";
- NEXT
-
- PRINT
- NEXT
-
- DO: K$ = INKEY$: LOOP WHILE K$ = ""
- IF K$ = CHR$(27) THEN
- SCREEN 0, 0
- CLS
- END
- END IF
- NEXT
-
- SCREEN 0, 0
- CLS
- END