Settings

Theme

Show HN: Made a e-4917 emulator with a short tutorial

maartenhus.nl

29 points by MrHus 4 years ago · 3 comments

Reader

MrHusOP 4 years ago

Years ago through HN I got introduced to Richard Buckland's course at UNSW on YouTube. It featured a microprocessor called the e-4917 which has always captivated me.

The reason is because I'm from a generation that learned programming in Java / Python and PHP. Which are higher languages that do not require knowledge about the way the "metal" works.

I've always been jealous of people who got to get their start in assembly, they seem to have a deeper understanding of the computer itself. Whereas I only barely understand the "higher" software parts of the computer.

So when I came across Buckland's videos's it was like this part of the computer was finally revealed to me. Seeing the CPU's interact with the memory taught me a valuable lesson:

That at the lowest level what is in a memory "cell" can be both an instructions to a program or the data used in a program.

I hope that with this post I can reach someone how used to be like me, and get them to a lower level.

PS: I also wrote a part two explaining how I programmed the emulator using React and TypeScript:

https://www.maartenhus.nl/blog/fantasy-cpu-emulator-part-2

  • Someone 4 years ago

    One thing that, I think, curious students will ask about: if you talk about two byte instructions and say Execute the instruction now loaded in the IS registry, the IS register should hold two bytes. The emulator doesn’t show them, though.

    You either have two-byte instructions, and tell readers that the first byte can be 8 to 15, or you have single-byte ones that have a single argument. Either description can be fine, but mixing them isn’t ideal.

    If you standardize that, I think you’ll also automatically tell readers how the CPU fetches that argument.

  • charcircuit 4 years ago

    You have a similar thing with Java, but you instead learn how the JVM works.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection