Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Project-Archive/207SE/wk2/hello.asm
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
17 lines (14 sloc)
436 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global _start | |
section .data | |
msg db "Hello, word!", 0x0a | |
len equ $ - msg | |
section .text | |
_start: | |
mov eax, 4 ; sys_write system call | |
mov ebx, 1 ; stdout file descriptor | |
mov ecx, msg ; bytes to write | |
mov edx, len ; numbeer of bytes to write | |
int 0x80 ; perform system call | |
mov eax, 1 ; sys_exit system call | |
mov ebx, 0 ; exit status 0 | |
int 0x80 ; perform system call |