From f8cb5f97c6d89c2a71b0587056b49bc4642f21d4 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 13 Jan 2021 19:50:30 -0800 Subject: 7513 --- html/baremetal/ex7.mu.html | 64 ++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'html/baremetal') diff --git a/html/baremetal/ex7.mu.html b/html/baremetal/ex7.mu.html index b19f6e13..f45d38dc 100644 --- a/html/baremetal/ex7.mu.html +++ b/html/baremetal/ex7.mu.html @@ -69,39 +69,37 @@ if ('onhashchange' in window) { 11 # k, l. 12 13 fn main { -14 { -15 var key/eax: byte <- read-key 0 -16 { -17 compare key, 0x68 # 'h' -18 break-if-!= -19 var g/eax: grapheme <- copy 0x2d # '-' -20 draw-grapheme-at-cursor 0, g, 0x31 -21 cursor-left 0 -22 } -23 { -24 compare key, 0x6a # 'j' -25 break-if-!= -26 var g/eax: grapheme <- copy 0x7c # '|' -27 draw-grapheme-at-cursor 0, g, 0x31 -28 cursor-down 0 -29 } -30 { -31 compare key, 0x6b # 'k' -32 break-if-!= -33 var g/eax: grapheme <- copy 0x7c # '|' -34 draw-grapheme-at-cursor 0, g, 0x31 -35 cursor-up 0 -36 } -37 { -38 compare key, 0x6c # 'l' -39 break-if-!= -40 var g/eax: grapheme <- copy 0x2d # '-' -41 draw-grapheme-at-cursor 0, g, 0x31 -42 cursor-right 0 -43 } -44 loop -45 } -46 } +14 var key/eax: byte <- read-key 0 +15 { +16 compare key, 0x68 # 'h' +17 break-if-!= +18 var g/eax: grapheme <- copy 0x2d # '-' +19 draw-grapheme-at-cursor 0, g, 0x31 +20 cursor-left 0 +21 } +22 { +23 compare key, 0x6a # 'j' +24 break-if-!= +25 var g/eax: grapheme <- copy 0x7c # '|' +26 draw-grapheme-at-cursor 0, g, 0x31 +27 cursor-down 0 +28 } +29 { +30 compare key, 0x6b # 'k' +31 break-if-!= +32 var g/eax: grapheme <- copy 0x7c # '|' +33 draw-grapheme-at-cursor 0, g, 0x31 +34 cursor-up 0 +35 } +36 { +37 compare key, 0x6c # 'l' +38 break-if-!= +39 var g/eax: grapheme <- copy 0x2d # '-' +40 draw-grapheme-at-cursor 0, g, 0x31 +41 cursor-right 0 +42 } +43 loop +44 } -- cgit 1.4.1-2-gfad0