cpu.8080: Throw an error not a string.
parent
58ee52e63b
commit
36b11c2ed1
|
@ -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 -- )
|
||||
|
|
Loading…
Reference in New Issue