3 ms·
These challenges are funny - they remind me of the old days. Back in the DOS/Windows days, we used to have the .com format, which was perfect for tiny programs.
by mrfinn 2y ago
These challenges are funny - they remind me of the old days. Back in the DOS/Windows days, we used to have the .com format, which was perfect for tiny programs. One could even write a program of less than 10 bytes that could actually do something!
We've come a long way since then, and is like, at some point, nobody cared about optimizing executable size anymore
- xpasky 2y agoJMP FFFF:0000
- mrfinn 2y agoINT 13h... uff chills
- secondcoming 2y agoPeople in the embedded space care. Symbian OS was compiled for small size, only certain parts were allowed use O3, such as the jpeg decoder.
- hinkley 2y agoI learned to write COM programs at some point but quickly unlearned it. There were some spots where you can use them and not .bat files, but outside of that it’s a lot.
- theandrewbailey 2y agoSome people care about executable size, (mostly) everyone else ships Electron apps.
- ramon156 2y agoTell it to my boss, he wants his app last week.
- smokel 2y agodebug -a 100 178A:0100 int 19 178A:0102 -r cx CX 0000 :2 -n reboot.com -w Writing 00002 bytes -q
- mrfinn 2y agoGreat example, a two bytes reboot utility. From the times when we could turn off the computer with a push of a button without fearing a global catastrophe...
- dim13 2y agoSome more: Quick'n'dirty: .model small .code org 100h start: int 19h ; Bootstrap loader end start More "correct": .model small .code org 100h start: db 0EAh ; Jump to Power On Self Test - Cold Boot dw 0,0FFFFh end start Even more "correct": .model small .code org 100h start: mov ah,0Dh int 21h ; DOS Services ah=function 0Dh ; flush disk buffers to disk sti ; Enable interrupts hlt ; Halt processor mov al,0FEh out 64h,al ; port 64h, kybd cntrlr functn ; al = 0FEh, pulse CPU reset end start