diff options
author | David Phillips <david@sighup.nz> | 2019-08-03 22:47:11 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-08-03 22:54:31 +1200 |
commit | 89917ead30321ff430fa2eab8e8d96ef4178d994 (patch) | |
tree | 83dbd9ad07fdfbb676ce69dac1b3e47b60454ef8 /test | |
parent | 22575e056586a7810007952c717eff4e9e005bdb (diff) | |
download | toy-cpu-assembler-89917ead30321ff430fa2eab8e8d96ef4178d994.tar.xz |
input_bin: Refactor disassembly to allow input from buffers
This somewhat complicates the previous file dissassembly logic, but paves
the way for disassembling instructions from buffered memory. This will be
required for emulation.
Also adds some test cases which nabbed bugs during the development and
testing of this change.
Diffstat (limited to 'test')
-rw-r--r-- | test/full-pipeline/006-2-inst-2-words.asm | 2 | ||||
-rw-r--r-- | test/full-pipeline/007-3-inst-3-words.asm | 3 | ||||
-rw-r--r-- | test/full-pipeline/008-3-inst-5-words.asm | 3 | ||||
-rw-r--r-- | test/full-pipeline/009-3-inst-5-words-rev.asm | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/test/full-pipeline/006-2-inst-2-words.asm b/test/full-pipeline/006-2-inst-2-words.asm new file mode 100644 index 0000000..c4e2dbc --- /dev/null +++ b/test/full-pipeline/006-2-inst-2-words.asm @@ -0,0 +1,2 @@ +nop +nop diff --git a/test/full-pipeline/007-3-inst-3-words.asm b/test/full-pipeline/007-3-inst-3-words.asm new file mode 100644 index 0000000..717a122 --- /dev/null +++ b/test/full-pipeline/007-3-inst-3-words.asm @@ -0,0 +1,3 @@ +nop +nop +nop diff --git a/test/full-pipeline/008-3-inst-5-words.asm b/test/full-pipeline/008-3-inst-5-words.asm new file mode 100644 index 0000000..c0a33b5 --- /dev/null +++ b/test/full-pipeline/008-3-inst-5-words.asm @@ -0,0 +1,3 @@ +jmp 0 +jmp 0 +nop diff --git a/test/full-pipeline/009-3-inst-5-words-rev.asm b/test/full-pipeline/009-3-inst-5-words-rev.asm new file mode 100644 index 0000000..5592edd --- /dev/null +++ b/test/full-pipeline/009-3-inst-5-words-rev.asm @@ -0,0 +1,3 @@ +nop +jmp 0 +jmp 0 |