From: Royce & S. P. <be...@et...> - 2003-03-22 19:59:08
|
Hi, ----- Original Message ----- > I declare a variable in the xdata space as " xdata @01 char x;" to represent > a register in the state machine. Then I try to access the variable in the > program and sdcc generated code looks like "movx @dptr,a" . >So my port2 gets buggered up. Can I not make sdcc generate code as "movx @ro,a" ?? ------------------------------------------------------ Perhaps you could try a peepfile(see docs) to replace the *code block* that loads dptr with the xram address & does a movx @dptr,a (or movx a,@dptr)with one that does mov r0,#address, & movx @r0, a, (or movx a, @r0). Specify the peep file in the command line. Alternatively(inefficient option), write a function to which you pass the address & data ,which contains inline assembly to do the job. --Royce. |