summaryrefslogtreecommitdiff
path: root/input/input_bin.c
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2019-08-04 00:13:59 +1200
committerDavid Phillips <david@sighup.nz>2019-08-04 00:13:59 +1200
commit9aa02bebf295ce9436451e0ce85db7717a6c9f81 (patch)
treecf95f8e06600c3359a7db6c6b08e6e055acf0d4c /input/input_bin.c
parent89917ead30321ff430fa2eab8e8d96ef4178d994 (diff)
downloadtoy-cpu-assembler-9aa02bebf295ce9436451e0ce85db7717a6c9f81.tar.xz
Add initial emulator implementation
This emulator provides a rough way for binaries designed for this CPU to be executed in a virtual/emulated CPU for testing purposes. This patch also adds a small test setup for automated assembly, execution and checking of register postconditions for programs.
Diffstat (limited to 'input/input_bin.c')
-rw-r--r--input/input_bin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/input/input_bin.c b/input/input_bin.c
index 8f4c827..eafcca1 100644
--- a/input/input_bin.c
+++ b/input/input_bin.c
@@ -151,6 +151,7 @@ static int disasm_file(FILE *f)
/* just used up 4 bytes, and couldn't read more. break out*/
goto read_eof;
}
+ /* FALLTHROUGH */
case 2:
/* have just read 2 bytes: shift down and pack new in */
inst = extra;