mirror of
https://github.com/nfc-tools/mfcuk.git
synced 2025-12-23 18:50:06 +00:00
- Added INSTALL file with the mambo-jambo compilation instructions
- Added few TODO items - Changed asm to __asm__ so that some GNUC compilers are happy
This commit is contained in:
parent
880db4e1b9
commit
7edf0d2b0a
9
INSTALL
Normal file
9
INSTALL
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Until I fix the AM/AC configs/scripts, here is what makes it compile:
|
||||||
|
|
||||||
|
automake
|
||||||
|
autoreconf
|
||||||
|
automake --add-missing
|
||||||
|
autoreconf
|
||||||
|
automake
|
||||||
|
./configure
|
||||||
|
make
|
||||||
2
TODO
2
TODO
@ -17,3 +17,5 @@ ITEMS
|
|||||||
2. Optimize bits operations
|
2. Optimize bits operations
|
||||||
3. Remove dead-code/commented block after testing
|
3. Remove dead-code/commented block after testing
|
||||||
4. Proper error handling in some cases (not critical errors, but nice to have checks in place)
|
4. Proper error handling in some cases (not critical errors, but nice to have checks in place)
|
||||||
|
5. Periodically save the state (or most important part of it at least) such as of Nt/Nr arrays, etc., so that it can later be resumed on the same card
|
||||||
|
6. Calibration methodology and routine for MFCUK to determine best field on/off delays so that it generates the lowest entropy for tag's Nt values
|
||||||
@ -61,13 +61,15 @@ static inline int parity(uint32_t x)
|
|||||||
x ^= x >> 4;
|
x ^= x >> 4;
|
||||||
return BIT(0x6996, x & 0xf);
|
return BIT(0x6996, x & 0xf);
|
||||||
#else
|
#else
|
||||||
asm( "movl %1, %%eax\n"
|
__asm__(
|
||||||
|
"movl %1, %%eax\n"
|
||||||
"mov %%ax, %%cx\n"
|
"mov %%ax, %%cx\n"
|
||||||
"shrl $0x10, %%eax\n"
|
"shrl $0x10, %%eax\n"
|
||||||
"xor %%ax, %%cx\n"
|
"xor %%ax, %%cx\n"
|
||||||
"xor %%ch, %%cl\n"
|
"xor %%ch, %%cl\n"
|
||||||
"setpo %%al\n"
|
"setpo %%al\n"
|
||||||
"movzx %%al, %0\n": "=r"(x) : "r"(x): "eax","ecx");
|
"movzx %%al, %0\n": "=r"(x) : "r"(x): "eax","ecx"
|
||||||
|
);
|
||||||
return x;
|
return x;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user