From 69ee6820a2c7e87897a16ceb7b616b5d9e03a82a Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 30 Dec 2005 18:04:40 +0000 Subject: [PATCH] give macro formal parameters globally unique names, urgh --- detpic/i2clib.asm | 10 +++++----- detpic/mascan.asm | 12 ++++++------ detpic/watchdog.asm | 4 ++-- iwjpictest/harness.asm | 21 +++++++++++---------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/detpic/i2clib.asm b/detpic/i2clib.asm index 83a1827..633657d 100644 --- a/detpic/i2clib.asm +++ b/detpic/i2clib.asm @@ -426,13 +426,13 @@ init_enable ;---------- ; Macros: chkvals_start and chkval -chkvals_start macro what - mov_fw what +chkvals_start macro chvals_what + mov_fw chvals_what endm -chkval macro lastval, value, label - xor_lw value ^ lastval - bra_z label +chkval macro chkval_lastval, chkval_value, chkval_label + xor_lw chkval_value ^ chkval_lastval + bra_z chkval_label endm near_i2csu code diff --git a/detpic/mascan.asm b/detpic/mascan.asm index 34bc159..27811ee 100644 --- a/detpic/mascan.asm +++ b/detpic/mascan.asm @@ -402,23 +402,23 @@ loopback_read_byte @ ;====================================================================== ; GENERATION OF DETECTION MESSAGES FOR HOST - MAD BT_F_IF1 TABLES -addmsg_testbit macro bit - bt_f_if1 u, bit +addmsg_testbit macro addmsg_macro_bit + bt_f_if1 u, addmsg_macro_bit rcall addmsg_one endm -addmsg_return macro dummy_bit +addmsg_return macro dummy_addmsg_macro_bit goto i2c_arrange_next_byte endm -addmsg_ignore macro dummy_bit +addmsg_ignore macro dummy_addmsg_macro_bit nop nop endm -addmsg_padding macro dummy_bit +addmsg_padding macro dummy_addmsg_macro_bit nop - mov_lw dummy_bit + mov_lw dummy_addmsg_macro_bit endm ;---------------------------------------- diff --git a/detpic/watchdog.asm b/detpic/watchdog.asm index f4b34a4..9204e46 100644 --- a/detpic/watchdog.asm +++ b/detpic/watchdog.asm @@ -35,8 +35,8 @@ watchdog_init @ clr_f watchdog mov_lfsr bufferw, 1 -wdog_byte macro v - mov_lw v +wdog_byte macro wdog_byte_v + mov_lw wdog_byte_v mov_wf POSTINC1 endm diff --git a/iwjpictest/harness.asm b/iwjpictest/harness.asm index fea0f29..523ab03 100644 --- a/iwjpictest/harness.asm +++ b/iwjpictest/harness.asm @@ -92,10 +92,10 @@ test_loc_5a res 1 code ;---------------------------------------- -serial_literal macro char +serial_literal macro serial_literal_macro_char ; transmits char through the serial port ; W undefined undefined - mov_lw char + mov_lw serial_literal_macro_char rcall serial_write_char endm @@ -129,22 +129,23 @@ command_loop mov_wf original_op check_last set 0 -checkequal macro value, label +checkequal macro check_value, check_label local check_ifnot - add_lw check_last-value + add_lw check_last - check_value bra_nz check_ifnot - bra label + bra check_label check_ifnot -check_last set value +check_last set check_value endm -checkatleast macro minvalue, label ; if it takes, W gets char-minvalue - add_lw check_last-minvalue +checkatleast macro check_minvalue, check_label + ; if it takes, W gets char - check_minvalue + add_lw check_last-check_minvalue local check_ifnot bra_n check_ifnot - bra label + bra check_label check_ifnot -check_last set minvalue +check_last set check_minvalue endm ; data entry -- 2.30.2