hi every one
this modefied flasher program
you can select four paterns
and four speed with only two inputs
can any one check it and tell me if itis ok or not
I noticed you used computed goto ("addwf pc,f") to obtain data from a look-up table. Unfortunately, "tabl2" crosses a page boundary and so the program will jump to the wrong "retlw k" position.
That is, tabl2 begins at 0DAh and ends at 10Ch. You can't allow the look-up table to cross the 0FFh-100h boundary, because instead of jumping to 100h, the program will end up at 000h (reset vector).
The easiest way is to move the table to near the start of memory, probably about 0x005 or so, so you avoid the interrupt and reset vectors. This avoids any paging problems, another option is to move it to the last 256 bytes, and set the paging bits accordingly when calling it.
To solve it, you have to locate the table to the start of a page to ensure it fits within a page. Use the ORG statement to move the table to location 100h.
Since the table is no longer at page 0, you have to initialize the PCLATH register to the right page. The value of the label "tabl2" will give its start position.