• a problem with macro definition
    #define FLASH_BASE 0x080000 #define RECORD_SIZE 32 #define RECORDS_PER_SECTOR (FLASH_SECTOR_SIZE / RECORD_SIZE) #define MAX_RECORD_NUM 30135 #define MAX_RECORD_ADDR (MAX_RECORD_NUM * RECORD_SIZE...
  • Import definitions/macros
    Hello... Currently I am using a header file that contains imported variables/functions/arrays at specific addressing. This is not ideal but it is the only workaround I have for my project. Now I...
  • compiler crash instead of error in macro definition usage
    I am using C51 compiler V7.50 I don't know if this 'works' on other versions however I was able to crash the compiler by this 'silly' macro usage // causes compiler to crash #define WORD_SIZE(N)...
  • MACRO
    Hello, May I know if the code as shown below works? -------------------------------------------- #pragma src void main(void){ #pragma asm myMacro MACRO MOV R1, #01 MOV R2, #02 MOV R3,...
  • ## Macro
    Hi, I am use the ## as follows #define ADC_SRV_DEV 1 #define ADCCON(dev, chan, reg) AD##dev##CON##chan##reg then when I give ADCCON(ADC_SRV_DEV, 1, bits.FORM) = 3; // this is equavalent...