4 ms·
A semantic nitpick, this doesn't give you an understanding of how "computers" (by which I mean a modern PC, x86, lots of peripherals and microcontrollers and a
by jfrunyon 5y ago
A semantic nitpick, this doesn't give you an understanding of how "computers" (by which I mean a modern PC, x86, lots of peripherals and microcontrollers and a CPU inside your CPU and etc.) work, but rather how a CPU works. You don't have to deal with the vagaries of USB *HCI (or the disgusting but simpler 8042 / "keyboard controller"), or the BIOS or UEFI, or interrupts, or storage, or display...
- M277 5y agoDo you know any good resources for the other things?
- AlexeyBrin 5y agoA good resource is https://www.nand2tetris.org/ https://www.nand2tetris.org/, there is a book and two parts course on Coursera.
- M277 5y agoThank you! I had this on my radar for quite a bit, just need to find the time haha.
- jimktrains2 5y agoBen Eater has some interesting video series, including building a cpu from logic chips, building a 6502 computer on a breadboard, building a vga card, and details on usb, ps/2, ethernet, &c. https://m.youtube.com/c/BenEater https://m.youtube.com/c/BenEater
- M277 5y agoYeah, he's really great. I have been searching for more channels like his, but couldn't find anything sadly. Closest I found was nandland, but he's more focused on digital design.
- jfrunyon 5y agohttps://wiki.osdev.org/Expanded_Main_Page https://wiki.osdev.org/Expanded_Main_Page and Ben Eater. LOL
- jimktrains2 5y agoYour definition of computer is overly narrow. This complaint is like saying, "your model railroad doesn't expose you to the details of running a real railroad". Of course it doesn't, but that's not the point and it doesn't mean there aren't things that can be learned about "real" railroads from modeling. There is a lot to learn about how computers work from building a virtual machine like this; models and abstractions exist because it's extremely difficult to learn everything all at once.
- pjmlp 5y agoOn top of that, thanks to stuff like FPGAs, such toy computers can be turned into real ones.
- jfrunyon 5y agoOkay. Please feel free to explain how he would do I/O on an FPGA with this code, without a VM monitor running inside another OS to do the I/O for him. While you COULD build an LC-3 with I/O - and make it a useful computer - that STILL wouldn't teach you how "a computer" (as in today's mass-produced computers) works.
- pjmlp 5y agoPerfect is the enemy from good. Half way there is better that not starting at all. Hope you get the point that not everyone has to learn all the way down to electron level to understand the main ideas behind computing.
- jfrunyon 5y agoWhen did I say it had to be perfect? All I said was that this is a CPU, not a computer. I even explicitly said that it was "a semantic nitpick". I'm sorry that you are unable to read.
- jfrunyon 5y agoHuh? No, the author's definition of computer is overly narrow. A CPU is NOT a computer. The ONLY thing he built was a CPU. I'm not sure why that's difficult to understand.
- ealexhudson 5y agoA BIOS is just code at the cold-boot memory location, there's no obvious reason to believe that isn't a simple extension to this project. Equally, the TRAP mechanism for I/O to terminal is not vastly different to the INT 21h mechanism, obviously much less powerful, but pretty similar to the emulation you might want to do to run DOS programs. I don't think this is as far from a running model of an early 8- or 16-bit as you might be implying: of course emulating other hardware is more work, especially if you wanted eg graphical output or a network card or something, but the actual _interfacing_ with those components is not that difficult..
- jfrunyon 5y ago> A BIOS is just code at the cold-boot memory location No, the BIOS (or UEFI) does quite a bit of system setup and provides quite a bit of system services. It's much more than "just code"; "just code" can do anything, a BIOS has to do many very specific things. > Equally, the TRAP mechanism for I/O to terminal is not vastly different to the INT 21h mechanism And what does that have to do with anything? What software uses an interrupt to display things?! LOL INT 21h is for input, first off, nothing "to terminal". But second, that hasn't actually been usable in about 25+ years. > I don't think this is as far from a running model of an early 8- or 16-bit as you might be implying I don't think you understand just how complex computers have been for the past decades. The author's stated intention was to "better understand how computers work". This project did not teach him that; it taught him how CPUs work(ed). You can argue that it taught him how computers worked 3 decades ago all you want; that's not even slightly relevant.