DECLARE FUNCTION crc! (a AS INTEGER)
INPUT "PIC file name"; ff$

CLS
SCREEN 13
OPEN "B", #1, ff$
SEEK #1, 1
read$ = INPUT$(2, #1)
xx = ASC(LEFT$(read$, 1)) + ASC(RIGHT$(read$, 1))
SEEK #1, 3
read$ = INPUT$(2, #1)
yy = ASC(LEFT$(read$, 1)) + ASC(RIGHT$(read$, 1))
y = 0
x = 0
FOR i = 1 TO LOF(1)
cl = ASC(INPUT$(1, #1))
LINE (x, yy - y)-(x, yy - y), cl
x = x + 1
IF (x > xx) THEN
y = y + 1
x = 0
END IF
NEXT
CLOSE #1

FUNCTION crc (a AS INTEGER)
IF (a < 0) THEN crc = 0 ELSE crc = a
END FUNCTION

