diff --git a/src/commonMain/kotlin/mtmc/os/shell/Shell.kt b/src/commonMain/kotlin/mtmc/os/shell/Shell.kt index 04d6c4f..8bfe267 100644 --- a/src/commonMain/kotlin/mtmc/os/shell/Shell.kt +++ b/src/commonMain/kotlin/mtmc/os/shell/Shell.kt @@ -77,6 +77,7 @@ object Shell { } fun execCommand(command: String, computer: MonTanaMiniComputer) { + println("Exec: $command") val tokens = MTMCTokenizer(command, "#") try { val identifier = tokens.matchAndConsume(MTMCToken.TokenType.IDENTIFIER) @@ -101,6 +102,7 @@ object Shell { if (isCommand(cmd)) { COMMANDS[cmd.lowercase()]!!.exec(tokens, computer) } else { + println("Executing: $command") tokens.reset() val asm = mutableListOf() asm.addAll(tokens.tokens) diff --git a/src/jsMain/kotlin/mtmc/view/ConsoleView.kt b/src/jsMain/kotlin/mtmc/view/ConsoleView.kt index a9037db..d68cf75 100644 --- a/src/jsMain/kotlin/mtmc/view/ConsoleView.kt +++ b/src/jsMain/kotlin/mtmc/view/ConsoleView.kt @@ -53,10 +53,10 @@ class ConsoleView( private fun handleCommand() { history.add(input) - input = "" Shell.execCommand(input, computer) + input = "" mainView.requestUpdate() }