Anyone now how can you perform a software reset on a Dallas 390 when it is in continous mode? The following suggested code does not work.
((void (code *) (void)) 0x000000) ();
You neglected the most important aspect I tried to point out in my first reply: this code *must* be done in assembly. The C compiler almost certainly can't generate code that is mixed between continuous mode and classic 8051 mode. The operand sizes will be all wrong. You also ignored Erik's hint about setting all SFR's to their reset values completely. At least check the generated assembly (SRC mode), and/or step through this routine in the simulator to see whether it ends up where it's supposed to.
Sorry I forgot to mention a couple of things I had stepped through the assembly of the C code, which I have included.
1367: EA=0; // Disable interrupts 1368: C:0x00FF8A C2AF CLR EA(0xA8.7) 1369: TA=0xAA; //Enable access to ACON C:0x00FF8C 75C7AA MOV TA(0xC7),#SADDR1(0xAA) 1370: TA=0x55; C:0x00FF8F 75C755 MOV TA(0xC7),#0x55 1371: ACON=0xF8; // Set ACON into reset mode (puts processor into normal 8051 mode) 1372: C:0x00FF92 759DF8 MOV ACON(0x9D),#EIP(0xF8) 1373: ((void (code *) (void)) 0x000000) (); // Cause a reboot C:0x00FF95 02000000 LJMP C_STARTUP(C:000000)