Artificial intelligent assistant

なぜrcxをpushする必要があるのか? Hello, world10 rcxsyscall global _main section .text _main: mov rcx, 10 loop_label: mov rax, 0x2000004 mov rdi, 1 mov rsi, msg mov rdx, msg.len push rcx ; to avoid register rcx from changing syscall pop rcx ; to avoid register rcx from changing ; inc rcx cmp rcx, 10 loop loop_label mov rax, 0x2000001 mov rdi, 0 syscall section .data msg: db "Hello, world!", 10 .len: equ $ - msg


Linux `syscall` `rcx` `syscall`


The Definitive Guide to Linux System Calls

Linux 64bit (Ring3) Linux Kernel (Ring0) `syscall` `syscall` `rcx` `r11` `rcx` `push`/`pop`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f919ed96659f013a85c1738af5000fee