Alan B. Pearce wrote: > The problem that I have had is as follows: - > > ; unknown banked state > dbankif bank_x_register > ; operations using bank_x_registers > > label: > dbankif bank_x_register > ; more operations using bank_x_registers > dbankif bank_y_register > ; operations using bank_y_registers > bne label > ; more operations > > The problem arises because the dbankif immediately after the label > generates no code because bank_x is already selected using the macro > before the label. the next dbankif then changes the bank selected, some > operations happen, then branch back to the label. The easiest fix I found > was to change the dbankif after the label to a dbank so the macro > inserted code irrespective of the previous bank. That's precisely what Olin's "unbank" macro is for. You should put one after every label, unless you know for sure that every path to this label has the bank controls in a known state -- in which case, you can state this explicitly with the "dbankis " macro. You *have* read the documentation (all those comments in std.ins.aspic), haven't you? :-) -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist