; Tests that the CPU stops when it meets a byte it cannot decode. ; ; CHOSEN AWAY FROM HALT, because the bytes next to it get used. This said 0xFE for ; a long time, and then 0xFE became WAIT - so the test stopped faulting and started ; SLEEPING. It hung instead of failing, which is the worst way for a test to notice ; that the thing it was testing had moved. ; ; 0xFD is not an instruction. Placing it in the Program Segment as a literal gets ; it past the assembler, which is the only way to build a program containing one. ; ; The CPU should raise the Fault Flag, halt, and leave the Program Counter pointing ; at the offending byte rather than stepping over it and carrying on. The emulator ; then reports what it was and where, and exits non zero. #Program start: INIA 0d65 ; Something harmless first, so the fault is not at address zero. 0xFD ; Not an instruction. HALT ; Never reached.