if_c or saved,#1 if_nc andn saved,#1 if_z or saved,#2 if_nz andn saved,#2
mov saved,#0 if_c or saved,#1 if_z or saved,#2
mov saved,#0 if_c or saved,hibit if_nz or saved,#1
add saved,saved wc,wz
' To save both flags ... MUXNZ flags,#2 MUXC flags,#1 ' To reload both flags ... SHR flags,#1 WC, WZ, NR
Comments
or
Something like this might work:
Then to restore you just need to
for a destructive save, or
<pre>
mov acc,saved
add acc,saved wc,wz
</pre>
for a nondestructive save.