| ??? 05/26/10 07:00 Read: times |
#176182 - no problem at my place Responding to: ???'s previous message |
#include <stdint.h>
typedef struct {
uint16_t b;
uint8_t a;
} sometype;
#include "e.h"
extern __xdata sometype x;
void main(void) {
x.a = 5;
}
#include "e.h" __xdata sometype x; c:tmpSDCC>sdcc -c e1.c c:tmpSDCC>sdcc -c e.c c:tmpSDCC>sdcc e.rel e1.rel c:tmpSDCC> 120 ; e.c:4: void main(void) {
121 ; -----------------------------------------
122 ; function main
123 ; -----------------------------------------
0064 124 _main:
0002 125 ar2 = 0x02
0003 126 ar3 = 0x03
0004 127 ar4 = 0x04
0005 128 ar5 = 0x05
0006 129 ar6 = 0x06
0007 130 ar7 = 0x07
0000 131 ar0 = 0x00
0001 132 ar1 = 0x01
133 ; e.c:5: x.a = 5;
0064 90 00 02 134 mov dptr,#(_x + 0x0002)
0067 74 05 135 mov a,#0x05
0069 F0 136 movx @dptr,a
006A 22 137 ret
Please go more into details with "does not work", and perhaps post a minimum example which exhibits the symptoms. JW |



