summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main.c b/main.c
index da8eb0f..d08d0e3 100644
--- a/main.c
+++ b/main.c
@@ -1,8 +1,16 @@
+#include "instructions.h"
+#include "registers.h"
#include "write_elf.c"
+static const unsigned char some_opcodes[] = {MOVDI(REG_EAX, 0x3c),
+ MOVDI(REG_EDI, 0x41), SYSCALL};
+
+static const unsigned int some_opcodes_len =
+ sizeof(some_opcodes) / sizeof(some_opcodes[0]);
+
int
main(int argc, char* argv[]) {
char opcodes[] = {};
- write_elf("test.out", some_opcodes_len, some_opcodes);
+ write_elf("test.out", some_opcodes_len, (char*)some_opcodes);
return 0;
}