changeset 2680:e3394457427e

Fix small bug in goto dispatch output of CPU dsl
author Michael Pavone <pavone@retrodev.com>
date Wed, 26 Mar 2025 01:20:09 -0700
parents 69c1093f8726
children c4256ce2c45a
files cpu_dsl.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cpu_dsl.py	Wed Mar 26 01:17:04 2025 -0700
+++ b/cpu_dsl.py	Wed Mar 26 01:20:09 2025 -0700
@@ -2271,9 +2271,9 @@
 			pieces.append('\nunimplemented:')
 			if len(self.mainDispatch) == 1:
 				dispatch = list(self.mainDispatch)[0]
-				body.append(f'\n\tfatal_error("Unimplemented instruction: %X\\n", {dispatch});')
+				pieces.append(f'\n\tfatal_error("Unimplemented instruction: %X\\n", {dispatch});')
 			else:
-				body.append('\n\tfatal_error("Unimplemented instruction\\n");')
+				pieces.append('\n\tfatal_error("Unimplemented instruction\\n");')
 			pieces.append('\n}')
 		return ''.join(body) +  ''.join(pieces)