1 r=0:p=&h8e00:restore1020 2 reada$:iflen(a$)<2then10 3 ca(r)=p:fori=0tolen(a$)/2-1:c$=mid$(a$,i*2+1,2):c=val("&H"+c$):pokep,c:p=p+1:nexti:r=r+1:goto2 10 print"Enter slot number for the GR8STORM":inputs 20 ifs<0ors>3thenprint"Invalid slot number":stop 30 ifpeek(&hfcc1+s)=0then70 40 print"Enter subslot number for the GR8STORM in slot";s:inputss 50 ifss<0orss>3thenprint"Invalid subslot number":stop 60 sl=128+ss*4+s 70 poke&hfd9f,201:poke&hfd9a,201:poke&h8ffe,sl:print"Looking for GR8STORM in slot ";hex$(s);".";hex$(ss) 80 defusr=ca(0):a=usr(0):i0=peek(&h8ffc):i1=peek(&h8ffd):print"Values are: ";hex$(i0);"/";hex$(i1) 90 ifi0<>&hbfori1<>&hb5thenprint"Invalid chip ID":stop 100 p=0 101 poke&h8ffb,p\2:if(pand1)=0thendefusr=ca(1):a=usr(0) 110 callnetbload("http://www.gr8bit.ru:80/software/firmware/GR8NET/test-images/GR8BIT/gr8storm."+hex$(p),1):defusr=ca(2):pokeca(2)+2,&ha0+(pand1)*16:a=usr(0):ifpeek(&h8ffd)=0thenprint"Sector";p;"matches":goto150 120 print"Updating sector";p:'perform sector update 130 pokeca(3)+67,&h40+(pand1)*16:defusr=ca(3):a=usr(0):'erase sector 140 pokeca(4)+11,&h40+(pand1)*16:defusr=ca(4):a=usr(0):'program sector 150 ifp=31thenprint"Update finished":stopelsep=p+1:goto101 1020 data"F33AFE8F2640CD24003E023200603EAA3255553E013200603E5532AA4A3E023200603E9032555500002A004022FC8F3EF03200403AC1FC2640CD2400FBC9":'read chip ID 1030 data"F33AFE8F2640CD24003AFB8F3200602100401100A0010020EDB03AC1FC2640CD2400FBC9":'read 8k of data from chip into &HA000 1040 data"2100001100900100101ABE200C23130B78B120F5AF32FD8FC93E0118F8":'compare data 1050 data"F33AFE8F2640CD24003E023200603EAA3255553E013200603E5532AA4A3E023200603E803255553E023200603EAA3255553E013200603E5532AA4A3AFB8F320060210000363000007EBE20FC3AC1FC2640CD2400FBC9":'erase sector 1060 data"F33AFE8F2640CD24002100001100900100103E023200603EAA3255553E013200603E5532AA4A3E023200603EA03255553AFB8F3200601A770000BE20FD23130B78B120CE3AC1FC2640CD2400FBC9":'program sector 1070 data"X"