futz
Active Member
I've run into a few strange things in MPLAB v8.00.
1. The editor doesn't handle wrapped lines properly. After much confusion, involving, among other things, the cursor jumping semi-randomly to the top of code for no reason, I finally ended up just widening the editor window out till the lines I wanted to work on didn't wrap.
2. In this code snip (part of a much larger program) I have to leave a blank line after the "bnc a_30" command. If I leave the blank line out it doesn't assemble correctly (reads the following "movlw 0x31" as a comment).
It is possible this is being caused by a programmer error further up in the code, but I sure can't see it. The program assembles and runs correctly as long as that blank line is there.
1. The editor doesn't handle wrapped lines properly. After much confusion, involving, among other things, the cursor jumping semi-randomly to the top of code for no reason, I finally ended up just widening the editor window out till the lines I wanted to work on didn't wrap.
2. In this code snip (part of a much larger program) I have to leave a blank line after the "bnc a_30" command. If I leave the blank line out it doesn't assemble correctly (reads the following "movlw 0x31" as a comment).
Code:
showa movlw pa_val ;send "PORTA = "
call strsend
movlw 0x08 ;set bitnum counter variable
movwf bitnum
movff PORTA,temp1 ;save PORTA value in temp1
a_loop rlcf temp1 ;rotate bit into carry
bnc a_30 ;is the bit set?
movlw 0x31 ;yes, rs_send $31
call rs_send
goto a_bump
a_30 movlw 0x30 ;rs_send $30
call rs_send
a_bump decfsz bitnum ;decrement counter
goto a_loop ;counter not zero, go again
movlw 0x0d ;rs_send CR
call rs_send
movlw 0x0a ;rs_send NL
call rs_send
return
Last edited: