dialog 5
Read Flash
Load Flash
Write Flash
Verify
Exit
begin:
option 1 backup 2 load 3 restore 4 verify 5 end
backup:
reset 1
wait 1600
if DEBUG == 0
echo The ECU might be bricked.
goto continue
endif 
echo Read Flash
getram 8000 8000
goto continue
load:
echo Load Flash
ldram 8000
goto continue
restore:
confirmdlg
if CONFIRM == 0
goto continue
endif
reset 1
wait 1600
if DEBUG == 0 
echo The ECU might be bricked.
goto continue
endif 
echo Write Flash
flashchk 8000
if FLASHSET == 0
echo flash not defined
goto continue
endif
erase 8000 8000
sprogram 8000 8000
cmpram 8000 8000
if CMPRAM == 0
echo Please power off/on the ECU and try again
endif
goto continue
verify:
if DEBUG == 0 
echo The ECU isnot in BDM mode.
goto continue
endif 
cmpram 8000 8000
continue:
goto begin
end:
