I am using a Triscend TE505 (with 2 Data Pointers). In addition to the standard set, the debugger Registers window adds the following under 'Sys':
Sys | : +--auxr1 | +--dptr | | | +--[0] | | | +--[1] :
FUNC void ShowRegs( void ) { : printf( " %02x", AUXR1 ); ______________________^ *** error 34, line 18: undefined identifier printf( "%04x", DPTR[0] ); *** error 46, line 19: subscript requires array printf( "%04x", DPTR[1] ); *** error 46, line 19: subscript requires array printf( "\n" ); }
Yes, I know how to edit registers manually; what I wanted to know was how to access them symbolically (preferably) from a uVision2 Debug Function. The uVision debugger clearly knows about these extra registers as it's able to name & display them, and lets you modify them, as you described. So why can't the same debugger's Debug Function use the same names? NEIDE! BTW: The Triscend does actually have two DPTR registers; here are their C51 definitions:
sfr DPL = 0x82; // Standard 8051 DPTR sfr DPH = 0x83; sfr DPL1 = 0x84; // Triscend 2nd DPTR sfr DPH1 = 0x85; sfr DPS = 0x86; // DPTR Selector
Ahhh, Yep - I forgot about that. Doh. You can change these in the debugger by just accessing them by their symbolic names. Jon
"You can change these in the debugger by just accessing them by their symbolic names." Nope; doesn't work:
>DPTR 0xB7BB >DPH 0xBB >DPL 0xB7 >dpl1 *** error 34: undefined identifier >dph1 *** error 34: undefined identifier >auxr1 *** error 34: undefined identifier
We see your problem. For the time being you should use the _RBYTE and _WBYTE built-in functions. However, we will add this SFR's to the Tricsend simulation. The real problem is that we do not have finialized the Tricsend simulation.
Yes, that's the workaround that I've used. When the Tricsend simulation is finalised, would it be possible to use the name "DPS" (to be consistent with the Triscend documentation) rather than "AUXR1?"