4 ms·
Here's a tiny DOS COM file that does it in 18 bytes: ;; 18 bytes DB 'HELLO_WOIY<$' ; executes as machine code, returning SP to original position witho
by Tepix 2y ago
Here's a tiny DOS COM file that does it in 18 bytes:
;; 18 bytes
DB 'HELLO_WOIY<$' ; executes as machine code, returning SP to original position without overwriting return address
mov dx, si ; mov dx,0100h MS-DOS (all versions), FreeDOS 1.0, many other DOSes
xchg ax, bp ; mov ah,9 MS-DOS 4.0 and later, and FreeDOS 1.0
int 21h
ret
(credits: https://stackoverflow.com/questions/72635031/assembly-hello-world-execution-file-less-than-20-bytes https://stackoverflow.com/questions/72635031/assembly-hello-...)
- rep_lodsb 2y agoWell, it prints something that is the same length as the correct message at least.
- deleted 2y ago[deleted]
- musicale 2y agoCOM files for CP/M and DOS really are a no-nonsense executable format. I'm a bit disappointed that Linux (or BSD, macOS, etc.) doesn't support them (or similar) out of the box, though Windows will sort of run them via ntvdm.