I'm teaching myself about CPU internals, ISAs, Object Formats, etc. As part
of the process I've written an assembler, linker and virtual machine. The
layout is maybe a little janky with the body of the project packed into a
single import and for that I apologise. I've tried to mimic how a basic CPU
might actually process data. For example, loading an instruction involves
moving data from the "BUS" into a data register before moving it into the
instruction register. This was a deliberate choice and recognise it's
highly inefficient/redundant.

I'm hoping to get some feedback regarding the project, found
here: https://github.com/rthornton128/vm. The REAME has some details about
the project that might help you understand some of my motivations.

Specifically, I'd like to know of some obvious mistakes in the VM in how a
CPU would actually process a particular instruction. I know, for example,
the call and return instructions are not quite right but I'm not sure quite
how to fix them with the limited registers a CPU of the era being
"emulated" would actually handle it.

Also, I wouldn't mind a little feedback on how I handled the object format.
In particular, relocations (thanks Ian for enlightening me), the symbol
table and sections. I tried to keep the format as simple as possible (only
allows 2 sections atm: text and data).

The parser and code generator both need some work still. I really dislike
how I handled IO but the project is still a WIP. I valued having a working
product than wasting too much time re-factoring.

Anyway, I appreciate any time anyone is willing to devote to looking things


You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupgolang-nuts @
postedSep 24, '15 at 1:29p
activeSep 24, '15 at 1:29p

1 user in discussion

Rob Thornton: 1 post



site design / logo © 2022 Grokbase