📄 main.lst
字号:
00d8 2703 [3/1] BEQ *+5 ;abs = 00dd
200: ErrorCount++;
00da 18628e [4] INCW 14,SP
201:
202: /* write to the EEE */
203: EEE_Int[0] = 0x1001;
00dd cc1001 [2] LDD #4097
00e0 160000 [4] JSR main:0x01c4
204: /* and read it */
205: temp = EEE_Int[0]; /* this shows that with the EEE disabled it is still possible */
206: /* to write to the EEE-RAM region. However the value is volatile */
207:
208:
209:
210: /* enable writes of EEE records */
211: if (FTM.fstat.byte == 0x80) /* ensure that FTM is operational and error free */
00e3 f60000 [3] LDAB FTM:6
00e6 c180 [1] CMPB #128
00e8 261c [3/1] BNE *+30 ;abs = 0106
212: {
213: ftmStat = LaunchFlashCommand(1 ,ENABLE_EEPROM_EMULATION, 0, 0, 0, 0, 0, 0);
00ea c601 [1] LDAB #1
00ec 37 [2] PSHB
00ed c613 [1] LDAB #19
00ef 37 [2] PSHB
00f0 c7 [1] CLRB
00f1 37 [2] PSHB
00f2 87 [1] CLRA
00f3 3b [2] PSHD
00f4 3b [2] PSHD
00f5 3b [2] PSHD
00f6 3b [2] PSHD
00f7 4a000000 [7] CALL LaunchFlashCommand,PAGE(LaunchFlashCommand)
00fb 1b8b [2] LEAS 11,SP
00fd 6b80 [2] STAB 0,SP
214: if ((ftmStat & (ACCERR|FPVIOL|MGSTAT1|MGSTAT0))) /* ensure no errors occured during activation */
00ff 0f803307 [4] BRCLR 0,SP,#51,*+11 ;abs = 010a
215: Error(ftmStat);
0103 e680 [3] LDAB 0,SP
0105 21 [1] SKIP1
216: }
217: else
218: Error(0);
0106 c7 [1] CLRB
0107 160000 [4] JSR main:0x01d2
219:
220:
221: /* update the EEE */
222: EEE_Int[0] = 0x2002;
010a cc2002 [2] LDD #8194
010d 160000 [4] JSR main:0x01c4
223: /* and read it while the EEE system is active i.e. while the record is being updated */
224: temp = EEE_Int[0]; /* notice how the variable is stored in EEE-Flash (bottom Memory window) */
225:
226: /* turn off the EEE record writing */
227: ftmStat = LaunchFlashCommand(1 ,DISABLE_EEPROM_EMULATION, 0, 0, 0, 0, 0, 0);
0110 57 [1] ASRB
0111 37 [2] PSHB
0112 c614 [1] LDAB #20
0114 37 [2] PSHB
0115 c7 [1] CLRB
0116 37 [2] PSHB
0117 87 [1] CLRA
0118 3b [2] PSHD
0119 3b [2] PSHD
011a 3b [2] PSHD
011b 3b [2] PSHD
011c 4a000000 [7] CALL LaunchFlashCommand,PAGE(LaunchFlashCommand)
0120 1b8b [2] LEAS 11,SP
0122 6b80 [2] STAB 0,SP
228: if ((ftmStat & (ACCERR|FPVIOL|MGSTAT1|MGSTAT0)))
0124 0f803303 [4] BRCLR 0,SP,#51,*+7 ;abs = 012b
229: Error(ftmStat);
0128 160000 [4] JSR main:0x01cd
230:
231: /* can still read and write the EEE RAM */
232: EEE_Int[0] = 0x3003; /* notice how the EEE-FLASH remains unaltered */
012b cc3003 [2] LDD #12291
012e 160000 [4] JSR main:0x01c4
233: /* and read it */
234: temp = EEE_Int[0];
235: EEE_Int[0] = 0x4004; /* notice how the tag count (in the DATA1 window - expand the FTM) */
0131 ce4004 [2] LDX #16388
0134 7e0000 [3] STX EEE_Int
236: /* remains at one: only one value has to be updated */
237: /* and read it */
238: temp = EEE_Int[0];
0137 fd0000 [3] LDY EEE_Int
013a 6d81 [2] STY 1,SP
239: EEE_Int[0] = 0x5005;
013c cd5005 [2] LDY #20485
013f 7d0000 [3] STY EEE_Int
240: /* and read it */
241: temp = EEE_Int[0];
0142 fc0000 [3] LDD EEE_Int
0145 6c81 [2] STD 1,SP
242: EEE_Int[0] = 0x6006;
0147 cc6006 [2] LDD #24582
014a 7c0000 [3] STD EEE_Int
243: /* and read it */
244: temp = EEE_Int[0];
014d fc0000 [3] LDD EEE_Int
0150 6c81 [2] STD 1,SP
245:
246: /* the tag counter should be one because only one record needs updating */
247: temp = FTM.etag;
0152 fc0000 [3] LDD FTM:12
0155 6c81 [2] STD 1,SP
248:
249: /* and now back up the data here */
250: /* enable writes of EEE records */
251: ftmStat = LaunchFlashCommand(1 ,ENABLE_EEPROM_EMULATION, 0, 0, 0, 0, 0, 0);
0157 cc1301 [2] LDD #4865
015a 37 [2] PSHB
015b 36 [2] PSHA
015c c7 [1] CLRB
015d 37 [2] PSHB
015e 87 [1] CLRA
015f 3b [2] PSHD
0160 3b [2] PSHD
0161 3b [2] PSHD
0162 3b [2] PSHD
0163 4a000000 [7] CALL LaunchFlashCommand,PAGE(LaunchFlashCommand)
0167 1b8b [2] LEAS 11,SP
0169 6b80 [2] STAB 0,SP
252: if ((ftmStat & (ACCERR|FPVIOL|MGSTAT1|MGSTAT0)))
016b 0f803302 [4] BRCLR 0,SP,#51,*+6 ;abs = 0171
253: Error(ftmStat);
016f 075c [4] BSR *+94 ;abs = 01cd
254:
255: /* wait for the EEE store to be completed */
256: while(FTM.fstat.bit.mgbusy || FTM.etag ){ /* wait for EEE to write*/
0171 1e000008fb [5] BRSET FTM:6,#8,*+0 ;abs = 0171
0176 fc0000 [3] LDD FTM:12
0179 26f6 [3/1] BNE *-8 ;abs = 0171
257: } /* notice how only the final value (0x6006) is written to EEE_Flash as this is the latest */
258: /* value. the other changes can be ignored */
259:
260: /* disable the EEE */
261: ftmStat = LaunchFlashCommand(1 ,DISABLE_EEPROM_EMULATION, 0, 0, 0, 0, 0, 0);
017b cc1401 [2] LDD #5121
017e 37 [2] PSHB
017f 36 [2] PSHA
0180 c7 [1] CLRB
0181 37 [2] PSHB
0182 87 [1] CLRA
0183 3b [2] PSHD
0184 3b [2] PSHD
0185 3b [2] PSHD
0186 3b [2] PSHD
0187 4a000000 [7] CALL LaunchFlashCommand,PAGE(LaunchFlashCommand)
018b 1b8b [2] LEAS 11,SP
018d 6b80 [2] STAB 0,SP
262: if ((ftmStat & (ACCERR|FPVIOL|MGSTAT1|MGSTAT0)))
018f 0f803302 [4] BRCLR 0,SP,#51,*+6 ;abs = 0195
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -