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?
Have you checked the 'Load Application at Startup' box?
Yes. Is there something that needs to change when using the built-in simulator?
Do you get any error messages from the simulator when you start it?
No error messages. I changed to a generic 8051 and get the same problem. I am using the default startup400.a5l from Dallas. Thanks for your help, Bob
Let me correct that. When I use the generic simulator I can see my code, but it wants to start processing at 0x00 instead of 0x200. Are there any limitations to the simulator?
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
sir iam doing project on microcontroller based respiration monitor please rectify the problems in code and send me the code with out errors iam unable to compile it we have to use cx51c compiler and windows based simulator for this code and had to produce the hex code for the project please help me in doing this project sir iam sending code in the next letter thank you jagadeesh kumar
"please rectify the problems in code and send me the code with out errors" The is a discussion forum - not a free consultany shop! Try here: http://www.keil.com/condb/search.asp
"iam doing project on microcontroller based respiration monitor" Are you developing this as a real instrument or is it a school project?