我为PIC16F870写了一个大约10年前的项目,这是一个完美的工作。当然,我现在使用的是MPASM的最后版本,V5.72与旧的源代码。ASM文件和新的MPASM,我遇到了一个问题:我可以编译,但编程后它已经不工作了。经过几个星期的考验,我是。当我尝试从AdvWF PCL、FDT DEST1、Dest2、Dest3……在Dest1=1,Dest2=4,Dest3=6toADWWF PCL,FRTLW DEST1RESLW DEST2RESLW DEST3……时,改变表读取功能。查看程序内存,我看到“ReLLW DEST1”被正确编译为0x3401,而“DestDest1”被编译为0x001。我弄错了吗?
以上来自于百度翻译
以下为原文
I am refreshing a project written about 10 years ago for PIC16F870 and perfectly working.
Of course I am now using the last version of MPASM, v5.72
With old source .asm file and new MPASM I got a problem: I was able to compile, but after programming it did not work anymore.
After weeks of trials, I was going to give up while I tried to change a table read func
tion from
addwf PCL,f
dt dest1, dest2, dest3...
where dest1=1, dest2=4, dest3=6
to
addwf PCL,f
retlw dest1
retlw dest2
retlw dest3...
and it worked!
Looking at the program memory I saw that " retlw dest1" is correctly compiled as 0x3401, while " dt dest1" is compiled as 0x0001. Have I made any mistake?