小编nik*_*agi的帖子

这个汇编代码的解释是什么?

section .text
    global _start       ;must be declared for using gcc
_start:                     ;tell linker entry point
    mov edx, len    ;message length
    mov ecx, 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)
    int 0x80        ;call kernel

section .data

msg db  'Hello, world!',0xa ;our dear string
len equ $ - msg         ;length of our dear string
Run Code Online (Sandbox Code Playgroud)

这是打印"Hello,World!"的基本汇编代码.屏幕上.现在我想问一下这段代码是如何在幕后工作的.就像所有这些指令的需要一样

nasm -felf -g -Fdwarf hello.asm
gcc …
Run Code Online (Sandbox Code Playgroud)

linux x86 assembly nasm

0
推荐指数
1
解决办法
692
查看次数

标签 统计

assembly ×1

linux ×1

nasm ×1

x86 ×1