8sa1-binutils-gdb/sim/example-synacor
Mike Frysinger 26da232cbd sim: example-synacor: a simple implementation for reference
Provide a simple example simulator for people porting to new targets
to use as a reference.  This one has the advantage of being used by
people and having a fun program available for it.

It doesn't require a special target -- the example simulators can be
built for any existing port.
2021-04-03 16:19:16 -04:00
..
aclocal.m4 sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
ChangeLog sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
config.in sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
configure sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
configure.ac sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
interp.c sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
Makefile.in sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
README sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
README.arch-spec sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
sim-main.c sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
sim-main.h sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00

= OVERVIEW =

The Synacor Challenge is a fun programming exercise with a number of puzzles
built into it.  You can find more details about it here:
https://challenge.synacor.com/

The first puzzle is writing an interpreter for their custom ISA.  This is a
simulator for that custom CPU.  The CPU is quite basic: it's 16-bit with only
8 registers and a limited set of instructions.  This means the port will never
grow new features.  See README.arch-spec for more details.

Implementing it here ends up being quite useful: it acts as a simple constrained
"real world" example for people who want to implement a new simulator for their
own architecture.  We demonstrate all the basic fundamentals (registers, memory,
branches, and tracing) that all ports should have.