Comment

Comment by userbinator

You may "How to blink a light extremely inefficiently 10 different ways." ;-)

Seriously, not even one Asm example? If you have a PC that has a parallel port and can boot to DOS, you can stick a LED in series with a 100-ohm resistor across pins 2(+) and 18(-) and do this:

        mov dx, 378h
        xor ax, ax
    blinkloop:
        out dx, al
        mov cx, 36
        call delay
        not ax
        jmp blinkloop

    delay:
        hlt
        loop delay
        ret
I find it somewhat amazing that this program, in Assembly, is actually shorter than the 10 HLL programs in the article.
parent userbinator 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton