diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-02-21 21:25:38 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-02-21 21:26:08 -0800 |
commit | 8b8d0fc77130c6f39aae42319aee1f449fd4db70 (patch) | |
tree | bdf3516884e159fcd33874d837e53816cebd25fd /baremetal/shell/sandbox.mu | |
parent | 7e9e65eece359d6bb28d202eec035cf7acc5118a (diff) | |
download | mu-8b8d0fc77130c6f39aae42319aee1f449fd4db70.tar.gz |
7772
Diffstat (limited to 'baremetal/shell/sandbox.mu')
-rw-r--r-- | baremetal/shell/sandbox.mu | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/baremetal/shell/sandbox.mu b/baremetal/shell/sandbox.mu index d1a24c47..b002ce0a 100644 --- a/baremetal/shell/sandbox.mu +++ b/baremetal/shell/sandbox.mu @@ -69,6 +69,14 @@ fn edit-sandbox _self: (addr sandbox), key: byte, interpreter: (addr interpreter return } { + compare g, 0x12/ctrl-r + break-if-!= + # ctrl-r: run function outside sandbox + # required: fn (addr screen), (addr keyboard) + # Mu will pass in the real screen and keyboard. + return + } + { compare g, 0x13/ctrl-s break-if-!= # ctrl-s: run sandbox(es) @@ -79,7 +87,7 @@ fn edit-sandbox _self: (addr sandbox), key: byte, interpreter: (addr interpreter emit-gap-buffer data, buffer var value-ah/eax: (addr handle stream byte) <- get self, value var value/eax: (addr stream byte) <- lookup *value-ah - evaluate interpreter, buffer, value + run interpreter, buffer, value return } add-grapheme-to-sandbox self, g |