Posted on November 21, 2005 at 16:22Probblem resolved: in the new codewarrior for ST7 the HIGH operator have changed from : HIGH(VAR) to: %HIGH(VAR) then the correctly code is: asm { LD A, #Buffer_0 LD pScan:1, A LD A, #%HIGH(Buffer_0) LD pScan, A...
Posted on November 17, 2005 at 15:30Etaphy i have used this code: #define HIGH(x) ((x) >> 8) const unsigned char Buffer_0H = HIGH(Buffer_0); <---ERRORS!! asm { LD A, #Buffer_0 LD pScan:1, A LD A, Buffer_0H LD pScan, A } and appears 2 errors in const...
Posted on November 17, 2005 at 11:49Etaphy your codes generate two errors. But Buffer_0H must be a pointer variable....and the shift is good with 16bit variable?, buffer_0 is declared in 16bits memory address. Woro my compiler is 2.0 version and the...
Posted on November 17, 2005 at 09:22But Buffer_0H content is an address? Then if Buffer_0 is of this kind volatile unsigned short Buffer_0[1024]; this code is always correct? I need of a general definition of HIGH operator, that is good for all type...
Posted on November 17, 2005 at 09:00ok EtaPhi but i need of the address of high byte of buffer_0 and not of its value.. then if i do this code is correctly? #define HIGH(x) ((x) >> 8) const unsigned char Buffer_0H = HIGH(Buffer_0); asm { LD A, #Buff...