From e1b0b4dcbd5991768b408958632aad1e4cc1fe8d Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 14 Nov 2026 12:45:01 -0600 Subject: Add 'exec' command to monitor for running arbitrary instructions --- rvcontroller.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'rvcontroller.lua') diff --git a/rvcontroller.lua b/rvcontroller.lua index 942504c..8319b5c 100644 --- a/rvcontroller.lua +++ b/rvcontroller.lua @@ -4024,6 +4024,18 @@ elseif event.channel == "monitorkb" then else digiline_send("monitordisp","Invalid argument") end + elseif argv[1] == "exec" then + local instruction = tonumber(argv[2] or "",16) + if not instruction then + digiline_send("monitordisp","Bad instruction") + else + if instruction%4 == 3 then + runinst(instruction) + else + runcinst(instruction) + end + digiline_send("monitordisp","OK") + end elseif argv[1] == "help" then if argc == 1 or argv[2] == "1" then digiline_send("monitordisp","Use: help ") @@ -4055,7 +4067,7 @@ elseif event.channel == "monitorkb" then elseif argv[2] == "help" then digiline_send("monitordisp","help [command]\nShows information\nabout the specified\ncommand, or a list\nof commands if none\nis supplied") elseif argv[2] == "2" then - digiline_send("monitordisp","Page 2\nreset stop help\nsetbreak clearbreak\nrdcsr wrcsr endian") + digiline_send("monitordisp","Page 2\nreset stop help\nsetbreak clearbreak\nrdcsr wrcsr endian\nexec") elseif argv[2] == "h" then digiline_send("monitordisp","h\nhhhhhhhhhh") elseif argv[2] == "setbreak" then @@ -4068,6 +4080,8 @@ elseif event.channel == "monitorkb" then digiline_send("monitordisp","wrcsr \nWrites the specifed\nvalue into the\nspecified CSR") elseif argv[2] == "endian" then digiline_send("monitordisp","endian [b | e]\nDisplays or changes\nthe current\nendianness") + elseif argv[2] == "exec" then + digiline_send("monitordisp","exec \nExecutes an\narbitrary\ninstruction") else digiline_send("monitordisp","No such command or\nno help available") end -- cgit v1.2.3