DECLARE FUNCTION EXIST% (file$)
DECLARE SUB hold (z!)
'$INCLUDE: 'future.bi'
SCREEN 13
CLS
INPUT "BMP"; bmp$
INPUT "X"; x1
INPUT "Y"; y1
CLS
loadbmp bmp$ + ".bmp"
OPEN bmp$ + ".b" FOR OUTPUT AS #1
PRINT #1, x1; y1
FOR y = 1 TO y1
FOR x = 1 TO x1
PRINT #1, POINT(x - 1, y - 1); " ";
NEXT
PRINT #1, ""
NEXT
CLOSE
hold 1: CLS
OPEN bmp$ + ".b" FOR INPUT AS #1
INPUT #1, bheight%, blength%
FOR y% = 1 TO blength%
FOR x% = 1 TO bheight%
INPUT #1, bcol%
PSET (x%, y%), bcol%
NEXT: NEXT
CLOSE : END

FUNCTION EXIST% (file$)
FF = FREEFILE
OPEN file$ FOR RANDOM AS #FF
IF LOF(FF) = 0 THEN
EXIST = 0
CLOSE #FF
KILL file$
PRINT file$ + " existiert nicht!"
ELSE EXIST = -1
END IF
CLOSE #FF
END FUNCTION

SUB hold (z)
t! = TIMER
DO: LOOP UNTIL t! + z < TIMER
END SUB

