summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authoronelin <oscar@nelin.dk>2026-06-13 00:01:19 +0000
committeronelin <oscar@nelin.dk>2026-06-13 00:01:19 +0000
commit1c31d1024c227979d5e4df7dd555fa866562c044 (patch)
tree5f00d4f4311f48ad814616c89e2732f57fadbffe /main.c
parent9f871ef0e0f27f795f5df7d842c7c205b6faa05f (diff)
Add mov src, dst instructionHEADmaster
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index d08d0e3..157e09b 100644
--- a/main.c
+++ b/main.c
@@ -2,8 +2,9 @@
#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 char some_opcodes[] = {
+ MOVWI(REG_EAX, (long)0x41), MOVQ(REG_EAX, REG_EDI),
+ MOVDI(REG_EAX, (long)0x3c), SYSCALL};
static const unsigned int some_opcodes_len =
sizeof(some_opcodes) / sizeof(some_opcodes[0]);