Get the latest tech news

A "hello world" program in machine code on DOS


blog · git · desktop · images · contact 2024-09-29 I watched this nice (German) talk: https://media.ccc.de/v/ds24-394-linux-hello-world-nur-mit-einem-hex-editor It walks you through the process of writing a "hello world" program for 64-bit Linux in a hex editor. There's no assembler involved, you write the machine code directly.

This slightly strange mechanism means that several pairs of segment selectors and offsets actually map to the same linear addresses. If we wouldn't issue an exit request, the CPU would just continue to execute arbitrary memory content, i.e. garbage, i.e. the program would very likely "crash". I'd recommend downloading the volumes as individual files ("Ten-Volume Set of Intel 64 and IA-32 Architectures Software Developer's Manuals"), because the full documentation is over 5000 pages long and hard(er) to navigate.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of World

World

Photo of program

program

Photo of hello

hello

Related news:

News photo

Formula E’s Race to Get the Whole World Electrified

News photo

Is the world really running out of sand?

News photo

'Doomsday' glacier set to melt faster and swell seas as world heats up