In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: pjv, Attached program generates this listing: 1 07F8 0F7F device SX28,oschs1,turbo,stackx,optionx ;sx device options 2 =00000000 irc_cal IRC_SLOW 3 =02FAF080 freq 50_000_000 ;cpu frequency 4 07FF 0A07 reset main 5 6 Assign macro Name ;create a macro 7 ifndef I??Name?? ;test for the modified parameter passed already exists 8 I??Name?? 9 jmp @??Name?? ;create this label from the parameter passed 10 endif 11 endm ;done 12 13 =00000000 org 0 14 Assign rx1 15 m ifndef Irx1 ;test for the modified parameter passed already exists 16 m Irx1 17 m jmp @rx1 ;create this label from the parameter passed 18 m endif 20 Assign rx2 21 m ifndef Irx2 ;test for the modified parameter passed already exists 22 m Irx2 23 m jmp @rx2 ;create this label from the parameter passed 24 m endif 26 =00000004 rx1 27 0000 0C01 mov w,#1 28 =00000005 rx2 29 0001 01C4 add w,fsr 30 0002 000C ret 31 =00000007 main 32 0003 0A07 jmp main Cross Reference 10 symbols Symbol Type Value Line __SASM DATA 00000001 0000 __SX_FREQ DATA 02FAF080 0003 __SX_IRC_CAL DATA 00000000 0002 __SX_RESET RESB 00000A07 0004 fsr RESV 00000004 0029 Irx1 ADDR 00000000 0016 Irx2 ADDR 00000002 0022 main ADDR 00000007 0031 rx1 ADDR 00000004 0026 rx2 ADDR 00000005 0028 According to the symbol table, Irx1 and Irx2 are created at the right addresses. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=244787#m245741 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)