Incrementing a pointer

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HuEl_264296
Level 5
Level 5
First like given 25 sign-ins First solution authored

Hi all,

   

Just looking at the assembler output from PSoC Creator for the PSoC 3. The code:

   

 

   

uint8 *p=0;
p++;

   

 

   

produces this assembler:

   

 

   

MOV     DPTR,#p+01H
CLR     A
MOV     B,#01H
LCALL   ?C?IILDX
 

   

A call? To increment a pointer? What's with that?

   

 

   

Hugo

0 Likes
3 Replies