diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-20 16:49:03 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-02-20 16:49:03 +0000 |
commit | c2bbba7b6914bff65b42c1910a31598c2eadb45f (patch) | |
tree | 82a1aa992924f7a18fe529c2ca166ee727471a91 /misc/sims | |
parent | a52d9661b1570645ea63d51efa79b0ee0799c54e (diff) | |
download | px4-nuttx-c2bbba7b6914bff65b42c1910a31598c2eadb45f.tar.gz px4-nuttx-c2bbba7b6914bff65b42c1910a31598c2eadb45f.tar.bz2 px4-nuttx-c2bbba7b6914bff65b42c1910a31598c2eadb45f.zip |
Second control-C will terminate
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@716 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/sims')
-rw-r--r-- | misc/sims/z80sim/src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/sims/z80sim/src/main.c b/misc/sims/z80sim/src/main.c index 49b06cd7e..9312b7509 100644 --- a/misc/sims/z80sim/src/main.c +++ b/misc/sims/z80sim/src/main.c @@ -325,10 +325,16 @@ int load_file(const char *filename) void sighandler(int signo) { + sigset_t set; char command[80]; int i; int j; + sigemptyset(&set); + sigaddset(&set, SIGINT); + sigprocmask(SIG_UNBLOCK, &set, NULL); + signal(SIGINT, SIG_DFL); + printf("AF:%04X HL:%04X DE:%04X BC:%04X PC:%04X SP:%04X IX:%04X IY:%04X I:%02X\n", gR.AF.W, gR.HL.W, gR.DE.W, gR.BC.W, gR.PC.W, gR.SP.W, gR.IX.W, gR.IY.W, gR.I); |