DECLARE SUB putline (count!)
DECLARE SUB help ()
DIM mouse(1 TO 100) AS INTEGER
DIM mask(1 TO 100) AS INTEGER
DIM SHARED x AS INTEGER
DIM SHARED y AS INTEGER
DIM SHARED c AS INTEGER
DIM SHARED r AS INTEGER
1 CLS
 help
 SCREEN 12
2 CLS
LINE (3, 8)-(17, 22), 8, BF
LINE (10, 10)-(10, 20)
LINE (5, 15)-(15, 15)
GET (3, 8)-(17, 22), mouse
PUT (3, 8), mouse, XOR
LOCATE 2, 2
PRINT "X - Exit"
x = 320: y = 240
LINE (0, 0)-(639, 479), 1, B
LINE (50, 40)-(590, 400), 8, BF
LINE (100, 1)-(110, 15), 15, BF
LINE (111, 1)-(122, 15), 14, BF
LINE (123, 1)-(134, 15), 13, BF
LINE (135, 1)-(146, 15), 12, BF
LINE (147, 1)-(158, 15), 11, BF
LINE (159, 1)-(170, 15), 10, BF
LINE (171, 1)-(182, 15), 9, BF
LINE (183, 1)-(194, 15), 8, BF
LINE (195, 1)-(206, 15), 7, BF
LINE (207, 1)-(218, 15), 6, BF
LINE (219, 1)-(230, 15), 5, BF
LINE (231, 1)-(242, 15), 4, BF
LINE (243, 1)-(254, 15), 3, BF
LINE (255, 1)-(266, 15), 2, BF
LINE (267, 1)-(278, 15), 1, BF
LOCATE 2, 14: PRINT "fd sa ][ po iu yt re wq"
count = 0
c = 15: r = 7
DO
LINE (70, 430)-(110, 470), 15, B
LINE (71, 431)-(109, 469), c, BF
n$ = ""
GET (x + 7, y - 7)-(x + 21, y + 7), mask
PUT (x + 7, y - 7), mouse, PSET
PUT (x + 7, y - 7), mask, PSET
n$ = INKEY$
IF n$ = "4" THEN x = x - 1: putline (count)
IF n$ = "6" THEN x = x + 1: putline (count)
IF n$ = "8" THEN y = y - 1: putline (count)
IF n$ = "2" THEN y = y + 1: putline (count)
IF n$ = "3" THEN x = x + 1: y = y + 1: putline (count)
IF n$ = "7" THEN x = x - 1: y = y - 1: putline (count)
IF n$ = "1" THEN x = x - 1: y = y + 1: putline (count)
IF n$ = "9" THEN x = x + 1: y = y - 1: putline (count)
IF n$ = "5" THEN IF (x + 14) < 590 AND (y + 14) < 400 AND x > 50 AND y > 40 AND r >= 1 THEN CIRCLE (x + 14, y), r, c
IF n$ = " " THEN IF count = 1 THEN count = 0 ELSE count = 1
IF count = 1 THEN LOCATE 28, 2: PRINT "Line" ELSE LOCATE 28, 2: PRINT "Plot"
IF n$ = "q" OR n$ = "Q" THEN c = 0
IF n$ = "w" OR n$ = "W" THEN c = 1
IF n$ = "e" OR n$ = "E" THEN c = 2
IF n$ = "r" OR n$ = "R" THEN c = 3
IF n$ = "t" OR n$ = "T" THEN c = 4
IF n$ = "y" OR n$ = "Y" THEN c = 5
IF n$ = "u" OR n$ = "U" THEN c = 6
IF n$ = "i" OR n$ = "I" THEN c = 7
IF n$ = "o" OR n$ = "O" THEN c = 8
IF n$ = "p" OR n$ = "P" THEN c = 9
IF n$ = "{" OR n$ = "[" THEN c = 10
IF n$ = "]" OR n$ = "}" THEN c = 11
IF n$ = "a" OR n$ = "A" THEN c = 12
IF n$ = "s" OR n$ = "S" THEN c = 13
IF n$ = "d" OR n$ = "D" THEN c = 14
IF n$ = "f" OR n$ = "F" THEN c = 15
IF n$ = "-" AND r >= 0 THEN r = r - 1
IF n$ = "+" THEN r = r + 1
IF n$ = "c" OR n$ = "C" THEN GOTO 2
IF n$ = "h" OR n$ = "H" THEN GOTO 1
LOOP UNTIL n$ = "X" OR n$ = "x"

SUB help
SCREEN 0
COLOR 11
PRINT "████████████████████████████████████████████████████████████████████████████████"
PRINT "█                   Довольно простой графический редактор.                     █"
PRINT "█h - помощь; Q - } - цвета от 1 до 12 соответственно;  A - F - цвета 13 - 16   █"
PRINT "█+ / - - увеличить / уменьшить радиус кисти; C - очистить экран; X - Выход     █"
PRINT "█1-9 - перемещать курсор; 5 - ставить точку; ПРОБЕЛ - рисовать линию или точку.█"
PRINT "█Большая часть этой прокраммы составлена ночью. если кто=нибудь обнаружит глюки█"
PRINT "█или баги, просьба написать по e-mail: fotolux@zaural.ru буду благодарен.      █"
PRINT "█                                                                 Автор: W!W!W!█"
PRINT "████████████████████████████████████████████████████████████████████████████████"
DO: LOOP UNTIL INKEY$ <> ""
END SUB

SUB putline (count)
 IF count = 1 THEN IF (x + 21) < 590 AND (y + 7) < 400 AND (x + 7) > 50 AND (y - 7) > 40 AND r >= 0 THEN CIRCLE (x + 14, y), r, c
END SUB

