I run s51 as a server with this command in one window: "s51 -b -Z8000"
In a client window I execute this: echo "dump iram 0x60 0x61;r" | nc 127.0.0.1 8000 | hexdump -c
When I look at the results in the client window, I notice that the first set of data as indicated by the author is terminated with a null character (at byte 7).
When the server is ready for input it seems to show \r\n 2> followed by a space.
When it announces its starting simulation, the last bytes of data is \r\n
Also, for every new line in all messages, \r\n is used to separate new lines.
Is there a way the program could append a null character to each full complete packet it sends so that people who write code to interface with s51 through TCP/IP will know when a packet transmission is complete whether the code through the simulator is running or not?
I don't want to have to rely on timeouts to occur in order to figure out whether all the data is sent or if the connection is broken.
Dear Mike,
This feature is already implemented. You can use -p "string" or -P option to specify "string" or \0 as prompt. If you don't use any of them, prompt will be "consolID> " by default.
After start, you can use options to set prompt to be console specific:
These options sets the prompt for the actual console, it can be different for every consoles.
Daniel
One more thing.
You don't have to use interactive way to run the simulation.
Interactive means, you issue "run" command, it frozes the console, and if any input is provided, simulation stops, and prompt appears.
There is a non-interactive way, issue
command, and simulation will be run in "background", and the prompt will appear immediately.
Later, you can check running state by
command (0: stopped, 1: run). Running simulation can be stopped by sim_run=0 expression or by stop command (they produce different output).
Daniel