From d62518b5eb1f16e75ce049bd2b210d067dcdeaf7 Mon Sep 17 00:00:00 2001 From: Ry Date: Wed, 5 Oct 2022 16:20:50 -0700 Subject: [PATCH] barclock: Draw a leading zero if the minute is less than 10 --- barclock/main.asm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/barclock/main.asm b/barclock/main.asm index d5f8313..e495e03 100644 --- a/barclock/main.asm +++ b/barclock/main.asm @@ -29,6 +29,8 @@ loop: ; minute in r0, 0x80000704 + cmp r0, 10 + iflt call minute_less_than_10 call draw_decimal_to_overlay loop_end: @@ -40,6 +42,12 @@ afternoon: add r1, 8 ret +minute_less_than_10: + mov r0, 0 + call draw_decimal_to_overlay + in r0, 0x80000704 + ret + second_counter: data.8 0 #include "../../fox32rom/fox32rom.def"