1.text 2 .globl mystart 3mystart: 4#if defined(__x86_64__) 5 pushq $0 6 mov %rsp, %rbp 7 andq $0xfffffffffffffff0, %rsp 8 movl $42, %edi 9 movl $0x2000001, %eax 10 movl $0, %ecx 11 movq %rcx, %r10 12 syscall 13 jmp 1f 141: 15 hlt 16 nop 17 nop 18 nop 19 nop 20#elif defined(__i386__) 21 pushl $0 22 mov %esp, %ebp 23 andl $0xfffffff0, %esp 24 subl $12, %esp 25 pushl $42 26 mov $0x40001, %eax 27 call _sysenter_trap 28 jmp 1f 291: 30 hlt 31 nop 32 nop 33 nop 34 nop 35_sysenter_trap: 36 pop %edx 37 mov %esp, %ecx 38 sysenter 39 nop 40#else 41#error Unsupported architecture 42#endif 43