Gayan Soyza Active Member May 15, 2018 #1 Evertime when I add my assembly code it will uploading with messed up.How do you upload nicely aligned code? Code: Do_UP movlw .10 movwf Hold_Time incf Character,F movf Character,W xorlw .94 btfss STATUS,Z goto Do_UP_Select clrf Character Do_UP_Select movf Character,W call Load_Char call Adjust_FSR ; Do_Check_Up_Rel btfsc PORTB,4 goto Text_Key_Check btfss Flag_Register,End_Frame goto $-1 bcf Flag_Register,End_Frame decfsz Hold_Time,F goto Do_Check_Up_Rel goto Do_UP
Evertime when I add my assembly code it will uploading with messed up.How do you upload nicely aligned code? Code: Do_UP movlw .10 movwf Hold_Time incf Character,F movf Character,W xorlw .94 btfss STATUS,Z goto Do_UP_Select clrf Character Do_UP_Select movf Character,W call Load_Char call Adjust_FSR ; Do_Check_Up_Rel btfsc PORTB,4 goto Text_Key_Check btfss Flag_Register,End_Frame goto $-1 bcf Flag_Register,End_Frame decfsz Hold_Time,F goto Do_Check_Up_Rel goto Do_UP
P Pommie Well-Known Member Most Helpful Member May 15, 2018 #2 I copy the code into notepad++ before posting here, Code: Do_UP movlw .10 movwf Hold_Time incf Character,F movf Character,W xorlw .94 btfss STATUS,Z goto Do_UP_Select clrf Character Do_UP_Select movf Character,W call Load_Char call Adjust_FSR ; Do_Check_Up_Rel btfsc PORTB,4 goto Text_Key_Check btfss Flag_Register,End_Frame goto $-1 bcf Flag_Register,End_Frame decfsz Hold_Time,F goto Do_Check_Up_Rel goto Do_UP I think it's set to convert tabs to spaces which is why it works. But, every now and then it still messes up. Mike. Can one of the site technical guys tell me what font the code box uses? Maybe setting Notepad++ to the same font will fix it.
I copy the code into notepad++ before posting here, Code: Do_UP movlw .10 movwf Hold_Time incf Character,F movf Character,W xorlw .94 btfss STATUS,Z goto Do_UP_Select clrf Character Do_UP_Select movf Character,W call Load_Char call Adjust_FSR ; Do_Check_Up_Rel btfsc PORTB,4 goto Text_Key_Check btfss Flag_Register,End_Frame goto $-1 bcf Flag_Register,End_Frame decfsz Hold_Time,F goto Do_Check_Up_Rel goto Do_UP I think it's set to convert tabs to spaces which is why it works. But, every now and then it still messes up. Mike. Can one of the site technical guys tell me what font the code box uses? Maybe setting Notepad++ to the same font will fix it.
DerStrom8 Super Moderator May 16, 2018 #3 Pommie said: Can one of the site technical guys tell me what font the code box uses? Maybe setting Notepad++ to the same font will fix it. Click to expand... I believe it's Consolas.
Pommie said: Can one of the site technical guys tell me what font the code box uses? Maybe setting Notepad++ to the same font will fix it. Click to expand... I believe it's Consolas.
Gayan Soyza Active Member May 16, 2018 #4 Hi Mike, I downloaded and installed notepad++. I did your method & it worked nicely. Thanks. Code: ;------------------------------------------------------------- Sec_Adj_Mode bcf PORTA,7 ; CS/ = 0 movlw .8 ; digit H10 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1 bcf PORTA,7 ; CS/ = 0 movlw .7 ; digit H1 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 bcf PORTA,7 ; CS/ = 0 movlw .6 ; digit M10 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1 bcf PORTA,7 ; CS/ = 0 movlw .5 ; digit M1 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1
Hi Mike, I downloaded and installed notepad++. I did your method & it worked nicely. Thanks. Code: ;------------------------------------------------------------- Sec_Adj_Mode bcf PORTA,7 ; CS/ = 0 movlw .8 ; digit H10 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1 bcf PORTA,7 ; CS/ = 0 movlw .7 ; digit H1 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 bcf PORTA,7 ; CS/ = 0 movlw .6 ; digit M10 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1 bcf PORTA,7 ; CS/ = 0 movlw .5 ; digit M1 blank call SPI_Out movlw b'00001111' call SPI_Out bsf PORTA,7 ; CS/ = 1