To get multiple consoles you have to execute the simulator in the background like daemons run in UNIX systems. The simulator then will listen and wait for network connection requests and provide console functions for network connections.
To run µCsim in the background you have to use -Z option for the simulator:
pigmy$ s51 -Z 5555 foo.hexIn this case s51 runs in foreground in your command interpreters point of view. Of course you can run the program really in the background:
pigmy$ s51 -Z 5555 foo.hex &The parameter of the -Z option is a port number. This can be number of any unused port of your machine. If the specified port is already occupied then following message appears:
pigmy$ s51 -Z 5555 bind: Address already in useIn this case you have to use an other number.
Let's suppose you have found a free port number and the simulator listens on it. Now go to somewhere else, at least to an other window and connect to the simulator:
other_machine$ telnet pigmy 5555First parameter to the telnet command is the name of the machine where the simulator is running on. It can be localhost if you are on the same machine or the fully qualified host name if you are at the other end of the world. Second parameter is the number of the port where the simulator is listening. It must be the same number which was specified as parameter of the -Z option when the simulator was started (see above).
Connecting to the simulator you get a command console:
pigmy$ telnet pigmy 5555 Trying 127.0.0.1... Connected to pigmy.talker.bt. Escape character is '^]'. ucsim 0.2.21, Copyright (C) 1997 Daniel Drotos, Talker Bt. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. >
To stop the simulator completely you have to use kill command. Note that if you stop the simulator then all the active network connections (all other consoles) will stop.
pigmy$ s51 -Z 5555 foo.hex -c /dev/tty