diff options
| author | cheapie <cheapiephp@gmail.com> | 2026-11-14 12:45:01 -0600 |
|---|---|---|
| committer | cheapie <cheapiephp@gmail.com> | 2026-11-14 12:45:01 -0600 |
| commit | e1b0b4dcbd5991768b408958632aad1e4cc1fe8d (patch) | |
| tree | 0372c43c21984c6bb326f90ce2fb1407be2aa9d2 /rvcontroller.lua | |
| parent | 317c86f160ef116b2f080921cdaf1350687b350c (diff) | |
| download | rvcontroller-e1b0b4dcbd5991768b408958632aad1e4cc1fe8d.tar rvcontroller-e1b0b4dcbd5991768b408958632aad1e4cc1fe8d.tar.gz rvcontroller-e1b0b4dcbd5991768b408958632aad1e4cc1fe8d.tar.bz2 rvcontroller-e1b0b4dcbd5991768b408958632aad1e4cc1fe8d.tar.xz rvcontroller-e1b0b4dcbd5991768b408958632aad1e4cc1fe8d.zip | |
Add 'exec' command to monitor for running arbitrary instructions
Diffstat (limited to 'rvcontroller.lua')
| -rw-r--r-- | rvcontroller.lua | 16 |
1 files changed, 15 insertions, 1 deletions
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 <command>") @@ -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 <addr> <data>\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 <instruction>\nExecutes an\narbitrary\ninstruction") else digiline_send("monitordisp","No such command or\nno help available") end |
