HN user

timbt

4 karma
Posts0
Comments3
View on HN
No posts found.
Simple CPU 12 years ago

I tried to sign up, but I got a "Sorry, but this form is no longer accepting submissions." :(

Simple CPU 12 years ago

This is my first real introduction to uber-low level computer science. I managed the following super simple program:

1. 00000000

2. 00000001

3. 00000000

4. 00000001

5. 00000010

6. 00000011

7. 00000011

8. 00001010

9. 00000000

10. 00000001

The CPU jumps to the instruction at #4, which tells it to add the value of #2 to #3. The instructions at #7-#10 reset the instruction pointer to 00000001, so that it'll increment to #4 again. The result is that #3 is continuously incremented up by one.

I've usually preferred to stick to really high level stuff (Like JS/Node.js), but trying this out makes me want to go learn assembly or something!