medo73
Newbie level 4
Hi I'm trying to convert this function from CCS:
to Hi-tech where looks like
but I got errors
rror [800] C:\DOCUME~1\...LOCALS~1\Temp\s5qg.; 471. undefined symbol "crchi"
Error [800] C:\DOCUME~1\OCALS~1\Temp\s5qg.; 474. undefined symbol "crclo"
What goes wrong?
thanks
Code:
byte crclo, crchi;
void crcBit(byte tbyte) {
#asm
BCF 03,0
RRF crchi,F //rotates the entire 16 bits to the right
RRF crclo,F
#endasm
if (((STATUS & 0x01)^(tbyte)) == 0x01) {
crchi = crchi^0x84;
crclo = crclo^0x08;
}
}
to Hi-tech where looks like
Code:
unsigned char crclo, crchi;
void crcbit(unsigned char tbyte) {
asm("BCF 03,0");
asm("RRF crchi,F"); //rotates the entire 16 bits to the right
asm("RRF crclo,F");
//#endasm
if (((STATUS & 0x01)^(tbyte)) == 0x01) {
crchi = crchi^0x84;
crclo = crclo^0x08;
}
}
but I got errors
rror [800] C:\DOCUME~1\...LOCALS~1\Temp\s5qg.; 471. undefined symbol "crchi"
Error [800] C:\DOCUME~1\OCALS~1\Temp\s5qg.; 474. undefined symbol "crclo"
What goes wrong?
thanks