Hello, world in assembly language with Linux system calls?
问题 I know that int 0x80 is making interrupt in linux. But, I don't understand how this code works. Does it returning something? What $ - msg standing for? global _start section .data msg db "Hello, world!", 0x0a len equ $ - msg section .text _start: mov eax, 4 mov ebx, 1 mov ecx, msg mov edx, len int 0x80 ;What is this? mov eax, 1 mov ebx, 0 int 0x80 ;and what is this? 回答1: How does $ work in NASM, exactly? explains how $ - msg gets NASM to calculate the string length as an assemble-time