Register

Serial Number

Discuss issues related to the fx-9860G Software Development Kit
Junior Member
Posts: 4
Joined: Sun Aug 13, 2017 5:59 am
Calculators: Casio fx-9860 GII SD Power Graphic 2

Re: Serial Number

Postby 3.141592 » Mon Apr 30, 2018 5:55 pm

qferqo wrote:Thanks for the clarification! I wasn't aware of that fact.


this method is like strcmp( , );
int AddIn_main(int isAppli, unsigned short OptionNum)
{
int pass;
unsigned char str[32];
const unsigned char * deviceId = (unsigned char *) 0xA000FFD0 , * s = (unsigned char *)"A1234567";

for(i=0 ; i<8 ; i++){ if(deviceId[i]!=s[i]){ pass=0; break;}}

while(pass)
{ PrintXY(1,1,(unsigned char *) "Serial Number is OK", 0);
/* any code that you want*/

}

return 1;
}

Junior Member
Posts: 4
Joined: Sun Aug 13, 2017 5:59 am
Calculators: Casio fx-9860 GII SD Power Graphic 2

Re: Serial Number

Postby 3.141592 » Tue May 01, 2018 4:31 am

strcmp( ,) , strncmp(,) or memcmp(,) does not return 0 for equal comp. ; this method work perfectly.


int AddIn_main(int isAppli, unsigned short OptionNum)
{
unsigned int pass=1;
unsigned char str[32];
const unsigned char * deviceId = (unsigned char *) 0xA000FFD0 , * s = (unsigned char *)"01234567";

for(i=0 ; i<=7 ; i++){ if(deviceId[i]!=s[i]){ pass=0; break;}}

while(pass)
{ PrintXY(1,1,(unsigned char *) "Serial Number is OK", 0);
/* any code that you want*/

}

return 1;
}

Previous

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 3 guests