Hi, it's true ?
I'm trying to add this function but as an external .s
admin's test signature
Here is the pretty much universal standard for rand() and srand():
#define RAND_MAX 32767
static unsigned long seed = 1;
seed = seed * 1103515245 + 12345;
return (int)(seed / 65536) % (((int)RAND_MAX) + 1);
void srand(unsigned long newSeed)
seed = newSeed;
This comes, more or less, from the ANSI C example.
Upon further inspection, it looks rand() and srand() are implemented, at least in the latest version of the library (I haven't checked the older libraries). They are located in the header stdlib.h.
© 2020 Microchip Technology Inc.