From 29523c7eb665c942897833fd68d609b0d5651a6d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 30 Oct 2021 01:15:23 -0700 Subject: done with first draft of tutorial --- tutorial/task15.mu | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tutorial/task15.mu (limited to 'tutorial/task15.mu') 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 + } +} -- cgit 1.4.1-2-gfad0