Hi there,
I'm trying to zero out the bitvars area in a 8052 cpu in the 'cstartup' file.
My compiler (IAR) has two "assembler operators" SFB(..) and SFE(..) that gives me the start and end of the "bit addresses" that needs to be cleared.
MOV R0,#SFB(BITVARS) SJMP CLEAR_BITVAR_2 CLEAR_BITVAR: CLR R0 INC R0 CLEAR_BITVAR_2: CJNE R0,#SFE(BITVARS),CLEAR_BITVAR
This code doesnt seem to work. I'm not sure but it's probably the "CLR R0" line that's the problem. Regards