我正在步入汇编语言编程的世界。我试图了解在以下位置找到的所有内容:https : //www.tutorialspoint.com/assembly_programming
我遇到了下面的代码:
section .text
global _start ;must be declared for using gcc
_start: ;tell linker entry point
;This part works fine.
;mov edx, len ;message length
;mov ecx, msg ;message to write
;This does not work because I interchanged edx and ecx.
mov ecx, len ;message length
mov edx, msg ;message to write
mov ebx, 1 ;file descriptor (stdout)
mov eax, 4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax, 1 ;system call number (sys_exit) …Run Code Online (Sandbox Code Playgroud)