No exact or substring matches. trying for part
'[PICLIST] [PIC] Bug with MPLAB SIM with the 18c252'
Has anyone noticed a bug when using the MPLAB SIM with a 18c252. In
particular, the update of status bits with code that is part of a macro. I
have observed the following.
DECF_24 MACRO src
; 8 CYCLES
SUBWF src+0,F,A ;Low Byte
SUBWFB src+1,F,A ;Middle Byte
MOVF src+0,W,A ;Now generate a zero test keeping result in status,Z
Now, in my code I have the following.
FR_COUNT_L EQU 0x01
FR_COUNT_H EQU 0x02
FR_COUNT_U EQU 0x03
Then, I declare another variable
FR_COUNT EQU 0x01 ;Low byte of 24bit value.
...Then somewhere in code I make the following:
Now, the sim does the correct action on the true variables as expected, but
the last part of the macro which is to generate a Z condition if it is
actually zero does not work. However, if I replace the src+n with it actual
variable, I.E. FR_COUNT_L... then Z is update in the SIM.
Why does the SIM work on the arthimatic ok, but fail to update the status
bits when using macro substitution?
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
More... (looser matching)
- Last day of these posts
- In 2002
, 2003 only
- New search...