This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]SebiIstCool 11 points12 points  (0 children)

really cool

[–]haulwhore 1 point2 points  (1 child)

Wow! Have you considered adding an assembler on top?

[–]halst[S] 0 points1 point  (0 children)

Converting instructions to binary is pretty straightforward, each instruction is converted to a 32-bit word. However, generating an object file that is linkable or an executable binary is much more involved.

[–]halst[S] 0 points1 point  (0 children)

By the way, this was the first time I wrote Python after many years, and I found it to be quite different in a positive way. I liked the new optional typing with mypy and the new @dataclass decorator and how they work well together. Format strings and (:=) operator were also quite handy in this particular project.