Print "Hello ":Print "There ":Print "X"
'Note: the message editor cancels the extra spaces. It would be really nice
'if we could attach code tags to preserve formatting and indenting.
Here is the assembly for first string.
SysReadString1
call StringLookup1
movwf INDF
incf StringPointer, F
incf FSR, F
movf StringPointer, W
sublw 7
btfss STATUS, Z
goto SysReadString1
movlw 218
movwf SysPRINTDATAHandler
bsf SysPRINTDATAHandler_H,0
call PRINT
bsf STATUS, IRP
movlw 218
movwf FSR
clrf StringPointer
.....
StringLookup1
bcf STATUS, C
movf StringPointer, W
addlw 1
addlw low StringTable1
movwf DataPointer
movlw high StringTable1
btfsc STATUS, C
addlw 1
movwf PCLATH
movf DataPointer, W
Using Print "Date " (multiple space) comes out Print "Date " single space. Thought that was discussed/fixed a while ago?
Thanks,
Kent
Very odd, as far as I know this was fixed back in March. I've just compiled a simple test program and all of the spaces have been preserved correctly.
Could you please post the entire GCBASIC program, or email it to hconsidine@bigpond.com? Something strange must be happening inside of GCBASIC.
Have not been using the 4 bit LCD for quite a while, and then noticed the hiccup. I have the March 25 zip file update installed.
Kent
'******************************
'Test 4 bit LCD routine
'******************************
'Chip model
#chip 16f88,20
'Setup 4 bit LCD
#define LCD_IO 4
#define LCD_DB4 PORTB.5
#define LCD_DB5 PORTB.6
#define LCD_DB6 PORTB.7
#define LCD_DB7 PORTB.0
#define LCD_RS PORTA.4
#define LCD_RW PORTA.3
#define LCD_Enable PORTA.2
Print "Hello ":Print "There ":Print "X"
'Note: the message editor cancels the extra spaces. It would be really nice
'if we could attach code tags to preserve formatting and indenting.
Here is the assembly for first string.
SysReadString1
call StringLookup1
movwf INDF
incf StringPointer, F
incf FSR, F
movf StringPointer, W
sublw 7
btfss STATUS, Z
goto SysReadString1
movlw 218
movwf SysPRINTDATAHandler
bsf SysPRINTDATAHandler_H,0
call PRINT
bsf STATUS, IRP
movlw 218
movwf FSR
clrf StringPointer
.....
StringLookup1
bcf STATUS, C
movf StringPointer, W
addlw 1
addlw low StringTable1
movwf DataPointer
movlw high StringTable1
btfsc STATUS, C
addlw 1
movwf PCLATH
movf DataPointer, W
StringTable1
movwf PCL
retlw 6
retlw 72 ;H
retlw 101 ;e
retlw 108 ;l
retlw 108 ;l
retlw 111 ;o
retlw 32 ;
return