Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char test[65536];
- void loader(FILE * srec)
- {
- char instring[SREC_LEN];
- char test[65536]; // This isn't used, but the program crashes without it for some reason
- int i=0;
- int j=0, k,l;
- while (fgets(instring, SREC_LEN, srec) != NULL)
- {
- while(instring[i] != 'n') // Counts the characters in the s-record
- {
- i++;
- }
- j = j+i;
- for(k=0;k<=i;k++) // Puts the records into memory
- {
- memory[l] = instring[k];
- l++;
- }
- l = j;
- }
- #ifdef DEBUG
- printf("MEMORY: %s",memory);
- #endif // DEBUG
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement