8 ms·
Os8088: A powerful Mac-like OS for the IBM XT, 286, 386
- yjftsjthsd-h 1mo agohttps://os8088.com/how-it-works/multitasking/ https://os8088.com/how-it-works/multitasking/ > Pre-emptive multitasking on an 8086 > Twelve task slots, 1,536 bytes of stack each, and a timer interrupt that takes the CPU away from whatever is running 18.2065 times a second. No task is asked to cooperate and no task can refuse. If you don't have protected mode, can't any program just rewrite the interrupt handler? It's not a bad system, but it sounds easy to break.
- Rohansi 1mo ago> If you don't have protected mode, can't any program just rewrite the interrupt handler? Yes? It's still possible to make it safe if you ensure that all programs are written in a memory safe language. Aside from throwing out a ton of existing code it's not as bad as it sounds. The Birth and Death of JavaScript touches on it towards the end. https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- hmry 1mo agoYeah, that works for making sure the machine isn't constantly crashing. Although from a security point of view it's still very bad. Every compiler / JIT has bugs, and bugs that let you write to random or arbitrary memory adresses are a rather common kind. Doesn't really matter for a hobby project though
- Rohansi 1mo agoIt's debatable! Most system software is written in memory unsafe languages right now and probably has more bugs than something like V8. Keep in mind that JavaScript runtimes are built for downloading and running untrusted code on your system.
- jggonz 1mo agoYes, it's easy to break. There's no memory protection. However, building packages, drivers, and kernel modules for it has been a fun and educational exercise in memory management.
- tgv 1mo agoThe original MacOS lacked memory protection too. It had cooperative multi-tasking, starting at version 7. Before that, the only thing that could be launched next to the main application were "desk accessories", which were a bit of a pain to write, as they had to stay out of harm's way.
- StilesCrisis 1mo agoMultiFinder existed before System 7. It was just optional.
- rjrjrjrj 1mo agoMultiFinder was introduced in System 5. Before that, there was Switcher - not a multitasker, but did keep multiple (non-DA) applications in memory at the same time.
- kar1181 1mo agoIt's a toy, easy to break is what vintage software was. A very different era with users of a very different mindset. Not just rewrite the interrupt handler either, can rewrite the timer itself :) Part of the fun of real-mode is the absolute god like power you have. Downside is the 20bit segmented memory model.
- StilesCrisis 1mo agoThis would be exactly like the original Mac--all processes had full heap access at all times. There was a special debugger extension that watched address zero because writing through to null was so common. (IIRC the original Mac intentionally left address zero alone for these reasons as well.)
- incanus77 1mo agoThis looked great, I started reading things, and then I just kept reading and reading the voluminous description details, and it was an immediate indication to me that the whole thing was built up by Claude. Confirmed in the repo. I closed the tab. I appreciate the topic, interest, and ambition, but if a human couldn’t be bothered to create and document it, I can’t be bothered to spend my time reading about it.
- gizajob 1mo agoYeah if someone had spent 6 months coding this dead end from 1978 in assembly rather than getting Claude to do it in six days then I’d have given it more time too.
- cmrdporcupine 1mo agoAnd now you'll understand why they didn't do that. Nobody would/will use either of them anyway. History went the way it did. All sorts of awesome things I saw at that time went nowhere. Awesomeness of the hack or depth of the skill has never equated to success in any kind of market, and the history of computing is filled with people who poured their lives into making something for love of the machine or hack or whatever and then it just sat there unused, unmarketed, or unsuccessful. I could give you a page long list of examples and I've victimized myself in the same way. Now we can just do that much much faster. Treat this like fan fiction. Nothing about it existing harms you in any way.
- gizajob 1mo agoMy sarcasm didn’t really come through for you.
- cmrdporcupine 1mo agoFair. Also to be fair, the non-sarcastic reading of same comment would be entirely in keeping with other comments in this thread.
- 1mo ago
- abstractspoon 1mo agoThis doesn't seem like any sort of achievement to me
- jggonz 1mo agoIf you want to try the operating system in the browser, you can try it by visiting here: https://os8088.com/demo/ https://os8088.com/demo/
- slartibardfast0 1mo agothanks for this, such fun! i'm going to try an run it from free bios rom space on a NuXT similar to Basic in rom: https://www.vogons.org/viewtopic.php?t=67340 https://www.vogons.org/viewtopic.php?t=67340
- kar1181 1mo agoI mean this is cool, it's wholly / mostly AI gen, so it takes the wow away which I think is what foklks are reacting strongly to here. Sadly this sort of thing is much easier now - thanks to the tooling. I speak from personal experience, I'd written some stub 32bit os' myself (by hand, pre-ai) and it is very fun. But you quickly run into walls that stop further development that aren't fun. I enjoyed poking at VGA registers, the 512 byte boot sector into real mode into protected mode dance. Setting up the global descriptor tables/page tables and the PIC/8042 controller. But...then you get into protected mode you get a prompt up some very basic memory management and then TERMIOS...boring. Boring. Defining all the posix syscalls, boring. Building test harnesses ... boring. Oh I need a DMA controller now because PIO is slow, FUN!!! I've taken my toy os to basically Linux 2.0 level in a few weekends by throwing tokens at boring things and when I got to the end it was a little bit empty because although the kernel of the system was all me, and it very much was built on the skeleton I arranged I didn't understand bits now that while boring were important. And the magic ... was lost. I'm working on a new version now where my rule is I hand type every line of code and I co-plan with the AI and write from my head. It's so slow going but the fun is in the problem solving and the design and by hand writing you keep enough of it in hand it feels yours and real. Anyway this is a cool project, I hope the author enjoyed it and learned something, but this is the new normal now, powerful tooling means things that were novel are tokens away and so they lose some of the magic accordingly.
- jggonz 1mo agoI am not sure I will ever get this to protected mode... The goal was to have something running on slower, older hardware, and once protected mode comes into play, we're letting go many of the constraints that make this an interesting experiment. Even though I've relied on AI to hammer out the assembly, it has been very educational iterating on it. You end up learning the techniques that other operating systems used to get applications to perform well on slow machines.
- kar1181 1mo agoYeah, I think the ability to move at pace helps and especially when you get stuck at some sort of intractable bug, in realmode especially, claude/gpt is unbelievably good at identifying and proposing the fix. THAT is part of the issue with it though, those length debugging sessions where you prod and poke and have to hold complex interactive segments in your head is what gives you that deep understanding of a piece of software. You do lose that when you throw the AI at it. This is part of my motivation for handwriting 'offline' all my code for these types of project. Have a doc to work from but otherwise wetware is doing the heavy lifting. This isn't efficient use of time at all and professionally a dead end. But as a pasttime/hobby for an enthusiast it opens a door that would be closed (project like yours and indeed mine) while still having it grounded in our own work.
- pelasaco 1mo agoSorry the question, i watched shortly your videos, i see you vibe-coding it in an emulator.. but did you try it in a real hardware? With real floppy disks?
- jggonz 1mo agoYes, you can see the hardware we tested here: https://www.os8088.com/hardware https://www.os8088.com/hardware
- garganzol 1mo agoI'm intrigued by how it runs on those machines in terms of performance. Maybe you have some real-time videos?
- reaperducer 1mo agoYes, you can see the hardware we tested here: https://www.os8088.com/hardware https://www.os8088.com/hardware How are we supposed to trust that photo, when you've already demonstrated that you're happy to use AI and call it "hand-written."
- bacchusracine 1mo agoI wish someone with a Book 8088 or a Pocket 386 would give this a go and report back.
- garganzol 1mo agoLLM writes a better ASM then a C compiler? From running the demo in the browser, it seems so performance-wise and size-wise, but the ultimate test should be performed on a real hardware that I have no direct access to. Anyone can validate the performance on a real PC of the era? If it's confirmed, LLMs may be one of the ways of creating highly optimizing compilers in the future.
- raphlinus 1mo agoI was curious about this and had a look. The code doesn't look much better than what a good C compiler might produce, and I found quite a few opportunities to optimize. It doesn't look much at all like the 8088 code I wrote when I was a teen. Among other things, so much pushing and popping. Take the irow loop in vga12.inc[1] (of course I'm going to look at the graphics code). Each iteration does push di; rep stosb; pop di; add di, ROW_BYTES (and some other stuff). Why not save the push/pop and add (ROW_BYTES - count), which could be stored in a register (dx is free here)? Just the push+pop is 15+12 cycles. [1]: https://github.com/jggonz/os8088/blob/1f2fae44180fadaf85368c32b67f5b36554b9e8e/kernel/vga12.inc#L1523 https://github.com/jggonz/os8088/blob/1f2fae44180fadaf85368c...
- garganzol 1mo agoTrue, that piece can be optimized better, but quality of the assembly code in general is not far away from what I had been writing in 1993-96. Back then, push/pops in function prologues/epilogues were a sign of experienced assembly programmer who avoided register clobbering by using standard calling conventions.
- cmrdporcupine 1mo agoI've built custom exotic architectures in Verilog with their own bespoke ISAs and weird assembler and found LLMs entirely competent at writing for them, and even building compilers to target it. It's a weird world we live in now.
- pjmlp 1mo agoYes, just like early optimising compilers eventually got their heuristics. Many still haven't understood that dynamic compilers, and machine learning based optimisations are equally not deterministic, which is why benchmarks are hard to implement properly.
- StilesCrisis 1mo agoI don't think you can call it Mac-like without proportional fonts. Fonts and QuickDraw (particularly the region manager) were really Mac/Lisa's biggest innovations.
- happycube 1mo agoAgreed. It also needs roundrects. I think someone vibecoded a bad System 7 replacement that had at least some QuickDraw in it. In this case, actually doing those things would probably make it insufferably slow on a real PC though at least at vibe-coding quality. The real implications here (also looking at the WinWord port to win64, which I suspect had some AI involvement as well) is that current agentic AI completely changes what a hobbiest can do over a weekend, as long as AI slop code is acceptable to meet one's project goals. --- It's certainly affecting things I've worked on... there'll be a much better version of ld-decode soon using Claude Fable which is faster and has better filtering (and an audio noise-reduction post-processor that actually works) and I'm pretty sure you could get much of ELKS working from scratch in one weekend at this point. whispers something about doing a UNIX-like on a pi pico 2 (or two), since he can't do it because reasons...
- ayaros 1mo agoThis is awesome and you should keep working on it. That 20px title bar is way too thick for the font. Make it 16 pixels at most.
- paul_h 1mo agoA fun hindsight LLM project :)
- cmrdporcupine 1mo agoNeat. If I was doing this though, I'd have started from a real-at-the-time system like GEM (sources are GPL) and "finish" it. By which I mean, from my experiences with the Atari ST ... GEM was in many ways a half-done project. The vision of its original designers never fully realized. We got some of that done much much later on the Atari ST, but it was never cohesive. If I were to unleash an LLM minion on it, I guess I'd be focusing on that direction. But, it's all rather arbitrary. We can do anything now.
- Lio 1mo agoThis is great. I had a little Flytech Carry-I 8088 back in the day that could just about run Windows 2 with dual floppies, 640K RAM, Hercules graphics and a Microsoft serial mouse. Although it was admittedly a bit rubbish compared to Amigas, STs and Acorns of the time I still really enjoyed using. If I'd had the chance this is exactly what I would have run. Premptive multitasking without memory protection was still useful on the original Amigas so I think it would have been a boon for 8088 too.
- nsxwolf 1mo agoDid not boot for me on an IBM PS/2 Model 30 (80286).
- internet2000 1mo agoFun little toy. Wonder how much in tokens went into it.
- jggonz 1mo agoMany millions so far...
- jggonz 1mo agoThe graphical operating system that could have been for the IBM XT. A MacOS-like desktop for the Intel 8086, written entirely in real-mode assembly (with Claude). Verified to run on real hardware, with FAT12/16 support, ported apps, games, Sound Blaster support and upcoming Hard Drive support.
- ozymandiax 1mo agoJust discovered the videos (https://www.youtube.com/@NostalgiaPCTV https://www.youtube.com/@NostalgiaPCTV) ...and the source code on github reads like a book. Amazing.
- ozymandiax 1mo agoApple might sue you though, like they did DRI :-)
- WillAdams 1mo agoWell there was GeoWorks (which AOL used the GUI of to their advantage): https://github.com/bluewaysw/pcgeos https://github.com/bluewaysw/pcgeos
- erwan577 1mo agoPC GEOS was much later circa 1990, the company spends years maintaining the first version targeting the C64 and Apple II. I also remember fondly the quality of prints produced by PC GEOS which included lots of home printer drivers. The system used an alternate vector font system not Truetype. Its SDK is probably still very interesting, but i suspect the complexity level was one of the reasons so few third party apps were developped for it.
- anthk 1mo ago>The SDK requires "sed" (https://en.wikipedia.org/wiki/Sed https://en.wikipedia.org/wiki/Sed) and "perl" (https://en.wikipedia.org/wiki/Perl https://en.wikipedia.org/wiki/Perl) to be installed. Perl can do sed(1).
- 1mo ago
- ozymandiax 1mo agoThis rewrites what-could-have-been history a bit... better get my IBM XT/286 out of storage! Is this for real?
- drivers99 1mo agoI might have to try it out. I have an 8088 IBM PC (my first computer) on a desk. I need to swap out some bad RAM (I've been getting Parity errors and other strange behavior), but it says it works with 256KB so I could remove the AST SixPakPlus altogether. The fully populated mother board has 256KB. (I could also unplug the MFM hard drive controller as well.) It supports CGA and VGA and I have both (the CGA is original; the VGA is an 8-bit ISA one I picked up a couple years ago). I also have a serial mouse... Right now I have one floppy disk that came with a book I re-bought recently (Peter Norton's Guide to Assembly Language) and I could back up the files from it and use that but I think I'd rather buy/find another one to use. And I need more than one disk for this anyway. Interesting, it currently says, 'Nobody has yet written the images to 5.25" media and booted an actual XT with them.'
- jggonz 1mo ago"Author" of os8088 here. That's no longer the case. Someone that is contributing to the project is using real hardware to validate the changes. You can check out some of the systems he tested it with here: https://www.os8088.com/hardware https://www.os8088.com/hardware The system does currently run with 256KB of RAM, and you can use some of the basic apps, but not all of them.
- paul_h 1mo agoChris Hinsley started TaOS toward the end of the 80's .. Him sick of being asked by games industry managers to "do it again but for PC". By 1991 there was a start up, and by 1993 there were awards for his endian-independent VpAsm OS. I mention cos the tubling cube demo (two windows) would allow one to be dragged over the other without cubes slowing in their tumble at all, and without the envelope-drag-letGo-repaint effect. No stammering for the window manager. This tech was legendary and the multi-tasking was an order better than WinNT later which itself was an order better than Mac's cooperative-task-thunking. Lots of the videos of that time lost sadly, and all the source code. Chris is doing it all again, but making it harder for himself -> https://github.com/vygr/ChrysaLisp https://github.com/vygr/ChrysaLisp - while also using LLMs for lots of it.
- cheema33 1mo agoIf it were available back then, Microsoft may be a small shop today or may have gone the way of Lotus.
- MiroslavPokorny 1mo agoYou mean like the Amiga or Atari ?
- wewewedxfgdf 1mo agoNo. Technically better software was rarely the primary factor in how the early microcomputer wars played out.
- Narishma 1mo ago> Hand-written real-mode 8086. No C, no linker, no runtime library. More like hand-prompted...
- gblargg 1mo agoNot sure what the point is having AI write asm when it could write C, which a compiler could likely optimize better than AI.
- jggonz 1mo ago"Author" of os8088 here. You're right, it's hand-prompted. Claude's Opus and Fable have done a really great job helping me and another contributor shape this operating system. It's been a really interesting way to learn about the different techniques that other operating systems have used to get the performance we saw in LisaOS, MacOS, Windows, GEOS, etc... performance at 640x480 on an XT class machine is tricky! Also, the 64KB segment limitations were very interesting to overcome!
- TheFuzzball 1mo agoDid you ask Claude to write this comment too?
- jggonz 1mo agolol, so disappointing to see the attacks when I'm just having some fun.
- anigbrowl 1mo agoWas not expecting the fractal viewer (in disk B/apps)
- jggonz 1mo agoI might even port over povray... :)
- anthk 1mo agoPor a ZMachine interpreter; there are ones for CP/M and DOS (Frotz).
- jggonz 1mo agoThank you for the idea! I was going to add a basic interpreter I've been working on in another project, but I think a port of Frotz is coming first now given how many resources are already available.
- cowboylowrez 1mo agowithout networking its not beowulf-able so there's that.
- theturtle 1mo ago[dead]
- LeoPanthera 1mo agoIt's funny how virtually everyone on HN is using AI to write code and simultaneously dismisses all interesting new software as written by AI.
- walrus01 1mo agoThere's a difference between using AI to automate some drudge work of stuff that would just be mentally tedious to do (writing an operating system for an 8088 in assembly? Tedious, unless you're one of the rare people whose mind does well with that sort of thing), and just not even being bothered to write your own readme files and project description. At least take the time to hand write a description of what it is and acknowledge the tool assistance as a known fact. Making fake claims that something is totally hand written is I think what bothers people about this.
- blks 1mo agoI think writing asm can be pretty straightforward and fun, with experience, strict developing principles and lots of macros.
- afavour 1mo agoFor me personally there’s something deeply unsatisfying about hobby projects that are entirely AI generated. Work code is something different. I don’t have passion for a lot of that, it’s just the way I earn money. This is never going to be a commercially viable project. It’s a wonderful idea for a hobbyist passion project. But if you’re not actually coding it yourself it feels far less interesting. I can’t really marvel at what they’ve created because I know that with a stack of tokens I could do the exact same thing myself.
- orbital-decay 1mo agoBeveled-buttons Minesweeper (first appeared in Win 3.11 IIRC) running on a preemptive 8086 OS with a bootleg System 1/2/3 interface looks absolutely cursed.
- nianderwallace 1mo agoYou'd still need a Wordstar-like app and a VisiCalc-like app (pref. Lotus 123-like). VGA adapter means you have to wait until 1987 to run this, otherwise you'd deal with CGA's non-square pixels. EGA support would only be possible in Oct 1984.
- rickcarlino 1mo agoThe website explicitly states a lack of networking. Any interest in pursuing that in a future version? I have a Pocket 8086 - I would love to give this a try next weekend.
- jggonz 1mo agoWe have built in driver support now, so we will be adding network driver support soon. We just added hard drive support that is potentially a bit buggy...
- deleted 1mo ago[deleted]
- badsectoracula 1mo agoNice, Solitaire in 7KB of RAM[0]. Sadly it only says "You win!" if you win, no bouncing cards animation :-P. [0] http://runtimeterror.com/pages/iv/images/b869a0cf44a7e7cbc40f23b476c063f8.png http://runtimeterror.com/pages/iv/images/b869a0cf44a7e7cbc40...
- jonjacky 1mo agoIt looks surprisingly Mac-like, except the font kind of spoils the illusion.
- adrianmonk 1mo ago> The graphical operating system that could have been for the IBM XT Visi On[1] was a graphical operating system for the IBM PC that actually existed as a commercial product, though definitely not a very successful one. It was made by VisiCorp, the same company that created VisiCalc (the first spreadsheet for a personal computer). It was demoed at COMDEX in 1982, before the Apple Lisa was released. It came out after the Lisa but slightly before the Macintosh. Here's their promotional video from 1983: https://www.youtube.com/watch?v=kc4wFeVvKTI https://www.youtube.com/watch?v=kc4wFeVvKTI Fun fact: Bill Gates saw the demo at COMDEX, and at first he was skeptical that it was really running on an IBM PC. But ultimately he was so impressed he decided[2] to start developing a product called Microsoft Windows. --- [1] https://en.wikipedia.org/wiki/Visi_On https://en.wikipedia.org/wiki/Visi_On [2] https://en.wikipedia.org/wiki/Windows_1.0 https://en.wikipedia.org/wiki/Windows_1.0
- jggonz 1mo agoAuthor of the AI written os8088 OS here... Thanks for sharing the promotional video for Visi On. It's cool to see how many different companies gave this a shot back in the 80s.
- prmoustache 1mo agoFrom what I understand, the AI is the author, not you. You are the customer.
- lelanthran 1mo ago> Author of the AI written os8088 OS here... I'm curious about your goal in purchasing this project. You don't get any peer recognition. You don't gain any special skill. You can't copyright it. You can't sell it. You can't use it for anything useful. You can't use it as a learning exercise. It can't really be built on. It can't serve as a tutorial for others to learn. You don't get the satisfaction of a job well done (well, no more than the satisfaction you get from buying a toaster on Amazon). Pre-LLM, something like this was a huge achievement. Now it's the equivalent of a 1st-grader showing off their finger-painting like it was the Mona Lisa. So, what are you getting out of this?
- baud9600 1mo agoThis is great - It’s almost as impressive as the “GOS” written for Atari 8-bit running on 6502 at 1.79 MHz. Visually it’s almost identical but has a nicer font. The specs are somewhat similar with 16 task slots, calculator app and task manager, serial mouse support (ST mouse) and Atari’s hardware sprites helping with some of the graphics. The XOR window frame is the same idea. Amazingly, Atari GOS runs in 128K of RAM! One has to admire the work and inventiveness in these projects. See description and videos here: https://atari8.co.uk/gui/ https://atari8.co.uk/gui/
- anthk 1mo agoThe XOR window frame was on most X11 window managers since late 80's and early 90's.
- jggonz 1mo ago"Author" of os8088 here. I love seeing what these early limited system could do! Someone shared a video of GOS with me after seeing what os8088 looked like. I believe os8088 also boots now with just 128k of RAM, but it's very limited in the type of apps you can load. There's a os8088.com/hardware page where one of the contributors to the project that has been helping optimize the operating system tested it out on a bunch of different machines.
- baud9600 1mo agoIt would be interesting to install os8088 on a later series, like a Pentium III 500mhz or a modern Intel i7! Would it even run? I guess os8088 could not harness the CPU power to make it usable. Instead, could a modern CPU run multiple instances of os8088 like a server? That’s probably something Claude could code…? A multi-session server that provides 1024 instances of os8088 by remote connection?
- userbinator 1mo agoI don't know why it seems reluctant to disclose AI use, because this is one of the best advertisements of Claude I've seen, and I say this as someone who has been sitting on the fence on the subject and saw a lot of slop in the past few years. If I was working in Anthropic's marketing department, this is the sort of thing I'd point to as a demo of its abilities. That said, it's not like something of this nature was thought impossible; many embedded OSes running on even slower and more limited machines (e.g. 8051) had preemptive multitasking and a primitive GUI. It just took several decades for someone with the idea, tokens, and motivation to actually do it.
- RachelF 1mo agoTo me the most interesting thing here is that AI did it, albeit with very good prompting. Claude AI just created something in a few hours, perhaps, that teams of intelligent developers at the time struggled to do in years of effort.
- pjmlp 1mo agoWhich is why many agencies are now delivering more with less, and still there are folks saying that won't happen to them.