jemul8
jemul8 copied to clipboard
Define a clean public API
The public API should be derived via acceptance tests. For example, emulator.run()
should return a Promise
which should be resolved when the next HLT instruction is executed. Resuming the emulator (by calling .run() again) should return another Promise
, and so on.
Work started in feature/acceptance (https://github.com/asmblah/jemul8/tree/feature/acceptance)
feature/acceptance branch now contains a wrapper around the legacy API and a simple acceptance test which instantiates the emulator, writes some NOPs and a HLT to memory and executes them, using the new Promises-based API to detect when the HLT instruction is reached. This should allow smoother, faster BDD testing of the emulator's operation.