Jon Wilder
Active Member
Hi all.
When building a string using the DB directive in pic-as, only the first two characters get built into flash. It's as if it wants each word on its own separate line.
Only the "T" and the "h" (6854) get built into flash, while the rest of the string is ignored. The ONLY way I've been able to get it to build is -
In the "Microchip XC8 PIC Assembler User Guide", it even states that you can place strings into a flash table the way I'm trying to do it above -
However, it is clearly not behaving how it states it should in the user guide.
Is there something I'm missing?
When building a string using the DB directive in pic-as, only the first two characters get built into flash. It's as if it wants each word on its own separate line.
Code:
PSECT myConstant,class=CODE,delta=1
someLabel:
DB "This is my string",0
Only the "T" and the "h" (6854) get built into flash, while the rest of the string is ignored. The ONLY way I've been able to get it to build is -
Code:
PSECT myConstant,class=CODE,delta=1
someLabel:
DB "Th"
DB "is"
DB " i"
DB "s "
DB "my"
DB " s"
DB "tr"
DB "in"
DB "g "
In the "Microchip XC8 PIC Assembler User Guide", it even states that you can place strings into a flash table the way I'm trying to do it above -
However, it is clearly not behaving how it states it should in the user guide.
Is there something I'm missing?