Peter,

Since the W7100 uses the value of P2 for MOVX @Ri instructions, P2 should
have the correct value. SDCC supports only one page of 256 bytes and sets
P2 to the correct value during startup (not neccesarily 0). If you also
use P2 for an LCD then either don't use PDATA or be very careful around
accesses to the LCD (save/restore P2 and no pdata access in between).

Maarten

> Is it a correct assumption that the compiler is expecting the P2 port
> value to be 0 for use with movx @r0,a type instructions? On my particular
> varient (wiz7100) bits 15 to 8 are set by the P2 register (which is also
> used for an LCD display which presents a potential problem ...). I see
> in the startup code that P2 is set to 0 and nothing thereafter seems to
> change it so I'm assuming that the compiler expects to things stored by
> movx @r0 to be in the first 256 bytes of XDATA and thus I need to make
> sure that P2 is set to 0 most of the time.
>
> Peter Vsn Rpp


------------------------------------------------------------------------------

_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to