I'm labeling this as a bug because it appears one can run many instances of the simulated program through the network.
Here's how to reproduce the bug. In my case I use port 8000:
In one window execute "s51 -b -Z8000"
In the next window, execute the following two times:
echo "dump iram 0x60 0x61;r" | nc 127.0.0.1 8000 | hexdump -c
Each time you execute it, press CTRL+C at least 5 seconds later. The output should have been the same but you will notice the second time you execute it, the data arrives in 2 chunks about 1 second apart and it appears incomplete. I'm suspecting its because two run commands are going at once in the simulator.
What should happen is maybe add a switch on the s51 command line to allow multiple process running (but I don't know what real 8051-based chip contains multiple processors). But at minimum if the sim is trying to run the hex code twice, an error should be displayed instead.
I attached the input commands and the output that follows in the log file.
Dear Mike,
One uCsim simulates one cpu, it can not run the code twice.
This behavior is intentional and configurable.
When simulation is not running, input availability of consoles is checked in every cycle.
When simulation is running, input check is performed less frequently as frequent check has bad effect on simulation speed.
You can set number of cycles between two input check by
command. 1000000 is the default value. If you set it to lower number, you will get more responsive consoles, and slower simulation. It's up to you to experiment what value is confortable to you.
Daniel