cpu.8080: Throw an error not a string.
parent
58ee52e63b
commit
36b11c2ed1
|
@ -499,13 +499,15 @@ SYMBOL: rom-root
|
||||||
[ over 1 + swap pc<< ] keep
|
[ over 1 + swap pc<< ] keep
|
||||||
read-byte ;
|
read-byte ;
|
||||||
|
|
||||||
|
ERROR: undefined-8080-opcode n ;
|
||||||
|
|
||||||
: get-cycles ( n -- opcode )
|
: get-cycles ( n -- opcode )
|
||||||
#! Returns the cycles for the given instruction value.
|
#! Returns the cycles for the given instruction value.
|
||||||
#! If the opcode is not defined throw an error.
|
#! If the opcode is not defined throw an error.
|
||||||
dup instruction-cycles nth [
|
dup instruction-cycles nth [
|
||||||
nip
|
nip
|
||||||
] [
|
] [
|
||||||
[ "Undefined 8080 opcode: " % number>string % ] "" make throw
|
undefined-8080-opcode
|
||||||
] if* ;
|
] if* ;
|
||||||
|
|
||||||
: process-interrupts ( cpu -- )
|
: process-interrupts ( cpu -- )
|
||||||
|
|
Loading…
Reference in New Issue