From 2dd437b8524fb3182a6f8ef92f122407a5f34925 Mon Sep 17 00:00:00 2001
From: j8takagi <j8takagi@nifty.com>
Date: Fri, 15 Feb 2019 23:54:54 +0900
Subject: [PATCH] =?utf8?q?comet2monitor=E3=81=AE=E3=83=86=E3=82=B9?=
 =?utf8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

---
 monitor/break.monitor                   | 15 +++++++++++++++
 monitor/continue_hello.monitor          |  4 ++++
 monitor/continue_sum10.monitor          |  4 ++++
 monitor/help.monitor                    |  1 -
 monitor/revert_hello.monitor            |  3 +++
 test/system/Makefile                    |  2 +-
 test/system/comet2monitor/Define.mk     |  1 +
 test/system/comet2monitor/Makefile      |  1 +
 test/system/comet2monitor/Test.mk       |  1 +
 test/system/comet2monitor/help/0.txt    | 15 +++++++++++++++
 test/system/comet2monitor/help/Makefile |  2 ++
 test/system/comet2monitor/help/cmd      |  1 +
 test/system/comet2monitor/load/0.txt    |  4 ++++
 test/system/comet2monitor/load/Makefile |  2 ++
 test/system/comet2monitor/load/cmd      |  1 +
 test/system/comet2monitor/quit/0.txt    |  3 +++
 test/system/comet2monitor/quit/Makefile |  2 ++
 test/system/comet2monitor/quit/cmd      |  1 +
 18 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 monitor/break.monitor
 create mode 100644 monitor/continue_hello.monitor
 create mode 100644 monitor/continue_sum10.monitor
 create mode 100644 monitor/revert_hello.monitor
 create mode 120000 test/system/comet2monitor/Define.mk
 create mode 120000 test/system/comet2monitor/Makefile
 create mode 120000 test/system/comet2monitor/Test.mk
 create mode 100644 test/system/comet2monitor/help/0.txt
 create mode 100644 test/system/comet2monitor/help/Makefile
 create mode 100755 test/system/comet2monitor/help/cmd
 create mode 100644 test/system/comet2monitor/load/0.txt
 create mode 100644 test/system/comet2monitor/load/Makefile
 create mode 100755 test/system/comet2monitor/load/cmd
 create mode 100644 test/system/comet2monitor/quit/0.txt
 create mode 100644 test/system/comet2monitor/quit/Makefile
 create mode 100755 test/system/comet2monitor/quit/cmd

diff --git a/monitor/break.monitor b/monitor/break.monitor
new file mode 100644
index 0000000..353a5d9
--- /dev/null
+++ b/monitor/break.monitor
@@ -0,0 +1,15 @@
+l as/sample/sum_10.o
+d a 0 #18
+t a
+b a #7
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
diff --git a/monitor/continue_hello.monitor b/monitor/continue_hello.monitor
new file mode 100644
index 0000000..b11ad2b
--- /dev/null
+++ b/monitor/continue_hello.monitor
@@ -0,0 +1,4 @@
+l as/sample/hello.o
+d a 0 #22
+T a
+c
diff --git a/monitor/continue_sum10.monitor b/monitor/continue_sum10.monitor
new file mode 100644
index 0000000..c387b82
--- /dev/null
+++ b/monitor/continue_sum10.monitor
@@ -0,0 +1,4 @@
+l as/sample/sum_10.o
+d a 0 #18
+T a
+c
diff --git a/monitor/help.monitor b/monitor/help.monitor
index a7b15f7..a1e2647 100644
--- a/monitor/help.monitor
+++ b/monitor/help.monitor
@@ -1,2 +1 @@
 ?
-
diff --git a/monitor/revert_hello.monitor b/monitor/revert_hello.monitor
new file mode 100644
index 0000000..22f5dd7
--- /dev/null
+++ b/monitor/revert_hello.monitor
@@ -0,0 +1,3 @@
+l as/sample/hello.o
+d a 0 #18
+r 0 #22
diff --git a/test/system/Makefile b/test/system/Makefile
index 26c5f55..1667d25 100644
--- a/test/system/Makefile
+++ b/test/system/Makefile
@@ -1,5 +1,5 @@
 # 複数の子ディレクトリーでmakeを実行
-CMD = casl2_opt casl2_cmd casl2_err comet2_smoke comet2_opt comet2_cmd comet2_err casl2rev dumpword
+CMD = casl2_opt casl2_cmd casl2_err comet2_smoke comet2_opt comet2_cmd comet2_err casl2rev dumpword comet2monitor
 define make_dirs
     $(foreach d,$1,$(MAKE) -sC $d $2)
 endef
diff --git a/test/system/comet2monitor/Define.mk b/test/system/comet2monitor/Define.mk
new file mode 120000
index 0000000..286e789
--- /dev/null
+++ b/test/system/comet2monitor/Define.mk
@@ -0,0 +1 @@
+/home/kazubito/yacasl2/test/Template/Define.mk
\ No newline at end of file
diff --git a/test/system/comet2monitor/Makefile b/test/system/comet2monitor/Makefile
new file mode 120000
index 0000000..91e7c2e
--- /dev/null
+++ b/test/system/comet2monitor/Makefile
@@ -0,0 +1 @@
+/home/kazubito/yacasl2/test/Template/Group.mk
\ No newline at end of file
diff --git a/test/system/comet2monitor/Test.mk b/test/system/comet2monitor/Test.mk
new file mode 120000
index 0000000..ce1a5da
--- /dev/null
+++ b/test/system/comet2monitor/Test.mk
@@ -0,0 +1 @@
+/home/kazubito/yacasl2/test/Template/Test.mk
\ No newline at end of file
diff --git a/test/system/comet2monitor/help/0.txt b/test/system/comet2monitor/help/0.txt
new file mode 100644
index 0000000..cae706c
--- /dev/null
+++ b/test/system/comet2monitor/help/0.txt
@@ -0,0 +1,15 @@
+COMET II machine code monitor. Type ? for help.
+(comet2 monitor) ?
+b[reak] -- Manipulate Breakpoints. See details, `b ?'.
+c[ontinue] -- Continue running your program.
+d[ump] -- Display memory dump. `d[ump] a[uto]/n[oauto]' set auto/noauto display.
+l[oad] -- Load object from a file to the memory. `l[oad] <filepath> <address>' if address is omitted, load to address 0.
+n[ext] -- Go next instruction.
+q[uit] -- Quit running your program.
+reset -- Reset the system.
+r[everse] -- Disassemble memory. `r[everse] <start address> <end address>.
+s[ave] -- Save object from the memory to a file. `s[ave] <filepath> [<start address1> [<end address>]]' if <start address> and <end address> is omitted, save the whole memory. if <end address> is omitted, save the memory after <start address>.
+t[race] -- Display CPU register. `t[race] a[uto]/n[oauto]' set auto/noauto display. 
+T[race] -- Display CPU register as logical value. `t[race] a[uto]/n[oauto]' set auto/noauto display. 
+?/h[elp] -- Display this help.
+(comet2 monitor) 
\ No newline at end of file
diff --git a/test/system/comet2monitor/help/Makefile b/test/system/comet2monitor/help/Makefile
new file mode 100644
index 0000000..b6dac59
--- /dev/null
+++ b/test/system/comet2monitor/help/Makefile
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/test/system/comet2monitor/help/cmd b/test/system/comet2monitor/help/cmd
new file mode 100755
index 0000000..98598c1
--- /dev/null
+++ b/test/system/comet2monitor/help/cmd
@@ -0,0 +1 @@
+cd ../../../.. && ./comet2monitor <monitor/help.monitor
diff --git a/test/system/comet2monitor/load/0.txt b/test/system/comet2monitor/load/0.txt
new file mode 100644
index 0000000..bde1136
--- /dev/null
+++ b/test/system/comet2monitor/load/0.txt
@@ -0,0 +1,4 @@
+COMET II machine code monitor. Type ? for help.
+(comet2 monitor) l as/sample/sum_10.o
+(comet2 monitor) d
+(comet2 monitor) 
\ No newline at end of file
diff --git a/test/system/comet2monitor/load/Makefile b/test/system/comet2monitor/load/Makefile
new file mode 100644
index 0000000..b6dac59
--- /dev/null
+++ b/test/system/comet2monitor/load/Makefile
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/test/system/comet2monitor/load/cmd b/test/system/comet2monitor/load/cmd
new file mode 100755
index 0000000..d4e3551
--- /dev/null
+++ b/test/system/comet2monitor/load/cmd
@@ -0,0 +1 @@
+cd ../../../.. && ./comet2monitor <monitor/load.monitor
diff --git a/test/system/comet2monitor/quit/0.txt b/test/system/comet2monitor/quit/0.txt
new file mode 100644
index 0000000..51943c7
--- /dev/null
+++ b/test/system/comet2monitor/quit/0.txt
@@ -0,0 +1,3 @@
+COMET II machine code monitor. Type ? for help.
+(comet2 monitor) q
+Quit: COMET II monitor
diff --git a/test/system/comet2monitor/quit/Makefile b/test/system/comet2monitor/quit/Makefile
new file mode 100644
index 0000000..b6dac59
--- /dev/null
+++ b/test/system/comet2monitor/quit/Makefile
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/test/system/comet2monitor/quit/cmd b/test/system/comet2monitor/quit/cmd
new file mode 100755
index 0000000..1acd83b
--- /dev/null
+++ b/test/system/comet2monitor/quit/cmd
@@ -0,0 +1 @@
+cd ../../../.. && ./comet2monitor <monitor/quit.monitor
-- 
2.18.0