In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote: Lewis, There is where it becomes more of an architectural change than a bug fix. Assemblers by their nature are linear beasts. They go through the code line by line in the sequence it was written. Without first finding [b]all[/b] REPT blocks, there is no easy way to know you are working on the "inner" REPTs versus the outer REPT. In addition, you're assuming a solution that handles your particular example without also assuming that there will someone else doing something even more "interesting" with the assembler. For example, it's conceivable that someone might write code like this: [code]REPT 2 REPT 3 ENDR ; 3 REPT 4 REPT 5 ENDR ; 5 REPT 6 ENDR ; 6 ENDR ; 4 ENDR ; 2 [/code] Now there is an "inner-inner" block to handle as well as the previously mentioned "inner" block. Furthermore, all of this is complicated by the presence of the IF assembler conditional and the possibility that inside REPT blocks may contain macros which themselve may contain nested or sequential (or both) REPT blocks. It all gets nasty quickly, and it makes it impossible to test the assembler against all possible legal code sequences. [list]Thanks, PeterM[/list] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157382#m157579 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)