9 ms·
KnightOS was an interesting operating system
- dTal 7y agoAlso interesting: PunixOS, a sadly-dead project to port 4.4BSD to Motorola 68k calculators like the TI-89. Not just a Unix-alike, but a Real Unix (tm), with pre-emptive multitasking and everything. http://punix-os.blogspot.com/ http://punix-os.blogspot.com/
- fsiefken 7y agointeresting, seems similar to fuzix http://www.fuzix.org/ http://www.fuzix.org/
- msla 7y ago> Not just a Unix-alike, but a Real Unix (tm), Not unless they paid The Open Group to use the very real Unix trademark. There's a part of zOS that's Real Unix (tm) and FreeBSD is not, so can we give it a rest?
- kick 7y agoFreeBSD and 4.4 BSD are not the same thing. You seem bitter. Why are you bitter about something like that?
- msla 7y agoFreeBSD is the modern 4.4BSD descendant.
- deleted 7y ago[deleted]
- boring_twenties 7y agoNo one gives a shit about the Open Group's trademark. Seriously. 4.4BSD (unlike FreeBSD, or 4.4BSD-Lite(2)) contains proprietary code from AT&T Unix, therefore it's Unix in most people's eyes.
- msla 7y ago> 4.4BSD (unlike FreeBSD, or 4.4BSD-Lite(2)) contains proprietary code from AT&T Unix Only three files had to be removed. https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc._v._Berkeley_Software_Design,_Inc https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc.....
- boring_twenties 7y ago> and 70 modified to show USL copyright notices
- cr0sh 7y agoI was about to post about the TI-92+ not getting any love, saw this, got happy, then saw it dead...sad again. Oh well. :)
- dang 7y agoCan you email hn@ycombinator.com so we can send you an invite to post that? Invited posts go into in the second-chance pool (described at https://news.ycombinator.com/item?id=11662380 https://news.ycombinator.com/item?id=11662380).
- msla 7y agoYou're only a Real Unix (tm) if you pay for a license.
- geek_at 7y agoAt first I confused it with Temple OS. That was also very interesting but maybe less useful
- SirLotsaLocks 7y agohonestly impressive, but yeah not very useful.
- dmix 7y ago> In fact, the “userspace” task switching GUI would read the kernel’s process table directly to make a list of running programs. This is great. A perfect learning project is trying to build something yourself, then learning how other developers solved the problems or larger OSes handle it (or working backwards from that point and simplifying). I noticed some "#ifdef FLASH4MB" in the linked source code, was it difficult to update it for 4mb or were similar constraints in place where it was basically the same with more memory?
- ddevault 7y agoNah, it was reasonably easy. The main issue with 4MB calcs is that it used a secondary hardware port to add two extra bits to the page address. Until then we were able to page with only one port, so everywhere was hardcoded to use it. We had to replace all of that with a marcro, and update a few places manually. There's a comment in that code which speaks to this: ; we can't use getBankA because it behaves differently on the 84+CSE, and we don't want that getBankA was the name of the macro we used to interrogate which Flash page was swapped into bank A (address space 0x4000-0x7FFF). The real pain with that port was the new color screen.
- cesarb 7y agoInterestingly, "read the kernel’s process table directly to make a list of running programs" is exactly how the "ps" command worked in the distant past. It's a bit hard to find information about this nowadays, but I could find a couple of SE answers (https://unix.stackexchange.com/a/340893 https://unix.stackexchange.com/a/340893 and https://unix.stackexchange.com/a/511530 https://unix.stackexchange.com/a/511530) which mention this fact.
- zozbot234 7y agoWith no MMU or hardware supervisor mode, this would be more of a simple task executor than an OS in any reasonably-modern sense. Still impressive though.
- sixothree 7y agoI feel like constraints are where developers get to shine. On a system with (relative) unlimited resources, many developers seem to be able to complete the same tasks. But when there is scale involved or some constraint (like 4 mb of storage) you get to find out who is willing to learn what they need to learn to get the job done.
- thedanbob 7y agoMy day job is web development but I love hacking on microcontrollers in my spare time. One project involved serving a static webpage from an ESP-8266. But how do you server an HTML file without a filesystem? There's probably a better way, but my solution was to gzip the file and embed it as an array of raw bytes within the program.
- Koshkin 7y agoAs far as program resources go, on DOS, at least, it used to be possible to simply append a file to the executable, and the loader would put everything in RAM. (On the other hand, you do not need a generic web server to serve a single static page; then you don’t need a file system to store one file.)
- emily-c 7y agoThis is still pretty common for things like self extracting archives on Windows. copy /b "%windir%\system32\extrac32.exe"+inputarchive.cab selfextract.exe
- ronsor 7y agoYou can do that with most executable formats: MZ/NE/PE (DOS, Windows), ELF (Linux, BSD). Not sure about mach-o (macOS) though.
- wolf550e 7y agoDo you mean like Apache mod_asis [0] which will serve a pre-formatted HTTP response, including the headers, directly from disk? Then your HTTP server can speak very little HTTP (compare request line to preformatted "GET /file HTTP/", return 404 on mismatch, return preformtted response on match). Maybe also return nice error if request does not have accept-encoding: gzip. 0 - https://httpd.apache.org/docs/2.4/mod/mod_asis.html https://httpd.apache.org/docs/2.4/mod/mod_asis.html
- cjbprime 7y agoNeat. Would be interested to see a quick video/GIF tour.
- Koshkin 7y agoThere goes my day.
- jacobush 7y agoAlso, Lunix (C64)
- papito 7y agoObstacles and difficulty make us better at things. Lack of obstacles makes us complacent. This is a known phenomenon. https://www.ted.com/talks/tim_harford_how_frustration_can_make_us_more_creative https://www.ted.com/talks/tim_harford_how_frustration_can_ma...
- coolreader18 7y agoRelevant: Ndless[1], a jailbreak for TI-Nspire calculators (Nspire {CX ,}{CAS,}). I've played around with the source code[2] as well as compiling Rust[3], Nim[4], and Zig[5] to target it. It's all pretty neat, there's a gba emulator for the TI-Nspire floating around somewhere as well. [1]: https://ndless.me https://ndless.me [2]: https://github.com/ndless-nspire/Ndless https://github.com/ndless-nspire/Ndless [3]: https://github.com/coolreader18/rsspire https://github.com/coolreader18/rsspire [4]: https://github.com/coolreader18/Nim/tree/tinspire https://github.com/coolreader18/Nim/tree/tinspire [5]: https://github.com/coolreader18/zigspire https://github.com/coolreader18/zigspire
- unlimitedbacon 7y agoWhen I was in high school, I always wanted to build a better OS for the TI-84, but I did not have the skills or attention span to do it on my own. When KnightOS came along, I got involved and was able to take on individual features or issues as bite size chunks. I was able to make real contributions to a project that resonated with me on a fundamental level. In the process, I learned z80 assembly, how OSs work, but also most importantly how to contribute to a real open source project. Thanks, Drew.
- ddevault 7y agoHey, I remember you :) thanks for all of your help back in the day. I was just thinking to myself earlier that your improvements to the file manager added a lot of much needed polish.
- non-entity 7y ago> but I did not have the skills or attention span to do it on my own. This is how I feel about mos things now
- kragen 7y agoKnightOS is a system I've been wanting to try for years, although I don't have the hardware for it. It's an admirable achievement. How hard would it be to get KnightOS to be able to self-host? Something like an 8080 or Z80 is probably the wimpiest processor that it makes sense to try to build a self-hosted development environment on; although there were compilers that could run on the PDP-8 (address space: 4096 12-bit words), John Cowan tells me that in practice people did most software development for the -8 on bigger machines like a PDP-10. CP/Mish is the other free-software operating system for the Z80 (and also runs on the 8080), but it's pretty far from self-hosting. As I mentioned in Dercuano, there's a free-software C compiler for CP/M which can run under CP/Mish (BDS C) but its dialect of C is not the one CP/Mish is written in. A really small bootstrapping environment like this could go a long way to making computers comprehensible and making the Karger–Thompson attack infeasible.
- ddevault 7y agoLast time I checked, the source code can't even fit on the calculator's Flash chip.
- kragen 7y agoReally? If not, it's not that far. I mean KnightOS/kernel/src is less than half a meg, and it gzips to 79K. corelib/src gzips to 10K, castle/*.asm to 6K, and all the core .asm files I could find to 107K. (I'm not sure I have the whole source because it's not in a single repo, so I may be missing something, and I've left out extra/, but still this is pretty far from four megs.)
- ddevault 7y ago4M is the best case, and that calculator is probably my least favorite because the screen is awful and the calculator can't drive it efficiently. The best case for a good calculator is 2M, but the most popular is just 512K. Keep in mind that you have to keep at least some of this file in RAM, which is 32K minus the size of your assembler itself. I was considering the size of the whole toolchain, though. Perhaps if a different toolchain were made from scratch for this purpose... it might be possible.
- shakna 7y agoWhen I was a school IT admin, I saw students try a lot of creative things. Some of the best, were thanks to KnightOS. There are a lot of stories, but I might relate what might have to be my proudest. The teacher had caught the students fooling around with BASIC to share notes, and for some reason thought that sharing notes about what they were talking about was counterproductive to the lesson, so asked me to erase the capability. I didn't want to, but orders are orders, and I could only appeal all the way up the food chain to the principal, who barely managed to use his email on his best days. So as I was doing as instructed, I noticed one of the calculators that came across my desk had KnightOS. This one hadn't been part of the note sharing, but had an interesting program on board that was still being written. I called the student in excitedly, to ask them to explain, hoping I was right. I was. They were making a program that transmitted a minimal MIMEfile across the 2.5mm cable from one device to another. They were implementing email. This was the first C-compiler that they'd be allowed to touch. Their parents strongly believed that girls had no place in IT, and did everything they could to keep her away from the computer at home. Her calculator with KnightOS was her only outlet. When it came time to hand all the calculators back, I casually mentioned the program she wrote to one or two of the students. Within the week, everyone in the class was running KnightOS and sending each other emails of notes in the class. When the teacher came back and complained, I then had the power to appeal to the principal that the teacher was complaining that her students were using email, using a program that a student had built herself to send email. When the principal heard that, it wasn't note passing anymore, because he knew what email was. It went from potential punishment, to the girl who wrote an email program getting called up in assembly to be congratulated in front of everyone. I didn't really keep taps on anyone, but from what I've heard, that girl now works for a game development company in town.
- thrtythreeforty 7y agoAs a former small-time contributor, KnightOS was an exciting dream. From the programmer's perspective, it got a lot of things right and really modernized the 6MHz environment from feeling like something designed in the 80s to something you felt like you could build a real piece of software on. I had written a computer algebra system for the 84 Plus and I was considering porting it to KnightOS because it would have gotten rid of a lot of baggage I had to do to support TI's operating system. KnightOS never had the momentum it really deserved, and the calculator hacking community was far more involved with equally impressive projects in other genres (for example, the Axe Parser was an onboard compiler for a high level language designed for writing games on the 84 Plus). Still cool to go back and play with the website.