https://github.com/somebadcode/hello-world-linux-amd64
Hello, World! - For Linux x86-64
https://github.com/somebadcode/hello-world-linux-amd64
Last synced: about 1 month ago
JSON representation
Hello, World! - For Linux x86-64
- Host: GitHub
- URL: https://github.com/somebadcode/hello-world-linux-amd64
- Owner: somebadcode
- License: unlicense
- Created: 2019-12-18T17:45:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-10-19T01:22:44.000Z (8 months ago)
- Last Synced: 2025-10-19T13:51:00.291Z (8 months ago)
- Language: Assembly
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hello, World!
Ever wondered what the smallest piece of assembly language code that is
required to write "Hello, World!" to standard output? Look no further!
Well, it's not the smallest piece, it does include rudimentary error handling
in case the write operation to standard output fails; for some reason.
## Requirements
### Platform
Linux for 64-bit x86
### Tools
* `nasm` (Netwide Assembler)
* `ld` (The GNU linker)
* `make` (GNU make utility)
## Build
### With make
`make`
### Without make
```
mkdir --parents --verbose ./{build,bin}
nasm -f elf64 -o build/main.o src/main.asm
ld --strip-all -static --no-dynamic-linker --pic-executable --output bin/hello build/main.o
```
The final binary will be `bin/hello`
## Run
`make run`
or
`bin/hello`