17 static const char magic[] =
"LEGO";
18 static const char before[] =
19 "\x68\x00\x01\x00\x00\x00\x00\x00\x1C\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x60\x80";
20 static const char after[] =
"\x44\x85\x82\xE8\x03\x40\x86\x40\x0A";
29 size_t mkrbf(
char **buf,
const char *cmd)
31 size_t cmd_sz = strlen(cmd);
32 u32 static_sz = (
u32)(
sizeof magic -1 + 4 +
sizeof before -1 + cmd_sz + 1 +
sizeof after -1);
33 *buf = malloc(static_sz);
34 (void)mempcpy(mempcpy(mempcpy(mempcpy(mempcpy(*buf,
35 magic,
sizeof magic -1),
37 before,
sizeof before - 1),
39 after,
sizeof after -1);
Error enumerations and decriptions.
size_t mkrbf(char **buf, const char *cmd)
Offline functionality. Generates bytecode for executing a binary executable.
contains declarations for ev3 commands