I am using a dallas ds80c400 and Keil Cx51. I can download and run my programs on the dallas processor or using the MON390 program. However, I am not able to use the simulator program. When I attempt to use it, it starts my program at address 0 and there is nothing but NOPs. When I use the mon390 program, the program starts at 0, but there is a AJMP that goes to 20A8. I can not put this same command in the simulator because I get error 116: branch target out of range. What am I doing wrong?
it wants to start processing at 0x00 instead of 0x200 That's because the reset vector is at 0x0000. If you want to start executing code at a different address, you'll have to set the program counter. Use $=0x200 to set the PC at address 200h. It sounds like your monitor is located at address 0. If that's the case, there are a few things you may not know. 1. The monitor takes over the reset vector (that's because on reset, the monitor program needs to execute). 2. The monitor redirects all interrupts to your target program. If you are simulating the exact same program (relocated for the monitor) you must manually redirect the interrupt vectors and reset vector to point to your actual program. The following knowledgebase article explains how to do this. http://www.keil.com/support/docs/2707.htm Also note that the Dallas 400 contiguous mode cannot be simulated with the 8051 simulation driver. Also note that the reset vector is only 3 bytes long and cannot be used with an LJMP instruction in contiguous mode (because LJMPs in this mode are 4-byte instructions). Hopefully, this helps. Jon
Jon, Thanks, this is just what I was looking for. I can now force my code to start where I want. I thought I had heard that the dallas contiguous mode is not supported in the generic simulator, but could not find any documentation on this at Keil or Maxim. Robert