dialog 4
Read flash
Load Flash
Write Flash
Exit
begin:
option 1 read 2 load 3 write 4 end
read:
reset 1
wait 2000
if DEBUG == 0
echo Please try again
goto continue
endif 
getram flash
getram shadow
goto continue
load:
echo Please select flash file
ldram flash
echo Please select shadow file
ldram shadow
goto continue
write:
if DEBUG == 0
reset 1
wait 2000
endif
if DEBUG == 0
echo Please try again
goto continue
endif 
flashchk 0
if FLASHSET == 0
echo flash not detected, check connection.
goto continue
endif
flashchk f0000000
if FLASHSET == 0
echo flash not detected, check connection.
goto continue
endif
erase flash
sprogram flash
cmpram flash
sprogram shadow
cmpram shadow
continue:
goto begin
end: