CONST SPRITELEN = 1000
DIM Sprite(SPRITELEN) AS INTEGER
'SCREEN 12
'COLOR 10
' ножки
'LINE (100, 100)-(80, 118)
'LINE (100, 100)-(120, 118)
'антенна
'LINE (100, 100)-(100, 80)
'CIRCLE (99, 75), 5, 12
' эллипс
'COLOR 15
'CIRCLE (100, 100), 30, , , , .3
'PAINT (101, 101), 9, 15
'3 иллюм.
'CIRCLE (85, 100), 3, 12
'CIRCLE (100, 100), 3, 12
'CIRCLE (115, 100), 3, 12
' создаём файл
'OPEN "disk.spr" FOR BINARY AS #1 LEN = LEN(Sprite(1))
' считываем картинку в массив
'GET (69, 70)-(131, 120), Sprite
' записываем массив в файл
'FOR i = 0 TO SPRITELEN
' PUT #1, , Sprite(i)
'NEXT
' закрываем файл
'CLOSE #1
' читаем файл
'SHARED Sprite() AS INTEGER
'OPEN "disk.spr" FOR BINARY AS #1 LEN = LEN(Sprite(1))
'GET (69, 70)-(131, 120), Sprite
'FOR i = 0 TO SPRITELEN
' GET #1, , Sprite(i)
'NEXT
'CLOSE #1
'SHARED Sprite() AS INTEGER
'PUT (200, 200), Sprite
PUT (300, 300), Sprite
OldX = 69
OldY = 70
'PUT (OldX, OldY), Sprite, XOR
END

SUB LS
SHARED Sprite() AS INTEGER
OPEN "disk.spr" FOR BINARY AS #1 LEN = LEN(Sprite(1))
FOR i = 0 TO SPRITELEN
 GET #1, , Sprite(i)
NEXT
CLOSE #1
END SUB

SUB SS (x AS INTEGER, y AS INTEGER)
SHARED Sprite() AS INTEGER
PUT (100, 100), Sprite
END SUB

