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" ); }
In the triscend data sheet, look up the DATA addresses for AUXR1, DPTR1, and DPTR2. Then, using those addresses, sfr them in the C file you wish to use them in:
sfr AUXR1 = 0xAA; // junk address for example only sfr DPTR1 = 0xBB; // " sfr DPTR2 = 0xCC; // "
printf(" 0x%02X\n", (unsigned int) AUXR1);
No, that doesn't work: the uVision Debug Functions use a C-like Language which is a subset of ANSI; it doesn't include Keil's extensions like SFRs, _at_, etc. However, they do provide builtin functions like _RBYTE which read from absolute hardware addresses. Unfortunately, the _RWORD function seems to use the wrong byte ordering, so can't be used to read a whole 16-bit DPTR in one go. :-( Just seems like another example of uVision's Not-Entirely-Integrated Development Environment (NEIDE?)
Ah, sorry. I mis-understood. I thought you were doing this at run-time. Man, I am so glad I have a Signum Systems' ICE so I don't have to mess with simulation. Sorry I couldn't help. - Mark