Hacker News new | ask | show | jobs
by monocasa 2535 days ago
On Linux, a full asm program with syscalls isn't too bad.

Here's one example:

https://jameshfisher.com/2018/03/10/linux-assembly-hello-wor...

2 comments

A 16-bit realmode DOS Hello World is also very simple, being less than 2 dozen bytes (8 bytes of actual machine instructions, and 15 bytes of message...) and something you can enter into DEBUG and run immediately if you have a 32-bit Windows system; on a 64-bit one, DOSBox or similar emulators will work well too:

    mov ah, 9
    mov dx, 108
    int 21
    ret
    db "Hello world!" 0D 0A "$"
And if you don't have a 32-bit Windows system, you could always just run Windows 95 on your browser

https://win95.ajf.me/win95.html

Why bother with Windows in that case? Just emulate DOS directly.
Not as cool though!
You can have fun writing simple programs too:

https://github.com/skx/math-compiler/