about summary refs log tree commit diff stats
path: root/baremetal/ex2.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-29 21:19:41 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-29 21:19:41 -0800
commit1e02d840e8ba63be0f41d7db278bb39b7141d4fd (patch)
tree4b4b35a8590d154e4ea8f425ddefe45660efe8ff /baremetal/ex2.mu
parent520e3c25427f48bd68ded41a5678ca43c28a9891 (diff)
downloadmu-1e02d840e8ba63be0f41d7db278bb39b7141d4fd.tar.gz
7471
Diffstat (limited to 'baremetal/ex2.mu')
-rw-r--r--baremetal/ex2.mu4
1 files changed, 2 insertions, 2 deletions
diff --git a/baremetal/ex2.mu b/baremetal/ex2.mu
index 091cb1d0..4e0f20ae 100644
--- a/baremetal/ex2.mu
+++ b/baremetal/ex2.mu
@@ -15,12 +15,12 @@ fn main {
   {
     compare y, 0x300  # 768
     break-if->=
-    var color/ecx: int <- copy y
-    color <- and 0xff
     var x/edx: int <- copy 0
     {
       compare x, 0x400  # 1024
       break-if->=
+      var color/ecx: int <- copy x
+      color <- and 0xff
       pixel 0, x, y, color
       x <- increment
       loop