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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/03/02 21:15
Read: times


 
#22493 - RE: Confirmed compatible with Tasking
The se_print() function expects a pointer to a string, but it gives me the error "Memory spaces do not match."

Se_print is a different issue. I am not familiar with that function and certainly wasn't part of the original question.

I get the same error for argument #2 of the sprintf() function -- thats the "%lu" conversion specifier.

Before going and making a global variable and then making a function, etc. make sure the following works for you:

#include "stdio.h"
#include "stdlib.h"

void main(void)
{
char numstr[10];
unsigned long num = 500;
sprintf(numstr, "%lu", num);
}


This code should work. It's what I tested under Tasking.

Once you have that working, then try to use this se_print function and see what happens. Or try making the numstr variable global. Do it one step at a time to see what is causing this to break.

Again, make sure the above code works. It should. If it doesn't, that's the first thing you need to figure out. Once the above works then you can take baby steps to expand/improve the code one step at a time. Then when something breaks you will know it's because of whatever you just added since the previous version was known to work.

Regards,
Craig Steiner




List of 29 messages in thread
TopicAuthorDate
Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings - Niklas            01/01/70 00:00      
ASCII or Binary?            01/01/70 00:00      
RE: ASCII or Binary?            01/01/70 00:00      
RE: ASCII or Binary?            01/01/70 00:00      
RE: ASCII or Binary?            01/01/70 00:00      
RE: ASCII or Binary?            01/01/70 00:00      
RE: ASCII or Binary?            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
Confirmed compatible with Tasking            01/01/70 00:00      
RE: Confirmed compatible with Tasking            01/01/70 00:00      
Typo in above post            01/01/70 00:00      
RE: Confirmed compatible with Tasking            01/01/70 00:00      
RE: Confirmed compatible with Tasking            01/01/70 00:00      
RE: Confirmed compatible with Tasking            01/01/70 00:00      
More details on memory errors            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: More details on memory errors            01/01/70 00:00      
RE: Memory & strings; AT89C51            01/01/70 00:00      
RE: More details on memory errors            01/01/70 00:00      
RE: More details on memory errors            01/01/70 00:00      

Back to Subject List