| ??? 07/25/01 16:42 Read: times |
#13499 - RE: movc a,@a+PC ????????? |
The movc a,@a+PC is most often used to look up values in a table. In your case, the table is defined by the DB's and R7 is the item in the table to be returned, before jumping to the address named PLU20&P_SUFFIX . The code is called with a value in register R7. It uses that value (first moves it into A and then adds 3) to look up another value in the DB table below. I.e. if R7 contains 0, the code returns the first value in the table (28), if R7 contains 1 it returns thesecond value in the table (28), if R7 contains 8, it returns the ninth item in the table (29) etc. etc. The reason to add 3 to the value is that the table starts 3 bytes after the movc command (i.e. there is an l jmp command inbetween the movc and the start of the table). Hope this clears things up? |
| Topic | Author | Date |
| movc a,@a+PC ????????? | 01/01/70 00:00 | |
| RE: movc a,@a+PC ????????? | 01/01/70 00:00 | |
| RE: movc a,@a+PC ????????? | 01/01/70 00:00 | |
| RE: movc a,@a+PC ????????? | 01/01/70 00:00 | |
| RE: movc a,@a+PC ????????? | 01/01/70 00:00 | |
RE: movc a,@a+PC ????????? | 01/01/70 00:00 |



