Turn off soft registers. Make code to suit.
authorBernard Blackham <[email protected]>
Mon, 21 Jun 2004 10:33:40 +0000 (10:33 +0000)
committerBernard Blackham <[email protected]>
Mon, 21 Jun 2004 10:33:40 +0000 (10:33 +0000)
ROM2/Makefile
ROM2/main_basic.c

index af99105..5ebabe2 100644 (file)
@@ -8,7 +8,7 @@ INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
 
 # debugging doesn't get compiled into the ROM image
 CFLAGS = -m68hc11 -mshort -Wall -O1 \
-       -msoft-reg-count=1 -ffixed-z -g -fomit-frame-pointer
+       -msoft-reg-count=0 -ffixed-z -g -fomit-frame-pointer
 
 LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
          -nostartfiles \
index 94680c8..fc736d7 100644 (file)
@@ -234,10 +234,16 @@ int main() {
                                cur_motor[0] = 0xff;
                        } else {
                                if (cur_motor[0]) {
+                                       u8 motor_num;
                                        cur_motor[1] = last_key%10;
                                        display_buf[1] = cur_motor[1]+'0';
                                        set_msg(display_buf);
-                                       dispense_motor((cur_motor[0]%10)*10 + cur_motor[1]);
+
+                                       motor_num = cur_motor[0]%10;
+                                       motor_num *= 10;
+                                       motor_num += cur_motor[1];
+                                       dispense_motor(motor_num);
+
                                        set_msg("THANK  YOU");
                                        display_buf[0] = ' ';
                                        display_buf[1] = ' ';

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