about summary refs log blame commit diff stats
path: root/baremetal/shell/main.mu
blob: ee2dda60a79991c13b50c5eb2bb723e6f5b4dc1e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                          
# Experimental Mu shell
# A Lisp with indent-sensitivity and infix, no macros. Commas are ignored.

fn main {
  var sandbox-storage: sandbox
  var sandbox/esi: (addr sandbox) <- address sandbox-storage
  initialize-sandbox sandbox
  {
    render-sandbox 0/screen, sandbox, 2/x, 2/y
    var key/eax: byte <- read-key 0/keyboard
    compare key, 0
    loop-if-=
    # no way to quit right now; just reboot
    edit-sandbox sandbox, key
    loop
  }
}