Hi, The Synopsis DW8051 core uses a MPAGE sfr reg at 0x92 hex instead of the standard P2 register when accessing data with MOVX etc. Do Keil support this register? If so what do I do to enable it? Regards Henrik
From the documentation that I have, it appears that the MPAGE register is only used if you do not include a P2 module in your Synopsis design. The MPAGE register provides the upper 8 bits for:
movx a, @r0/@r1 movx @r0/@r1, a
"In the C51 compiler, these instructions are used only in the COMPACT memory model (for PDATA variables)." Incorrect: the compiler must always use these instructions for any reference to PDATA - that's what PDATA means! The effect of the COMPACT memory model is simply to make PDATA the default - you can still explicitly define a variable to be in PDATA in any memory model you want (in fact, some contributors will urge that you should always do so!)
Good point. Thanks for clarifying that. What I meant was that MPAGE is only used when you use PDATA variables. PDATA is the default memory space in COMPACT model. :-) Jon