OK. Now every things clear.
This is the table
241 00F0 0841 MOVF 0x41, 0
242 00F1 0008 RETURN
243 00F2 0782 ADDWF 0x2, 0x1
244 00F3 3400 RETLW 0
|
255 00FE 3433 RETLW 0x33
256 00FF 3438 RETLW 0x38 < -- end of the table
257 0100 2298 CALL 0x298
258 0101 0847 MOVF 0x47, 0
259 0102 3C02 SUBLW 0x2
It’s on the edge!!. I changed the code by adding some nops like this
And PIC is now dead. (When this happen I usually cry, now I can laugh.)
241 00F0 0841 MOVF 0x41, 0
242 00F1 0000 NOP <-
243 00F2 0000 NOP <-
244 00F3 0000 NOP <-
245 00F4 0008 RETURN
246 00F5 0782 ADDWF 0x2, 0x1
247 00F6 3400 RETLW 0
|
258 0101 3433 RETLW 0x33
259 0102 3438 RETLW 0x38
260 0103 229B CALL 0x29b
261 0104 0847 MOVF 0x47, 0
262 0105 3C02 SUBLW 0x2
Thank u guys for explaining this. I have learned my lesson.
------
8bit = 'b'11111111 = .255 = FFh
You both talking about 0x1ff ??? is it the second page ?
-----
I am using MPLAB version 6. Maybe new versions can detect this error.