+int singlehextoreg(char hex) {
+
+ int conv = 0;
+ if (hex >= 'A' && hex <= 'F')
+ conv = hex - '7';
+
+ else {
+ conv = hex - '0';
+ }
+ return conv;
+
+}
+
+uint32_t hextoreg(char * a) {
+
+ uint32_t x = 0;
+ int tmp;
+ for(int i = 0; i < 8; i++) {
+ tmp = singlehextoreg(*a++);
+ x += tmp << (28 - (i * 4));
+ }
+ return x;
+
+}
+