test_libc_fxlib/src/cryptfx.c

58 lines
749 B
C

#ifdef __cplusplus
extern "C" {
#endif
#include "string.h"
#include "fxlib.h"
#ifdef __cplusplus
}
#endif
// unused
void conv_to_hex(char x, char* a, char* b) {
*a = (x >> 4) & 0xf;
if (*a < 10) {
*a += '0';
} else {
*a += 'a'-10;
}
*b = x & 0xf;
if (*b < 10) {
*b += '0';
} else {
*b += 'a'-10;
}
}
int main(void) {
unsigned int key;
int i=1;
char in[20] = "Hello World!";
//char* out;
char out[20] = {0};
while (1) {
Bdisp_AllClr_DD();
locate(1, 1);
Print((unsigned char*) in);
//out = (char*) malloc(strlen(in) + 1);
strcpy(out, in);
locate(1, 2);
Print((unsigned char*) out);
//free(out);
Bdisp_PutDisp_DD();
GetKey(&key);
}
return 0;
}
void initialize(void) {
main();
}