diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-10-30 01:15:23 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-10-30 01:15:23 -0700 |
commit | 29523c7eb665c942897833fd68d609b0d5651a6d (patch) | |
tree | 2980ef6ad8eb8f25dd400f6f638aed8763c2d299 /tutorial/task15.mu | |
parent | bd356e540926f27a1180b436fa0ec5e8031564ee (diff) | |
download | mu-29523c7eb665c942897833fd68d609b0d5651a6d.tar.gz |
done with first draft of tutorial
Diffstat (limited to 'tutorial/task15.mu')
-rw-r--r-- | tutorial/task15.mu | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tutorial/task15.mu b/tutorial/task15.mu new file mode 100644 index 00000000..a53c2454 --- /dev/null +++ b/tutorial/task15.mu @@ -0,0 +1,19 @@ +fn main screen: (addr screen) { + var y/eax: int <- copy 0 + { + compare y, 0x300/screen-height=768 + break-if->= + var x/edx: int <- copy 0 + { + compare x, 0x400/screen-width=1024 + break-if->= + var color/ecx: int <- copy x + color <- and 0xff + pixel screen x, y, color + x <- increment + loop + } + y <- increment + loop + } +} |