back to article ELKS and Fuzix: Linux – and Unix – writ very, very small

Version 0.7.0 of ELKS OS, and 0.4.0 of its creator's next baby, Fuzix, are out – if you like your 'nix systems as tiny as can be. Neither of these OSes is a Linux distro – or even a form of Linux at all – but ELKS is related to the Linux kernel. ELKS is shorthand for the Embedded Linux Kernel Subset – it's a minimal Linux-like …

  1. TheMaskedMan Silver badge

    "a tool to write a disk image to USB can fill 225MB..."

    ::sigh:: And I remember complaining that a Delphi 5 executable was way too big at about 500kb. I wonder if I still have my D5 installation CD. And whether it would run on Windows 10 if I do...

    1. Lunatic Looking For Asylum

      And having to write overlays to keep the code under 64kb.

      1. Andy The Hat Silver badge

        even 10x that would be enough for anybody ...

        1. jake Silver badge

          The supposed "640K limit" was an IBM hardware limit, not an MS software limit. The IBM hardware spec was already firmly in place before Gates even heard about the project. Even if he had made the comment (which is extremely doubtful ... nobody has ever documented it), he would have just been agreeing with IBM's spec. And it wasn't really 640K, it was more like 704K, if you knew what you were doing. I find it absolutely amazing that this piece of incorrect trivia is still being parroted as fact after all these years ...

          OTOH, I personally remember Steve Jobs saying that "128K ought to be more than enough for home users". It was at a meeting of the Homebrew Computer Club in late 1983, as he was demonstrating the original Macintosh, just before the public unveiling. At the time, he had a point ... people were running flight simulators in 64K.

          On the gripping hand, none of this matters any more. It's all just an accident of history.

          1. Lord Baphomet

            I remember someone saying once, something like, "There is no network protocol or design so elegant and fast that a java developer can't grind it to a halt in less than an hour." It might have been the incomparable Niklaus Wirth in Dr Dobbs., but I do vaguely recall him actually saying something like "java isn't object-oriented, it's money-oriented," so it might not have been him.

          2. Liam Proven (Written by Reg staff) Silver badge

            [Author here]

            Immaculate trifecta. Debunking a myth, adding a fun anecdote, *and* flawless use of "the gripping hand." Thank you. I enjoyed that.

          3. Fruit and Nutcase Silver badge

            On the gripping hand

            Grip this -->

      2. Uncle Slacky Silver badge

        I didn't know how to do that in Turbo Pascal 5 (no manuals!) so I squeezed a program into 64k by removing all unnecessary spaces and reducing all variables to 1 or 2 characters. It worked, but it was unmaintainable (I didn't care as it was only a summer job).

        1. garwhale Bronze badge

          Wrote a lunar lander simulator using Newton's laws in Basic to fit in 1Kb. Any change at all to the code would cause it to be too large and thus crash, like the lander.

      3. Graham Cobb Silver badge

        My first job after college was working on RSX-11 kernel networking code. The PDP11 could address 64K bytes of each of instruction and data memory and the hardware of the time divided that into 8 segments of 4K bytes each, which could be mapped onto different segments of physical memory.

        Our code was part of the kernel, and essentially had two segments (5 and 6 IIRC) to play with for mapping our code. As I joined, we filled our available 8K bytes of code! I implemented an overlay loading approach to allow us to have more code. Segment 5 always mapped the core of the code (including the overlay manager, of course, library code and the packet forwarding mainline) and Segment 6 got remapped as function calls needed to call into functions in other parts of the code. In my original implementation it loaded the segments from disk each time, although later (in order to support a diskless PDP-11-based router we were building) it was reworked to just map to segments residing in different parts of physical memory.

        Gosh, that was over 40 years ago.

        1. abend0c4

          And of course because separate instruction and data addresses were only available on some models, the kernel couldn't depend on their being available. Consequently, the entire size of the resident kernel address space - including its data was limited to 40KB, with another 8KB used to map I/O device space. So the kernel was frantically mapping other loadable modules in and out of the remaining 16KB space in response to interrupts, many of which were also performing similar overlay tricks. It's a miracle it mostly worked.

      4. garwhale Bronze badge

        And rewrite modules to keep them under 4Kb.

    2. Uncle Slacky Silver badge

      DiskDestroyer executable size?

      How big is dd?

      1. Atomic Toothbrush

        Re: DiskDestroyer executable size?

        /bin/dd is a remarkably slim 68112 bytes on ubuntu 22.04. That's dynamically linked, but only libc plus the usual ld and vdso stuff is needed

        1. Dan 55 Silver badge

          Re: DiskDestroyer executable size?

          4176 bytes in Elks, you can check online here (login root, no password).

  2. Dan 55 Silver badge

    New release of Fuzix just in time for the 2nd Spectrum Next

    Now all I need is a time machine to find the time to bodge one of Fuzix's Spectrum versions to use the Next's features.

    1. David 132 Silver badge
      Thumb Up

      Re: New release of Fuzix just in time for the 2nd Spectrum Next

      Yep. Next R2 shipping very soon now. We’re all getting quite excited about it!

  3. Atomic Toothbrush

    A remarkably slim 68112 bytes on Ubuntu 22.04. That's dynamically linked, but it only needs libc plus the usual ld and vdso stuff.

    1. This post has been deleted by its author

      1. Liam Proven (Written by Reg staff) Silver badge

        * vu

        But you're right.

  4. Anonymous Coward
    Anonymous Coward


    I have a question about the 'nxwolrd' app that is displayed in article. Where can i get the code and data, I have search for nxworld via many search engines and it doesn't show up. The reason I ask is because i wrote a program in the mid '80s that would have drawn that exact same picture. So i am wondering if this program is based on the data and or the code. It was my first private sector programming job, and I had a blast coding it, from the spherical trig to low level code to draw the data, to writing a program to use the 8087 floating point chip instead of tailor series for trig funcs (faster and the instructions took up less space, so it could all fit in 64k pages)) Now it is all layers upon layers of abstraction and I think todays coders really don't understand the inner workings of the libraries. It was a simple time back then.

    1. Dan 55 Silver badge
      1. Freds Not Here

        Re: nxworld

        Thank you for resolving my curiosity. Now, I am wishing I had my old code around.

      2. Liam Proven (Written by Reg staff) Silver badge

        Re: nxworld

        Well played, Dan.

        TBH I thought that includling a link to the source code repository on Github in my article was enough, but I guess not.

        1. Dan 55 Silver badge

          Re: nxworld

          For some reason it wasn't too easy find, I couldn't find the file but it was referenced in a commit. I also stumbled upon a reference in the same commit to the big brother of the cut-down Nano-X build in Elks:

          Nano-X AKA Microwindows: Github, Website.

          It's a windowing system for small devices with three different APIs based on Win32, X11, and Xlib.

    2. Lord Baphomet

      Re: nxworld

      In games programming in the 80's, we would write a program to pre-calculate small tables of trig results so that we could just look up the nearest result without having to do any math at runtime (except simple sums). Some machines would have more memory, but we were lazy so if we could make a game fit in 16k of memory on the spectrum it was relatively easy to port the logic to other platforms, therefore we tried to make everything fit.

    3. Bill Gray

      Re: nxworld

      I similarly found that map familiar. I think it's the "World Data Bank II" (or maybe III) dataset. I used it in an early version of my astronomy software for maps such as this one . It was a very useful dataset. It's not all that detailed, but it's quite easy to make maps from it.

      I have put the data for WDB on my site (about 1.2 MBytes compressed, 4.7 MBytes uncompressed). Its only real downside is that it dates back to 1992 and must have been based on older data, which is why you don't see (for example) boundaries within the former Soviet Union, and East and West Germany have a border between them.

    4. MyffyW Silver badge

      Re: nxworld

      Just saw your reference to Taylor Series and had a traumatic flashback to second year Engineering Maths [shudder]

  5. Bebu Silver badge

    "Lots of impressive, valuable software has been lost to history"

    I was wondering about Cromenco's cromix which vaguely recall was a unixy monitor/control program/os for 8080/Z80 (S100?) systems a very long time ago.

    I think the Wendin OST, DOS and VMS and Unix workalikes disapeared long ago. (PC software)

    1. jake Silver badge

      Re: "Lots of impressive, valuable software has been lost to history"

      "I think the Wendin OST, DOS and VMS and Unix workalikes disapeared long ago."

      Have fun!

    2. Liam Proven (Written by Reg staff) Silver badge

      Re: "Lots of impressive, valuable software has been lost to history"

      [Author here]

      > I was wondering about Cromenco's cromix which vaguely recall was a unixy monitor/control program/os for 8080/Z80 (S100?) systems

      Yes, I've read of it, and it sounds impressive. I can't find much mention of it, and I suspect that it required such specialised hardware that it won't run on any extant emulator.

      Although if someone could find a copy, perhaps getting such an emulator to run would be a fun challenge!

      Fun fact re Cromemco... one part of the company is still trading.

      1. jake Silver badge

        Re: "Lots of impressive, valuable software has been lost to history"

        Udo Monk was fiddling about with CROMIX on the z80pack CROMEMCO Z-1 emulator a while back.

        Try here to start:

        Udo running CROMIX on the emulator:

        autometer has a rather large archive of operating systems and software that run on z80pack.

        Anyone interested in an approximation of my view of The Internet circa 1980, see:

  6. Fruit and Nutcase Silver badge

    Now it's hosted on Microsoft's GitHub, and its release history shows a change of pace in the past few years.

    ...and it's up to 0.7.0.

    GitHub...? With contribution from Copilot should see the versions ticking over more frequently

  7. Kurt 5


    Don't forget UCLinux!

  8. -bat.

    ...and just for the hell of it, actual BSD (2.11) running in 128K

    Last release being a few weeks ago. Interesting for the same reasons, as micro-controllers are also parts with no memory management. Not going to run on CP/M class machines, but even so, impressive. Also useful as these are modern parts, so if I needed to use one and wanted an OS platform, this is what I would choose.

  9. david 12 Silver badge

    "can't envision a production role"

    In manufacturing, cents are counted. A processor without MMU will be used if it can be, and is 10c cheaper.

    And while "embedded" used to mean raw hardware, it has increasingly moved to linux-based implementations.

    That means that your firmware developers are linux system programmers, not raw hardware programmers.

    Which means that when you want a small (even single process) system, what you look for is the smallest minimalist linux-like system your people can use, rather than re-training or hiring in different people.

  10. garwhale Bronze badge

    Requiring less memory also means using less power, which can be a big consideration for battery or solar powered devices

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like