Menu

LCD Print little problem

2007-03-05
2013-05-30
  • Stefano Bonomi

    Stefano Bonomi - 2007-03-05

    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

     
    • Hugh Considine

      Hugh Considine - 2007-03-09

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.