Hello,
I am trying to determine what is the most efficient way, in terms of code space, for displaying multiple text menus on a GLCD. This is an example:
Without CData --> 1390 bytes
With CData and no CStr --> 1404 bytes
With CData and CStr --> 1414 bytes
So far what I have determined is that contrary to the guide Cdata + Cstr is the least efficient. I was wondering if I am missing something?
====== 1390 bytes
Device 18F4550
Xtal = 48
Optimiser_Level = 3
Dead_Code_Remove = On
Declare LCD_Type = Samsung
Dim USB_BUFFER As String * 11
Print At 0,0, "HELLO WORLD"
HSerOut ["HELLO WORLD"]
USB_BUFFER = "HELLO WORLD"
Include "font.inc"
====== 1404 bytes
Device 18F4550
Xtal = 48
Optimiser_Level = 3
Dead_Code_Remove = On
Declare LCD_Type = Samsung
Dim USB_BUFFER As String * 12
Print At 0,0, HELLO_WORLD
HSerOut [HELLO_WORLD]
USB_BUFFER = HELLO_WORLD
Include "font.inc"
HELLO_WORLD: CData "HELLO WORLD", 0
====== 1414 bytes
Device 18F4550
Xtal = 48
Optimiser_Level = 3
Dead_Code_Remove = On
Declare LCD_Type = Samsung
Dim USB_BUFFER As String * 12
Print At 0,0, CStr HELLO_WORLD
HSerOut [CStr HELLO_WORLD]
USB_BUFFER = CStr HELLO_WORLD
Include "font.inc"
HELLO_WORLD: CData "HELLO WORLD", 0