Re:SizeCoding.org: creating very tiny programs for the 80x86...
by bencollier49 on Saturday August 20, 2016 @08:00PM
(#12328853)
This seems fairly focused on Windows? Would be interested to see some Linux stuff.
[ Parent
| on HN ]
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by userbinator on Saturday August 20, 2016 @08:15PM
(#12328881)
It's not Windows but MS-DOS, which allows for pure binary executables (COM format) that are nothing but instructions. Thus even a single-byte file is executable (C3, RET - i.e. exit immediately.)
AFAIK Linux has a higher minimum size, as the ELF header alone has to be at least 45 bytes:
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by swiley on Saturday August 20, 2016 @08:22PM
(#12328902)
One could write a com loader for Linux pretty easily.
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by JoshTriplett on Saturday August 20, 2016 @08:35PM
(#12328938)
com programs assume they run on DOS, so you might as well use dosbox for that.
Linux supports some other executable formats for embedded systems, but they don't have much less overhead than ELF.
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by bencollier49 on Sunday August 21, 2016 @01:42AM
(#12329580)
The problem is that a lot of the demo programs are hooking Int 21h, which is provided by DOS / Windows.
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by mlvljr on Sunday August 21, 2016 @09:21AM
(#12330836)
Would it run 16 bit code under x64 Linux (w/o any translation / emulation)? As Windows can't do it (only x32 versions can), thus wondering, if this is a CPU limitation.
Re:SizeCoding.org: creating very tiny programs for the 80x86...
by bencollier49 on Sunday August 21, 2016 @01:49AM
(#12329594)
My point was around the DOS Int 21h, really. But I see what you mean about the file format.