From 9853d19b4de3e66138da8b3e66ccdaea356ea35b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 3 Aug 2025 15:16:08 +0100 Subject: Switch to Intel assembly syntax --- src/l4d1democompat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/l4d1democompat.c') diff --git a/src/l4d1democompat.c b/src/l4d1democompat.c index 105b812..1d27984 100644 --- a/src/l4d1democompat.c +++ b/src/l4d1democompat.c @@ -123,12 +123,12 @@ __attribute__((naked)) #endif static int hook_midpoint() { __asm__ volatile ( - "pushl %%eax\n" - "movl %1, %%eax\n" - "movl (%%eax), %%eax\n" // dereference this_protocol - "movl %%eax, %0\n" // store in demoversion - "popl %%eax\n" - "jmpl *%2\n" + "push eax\n" + "mov eax, %1\n" + "mov eax, [eax]\n" // dereference this_protocol + "mov %0, eax\n" // store in demoversion + "pop eax\n" + "jmp dword ptr %2\n" : "=m" (demoversion) : "m" (this_protocol), "m" (ReadDemoHeader_midpoint) ); -- cgit v1.2.3-54-g00ecf