Use replace field contents with the calculation option:
Replace Field Contents [no dialog ; Yourtable::f1 ; If ( Code (a)+ Code (b) = 2 ; Yourtable::f8 ; Yourtable::f1 ) ]
This does it all in one step without any loops.
Cautionary Note: This is best done on single user databases or under circumstances when you can be absolutely sure that no records in your current found set might be opened for editing by a different user.
Makes perfect sense - build the if statment into the replace command. Brilliant! Will tweak this and report back.