cmios.h (or header file of your choice):
extern void MIOS_LCD_PrintRAMString(unsigned char *str); // not supported by MIOS itself, but by the wrapper
mios_wrapper.asm (Right down the bottom, but ABOVE where it says "END"!)
;; --------------------------------------------------------------------------
.MIOS_LCD_PrintRAMString code
_MIOS_LCD_PrintRAMString
global _MIOS_LCD_PrintRAMString
movff PREINC0, FSR2L
movff PREINC0, FSR2H
_MIOS_LCD_PrintRAMStringLoop
movf POSTINC2, W
bz _MIOS_LCD_PrintRAMString_End
call MIOS_LCD_PrintChar
bra _MIOS_LCD_PrintRAMStringLoop
_MIOS_LCD_PrintRAMString_End
return
Make yourself a string somehow (note **)
unsigned char foo[6];
....
foo[0] = 'T';
foo[1] = 'e';
foo[2] = 's';
foo[3] = 't';
foo[4] = '.';
Call it
MIOS_LCD_PrintRAMString(foo);
** Note:
Actually filling the array with a string is not so straightforward. You cannot just do
foo = "New 1";
Because "New 1" is a string in code space and 'foo' is in RAM.
That is probably bad pracice anyway. As has been suggested prieviously you could use a pointer to the string in code (like PrintCString) or you could use something like strcpy().
If you are printing a number you can use the BCD functions provided by TK.
However - and this is untested - If you were filling the array from another variable then it could be useful.
Maybe you'd like to try:
unsigned char foo[64];
MIOS_BANKSTICK_ReadPage(0x07ff, foo);
MIOS_LCD_PrintRAMString(foo);
I think that should work. Have fun and post any requests and stuff :)