From: Bernard Blackham Date: Mon, 21 Jun 2004 10:33:40 +0000 (+0000) Subject: Turn off soft registers. Make code to suit. X-Git-Tag: ROMW~38 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=3ed49f716451fb86825eb6ff4c5a32a08f29b2be;p=uccvend-snackrom.git Turn off soft registers. Make code to suit. --- diff --git a/ROM2/Makefile b/ROM2/Makefile index af99105..5ebabe2 100644 --- a/ROM2/Makefile +++ b/ROM2/Makefile @@ -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 \ diff --git a/ROM2/main_basic.c b/ROM2/main_basic.c index 94680c8..fc736d7 100644 --- a/ROM2/main_basic.c +++ b/ROM2/main_basic.c @@ -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] = ' ';