From 3350c34a74844e21ea69077e01efff3bae64bdcd Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 23 Mar 2021 17:31:08 -0700 Subject: . --- html/baremetal/ex7.mu.html | 108 --------------------------------------------- 1 file changed, 108 deletions(-) delete mode 100644 html/baremetal/ex7.mu.html (limited to 'html/baremetal/ex7.mu.html') diff --git a/html/baremetal/ex7.mu.html b/html/baremetal/ex7.mu.html deleted file mode 100644 index 0235d49f..00000000 --- a/html/baremetal/ex7.mu.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - -Mu - baremetal/ex7.mu - - - - - - - - - - -https://github.com/akkartik/mu/blob/main/baremetal/ex7.mu -
- 1 # Cursor-based motions.
- 2 #
- 3 # To build a disk image:
- 4 #   ./translate_mu_baremetal baremetal/ex7.mu     # emits disk.img
- 5 # To run:
- 6 #   qemu-system-i386 disk.img
- 7 # Or:
- 8 #   bochs -f baremetal/boot.bochsrc               # boot.bochsrc loads disk.img
- 9 #
-10 # Expected output: an interactive game a bit like "snakes". Try pressing h, j,
-11 # k, l.
-12 
-13 fn main {
-14   var space/eax: grapheme <- copy 0x20
-15   set-cursor-position 0/screen, 0, 0
-16   {
-17     show-cursor 0/screen, space
-18     var key/eax: byte <- read-key 0/keyboard
-19     {
-20       compare key, 0x68/h
-21       break-if-!=
-22       draw-code-point-at-cursor 0/screen, 0x2d/dash, 0x31/fg, 0/bg
-23       move-cursor-left 0
-24     }
-25     {
-26       compare key, 0x6a/j
-27       break-if-!=
-28       draw-code-point-at-cursor 0/screen, 0x7c/vertical-bar, 0x31/fg, 0/bg
-29       move-cursor-down 0
-30     }
-31     {
-32       compare key, 0x6b/k
-33       break-if-!=
-34       draw-code-point-at-cursor 0/screen, 0x7c/vertical-bar, 0x31/fg, 0/bg
-35       move-cursor-up 0
-36     }
-37     {
-38       compare key, 0x6c/l
-39       break-if-!=
-40       var g/eax: code-point <- copy 0x2d/dash
-41       draw-code-point-at-cursor 0/screen, 0x2d/dash, 0x31/fg, 0/bg
-42       move-cursor-right 0
-43     }
-44     loop
-45   }
-46 }
-
- - - -- cgit 1.4.1-2-gfad0