diff runtime.S @ 176:e2918b5208eb

Print a message when we try to run an invalid instruction, not when we try to translate it
author Mike Pavone <pavone@retrodev.com>
date Sun, 06 Jan 2013 21:42:57 -0800
parents 7504200cac86
children c66e4636f991
line wrap: on
line diff
--- a/runtime.S	Sun Jan 06 20:49:42 2013 -0800
+++ b/runtime.S	Sun Jan 06 21:42:57 2013 -0800
@@ -88,6 +88,18 @@
 	call m68k_native_addr_and_sync
 	add $24, %eax
 	jmp *%rcx
+
+invalid_msg:
+	.asciz "Invalid instruction at %X\n"
+	
+	.global m68k_invalid
+m68k_invalid:
+	lea invalid_msg(%rip), %rdi
+	mov %ecx, %esi
+	xor %rax, %rax
+	call printf
+	mov $1, %rdi
+	call exit
 	
 int_dbg_msg:
 	.asciz "Executing Interrupt!"