Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/05 05:50
Read: times


 
#105989 - Hello World
Responding to: ???'s previous message
Hi All,

Yes Sarang Patki i forgot to place Str++ in while loop on my post, but
I can assure that the printlcd function is just fine, i have been
using printlcd function many times in my program code.

When i was used printlcd in this way.

printlcd(0, strcat("Hello", " world"));

Only "Hello" word was displayed on the lcd display.

When i did this way.

#include <lcd.h>
#include <string.h>

// Pointer physically in internal ram pointing to object in external ram
xdata unsigned char * data Strings1Ptr;
xdata unsigned char * data Strings2Ptr;

xdata char Strings1[256];
xdata char Strings2[256];

void main (void)
{
Strings1[0] = 'H';
Strings1[1] = 'e';
Strings1[2] = 'l';
Strings1[3] = 'l';
Strings1[4] = 'o';

// there is must be a way to set strings insted of above

Strings1Ptr = Strings1;
Strings2Ptr = Strings2;

printlcd (0x00, Strings1Ptr); // "Hello" word was displayed on first line of LCD display

strcat (Strings1Ptr, " Word");

printlcd (0x40, Strings1Ptr); // only "Hello" word was displayed on second line of LCD display
}


Regards.


List of 9 messages in thread
TopicAuthorDate
Strings Manipulation in SDCC            01/01/70 00:00      
   Include ?            01/01/70 00:00      
      #include             01/01/70 00:00      
         Debug it!            01/01/70 00:00      
         check out Andy's doubt.            01/01/70 00:00      
            Hello World            01/01/70 00:00      
               Try this.            01/01/70 00:00      
               Bad!            01/01/70 00:00      
                  Clarify            01/01/70 00:00      

Back to Subject List