Macro

Discussion in 'C' started by answerme, Jan 2, 2008.

  1. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    Iam facing one problem.A Macro INIT_ON whose value is

    Code:
    #define	INIT_ON 	(*((unsigned char *)0x70060000) & 0x80)
    what is this value doing
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    The only thing that can be wrong is its not working as you expect. What you expect is a million dollar question?
     
  3. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    Dear shabbir
    I just want to know what does this means

    (*((unsigned char *)0x70060000) & 0x80)
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Bitwise Anding both the numbers and type casting them to unsigned char *.

    And of 0x70060000 & 0x80000000
    Then type cast it
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice