In SX Microcontrollers, SX/B Compiler and SX-Key Tool, IsmStudios wrote: Hey, maybe this might help-- When calling two Delay macros that evaluate to only 1 rept block each would look like this: [code] REPT 5 mov RC, #CBURST_HIGH ; ( 2 cycles ) Delay(4) mov RC, #CBURST_LOW ; ( 2 cycles ) Delay(4) ENDR [/code] Doesn't seem to crash for two reasons (even though two rept blocks are being nested within [b]rept 5[/b]. a) When Delay is 4, the macro seems to put only 1 rept block in it's place... Remember that a single nested block compiles fine. b) Also notice that there are two Delays here but it compiles just fine because I think SASM first unravels the first Delay into "pure code" before evaluating the next macro. Might look like this after one block is evaluated: [code] REPT 5 mov RC, #CBURST_HIGH ; ( 2 cycles ) NOP NOP NOP NOP mov RC, #CBURST_LOW ; ( 2 cycles ) Delay(4) ENDR [/code] Which is fine... because the next Delay is going to place only 1 more rept block as well before it unravels it. In my opinion, it seems SASM is having problem evaluating 1 block before the other--or it doesn't know how to prioritize them... might be a recursive issue. But let's hope not! Anyway, hope that helps! Also, let me know if you need me to find more cases. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157382#m157557 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)