cls
dialog 11
Connect (Enter to DEBUG ON)
Read INT EEPROM
Read EXT EEPROM
Read Flash (9S12XG384)
Read Flash (9S12XG512)
Load Files
Write INT EEPROM
Write EXT EEPROM
Write Flash (9S12XG384)
Write Flash (9S12XG512)
Exit
begin:
option 1 connect 2 readieep 3 readeeep 4 read384 5 read512 6 loadfile 7 writeieep  8 writeeeep  9 write384 10 write512 11 end
connect:
prompt 0
if DEBUG == 1
echo Already in DEBUG ON. Power cycle if needed.
goto continue
endif
detect
wait 2000
if DEBUG == 0
echo Check your connection or you need to scan algorithem
endif
goto continue
readieep:
getram INEEPROM
goto continue
readeeep:
getram EXEEPROM
goto continue
read384:
getram 780000 20000
getram 7c0000 40000
goto continue
read512:
getram PFlash
goto continue
loadfile:
echo Load internal EEPROM file
ldram INEEPROM
echo Load external EEPROM file (cancel if not exist)
ldram EXEEPROM
echo Load Flash files (9S12XG384 load the first file)
ldram PFlash
echo Load second file for 9S12XG384 (256KB) (cancel if not exist)
ldram 7c0000
goto continue
writeieep:
setram INEEPROM
goto continue
writeeeep:
sprogram EXEEPROM
goto continue
write384:
confirmdlg
if CONFIRM == 0
goto continue
endif
erase 780000 20000
sprogram 780000 20000
cmpram 780000 20000
erase 7c0000 40000
sprogram 7C0000 40000
cmpram 7c0000 40000
goto continue
write512:
confirmdlg
if CONFIRM == 0
goto continue
endif
erase pflash
sprogram pflash
cmpram pflash
goto continue
continue:
goto begin
end:
