Sometimes it's useful to print on LCD Screen a string containing only space
Characters (ASCII Code 32), in order to clean up certain LCD positions prior to
printing (a sort of selective CLS).
Trying the following:
Print " "
Produces following Assembler Code concerning String Table:
This was due to a minor bug in the pre-processor of GCBASIC which was causing it to remove the extra spaces. I have fixed the bug and the update is at http://gcbasic.sourceforge.net/newfiles/update.zip
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sometimes it's useful to print on LCD Screen a string containing only space
Characters (ASCII Code 32), in order to clean up certain LCD positions prior to
printing (a sort of selective CLS).
Trying the following:
Print " "
Produces following Assembler Code concerning String Table:
02AA 00797 StringLookup1
02AA 1003 00798 bcf STATUS, C
02AB 084C 00799 movf StringPointer, W
02AC 3E01 00800 addlw 1
02AD 3EB4 00801 addlw low StringTable1
02AE 00A4 00802 movwf DataPointer
02AF 3002 00803 movlw high StringTable1
02B0 1803 00804 btfsc STATUS, C
02B1 3E01 00805 addlw 1
02B2 008A 00806 movwf PCLATH
02B3 0824 00807 movf DataPointer, W
02B4 00808 StringTable1
02B4 0082 00809 movwf PCL
02B5 3401 00810 retlw 1
02B6 3420 00811 retlw 32 ;
02B7 0008 00812 return
As you can see only the first Space Character is coded...the others are simply ignored.
Greetings
Stefano Bonomi
This was due to a minor bug in the pre-processor of GCBASIC which was causing it to remove the extra spaces. I have fixed the bug and the update is at http://gcbasic.sourceforge.net/newfiles/update.zip