From: Mark Tearle Date: Sun, 30 Nov 2014 07:57:42 +0000 (+0800) Subject: Rearrange code to work around compiler parsing bugs X-Git-Tag: ROMY~7 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=165b81172d7e8b580e43a311a934b4a205034677;p=uccvend-snackrom.git Rearrange code to work around compiler parsing bugs --- diff --git a/ROM2/main_basic.c b/ROM2/main_basic.c index 381db9c..a63c858 100644 --- a/ROM2/main_basic.c +++ b/ROM2/main_basic.c @@ -443,12 +443,16 @@ void getrom() { return; } char s[4]; + + u16 rom_addr; + rom_addr = (u16)(&_rom_src_data); + send_string("Writing to serial port (maybe). Size is 0x"); send_string(u82hex(_rom_src_len >> 8)); send_string(u82hex(_rom_src_len & 0xff)); send_string("@0x"); - send_string(u82hex((u16)(&_rom_src_data) >> 8)); - send_string(u82hex((u16)(&_rom_src_data) & 0xff)); + send_string(u82hex(rom_addr >> 8)); + send_string(u82hex(rom_addr & 0xff)); send_string(" with signature "); s[0] = _rom_src_data[0]; s[1] = _rom_src_data[1];