blob: d08d0e329042e8c209c4fba1e6dad94f44eeccfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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, (char*)some_opcodes);
return 0;
}
|