Assembly PIC18F97J60增量FSR不影响INDF
为什么显示“B”而不是“A”?我已经减小了FSR0指针。我已经解决了这个问题,我没有设置FSR0的地址,因为我认为系统会设置它。在我将FSR0的addr设置为0x9EF后,它现在开始工作了,谢谢大家的帮助:)你有一个模拟器可以单步执行你的代码吗?也许你的Assembly PIC18F97J60增量FSR不影响INDF,assembly,microcontroller,pic18,Assembly,Microcontroller,Pic18,为什么显示“B”而不是“A”?我已经减小了FSR0指针。我已经解决了这个问题,我没有设置FSR0的地址,因为我认为系统会设置它。在我将FSR0的addr设置为0x9EF后,它现在开始工作了,谢谢大家的帮助:)你有一个模拟器可以单步执行你的代码吗?也许你的LCD8SendData函数有一个bug。使用调试器验证每条指令的结果。 ; point FSR0 to address 0x0 and set INDF to 'A' movlw 0x0 movwf FSR0
LCD8SendData
函数有一个bug。使用调试器验证每条指令的结果。
; point FSR0 to address 0x0 and set INDF to 'A'
movlw 0x0
movwf FSR0
movlw A'A'
movwf INDF0
; increment FSR0, then set new INDF to 'B'
incf FSR0
movlw A'B'
movwf INDF0
; decrement FSR0, then show the new INDF to LCD, it should show the letter 'A', but 'B' is shown.
decf FSR0
movf INDF0, 0
call LCD8SendData