62 lines
775 B
C
62 lines
775 B
C
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "string.h"
|
|
#include "fxlib.h"
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#include "memfunctest.h"
|
|
|
|
// 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};
|
|
|
|
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);
|
|
|
|
locate(1, 3);
|
|
memfunctest();
|
|
|
|
Bdisp_PutDisp_DD();
|
|
while(1) GetKey(&key);
|
|
|
|
return 0;
|
|
}
|
|
|
|
void initialize(void) {
|
|
main();
|
|
}
|