From 36b11c2ed1f7f54c84f78d2ca872ca6100674637 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Fri, 29 Mar 2013 09:46:34 -0700 Subject: [PATCH] cpu.8080: Throw an error not a string. --- extra/cpu/8080/emulator/emulator.factor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extra/cpu/8080/emulator/emulator.factor b/extra/cpu/8080/emulator/emulator.factor index 4e166a646d..f79a70c50f 100644 --- a/extra/cpu/8080/emulator/emulator.factor +++ b/extra/cpu/8080/emulator/emulator.factor @@ -499,13 +499,15 @@ SYMBOL: rom-root [ over 1 + swap pc<< ] keep read-byte ; +ERROR: undefined-8080-opcode n ; + : get-cycles ( n -- opcode ) #! Returns the cycles for the given instruction value. #! If the opcode is not defined throw an error. dup instruction-cycles nth [ nip ] [ - [ "Undefined 8080 opcode: " % number>string % ] "" make throw + undefined-8080-opcode ] if* ; : process-interrupts ( cpu -- )