|
|
|
|
|
by userbinator
3882 days ago
|
|
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. |
|