Skip to main content
Visitor II
October 21, 2016
Question

st7 Dev #define wrong value

  • October 21, 2016
  • 0 replies
  • 551 views
Posted on October 21, 2016 at 18:30

Hi, have a really strange problem if I use

#define fred 0 and then LD A,#fred, A = 6 (Wrong)

If I use #define fred 00 and then LD A,#fred, A = 0 (Right)

If I use #define fred $0 and then LD A,#fred, A = 0 (Right)

If I move the the #define fred 0 to different area of code it also works ok

I see there is a max of 4096 #define statements that can be used but I am nowhere near that.

Any thoughts

Regards, Brian  
    This topic has been closed for replies.