More changes
[uccvend-snackrom.git] / ROM2 / helpers.c
index ead76da..c4e5970 100644 (file)
@@ -9,3 +9,12 @@ void delay(u16 ms) {
        }
 }
 
+void print_amount(u16 amt) {
+       /* take amt and show it on screen with a $ sign */
+       char str[10] = {' ', '$', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '};
+       u8 pos;
+       for (pos = 7; amt; pos--, amt/=10);
+               str[pos] = amt%10 + '0';
+       }
+       set_msg(str, WRAP_NONE);
+}

UCC git Repository :: git.ucc.asn.au