summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjonsykkel <jonrevold@gmail.com>2021-09-09 10:39:43 +0200
committerjonsykkel <jonrevold@gmail.com>2021-09-09 10:39:43 +0200
commitf4436e0d85dbb887921cf623f64e51d58006ddf7 (patch)
treeed4c2572a24f1ac3e8b7a93be164b58ca3756c9e
parent3487de120ecf98cd78bbc1e4a3a620e955309665 (diff)
downloadokeffa-f4436e0d85dbb887921cf623f64e51d58006ddf7.tar.gz
ch5 homevork 1
-rw-r--r--calc/main.c2
-rw-r--r--makefile2
-rw-r--r--prog/ch4_input (renamed from prog/ch4_num)0
-rw-r--r--prog/ch5_hw110
-rw-r--r--prog/ch5_input1
5 files changed, 13 insertions, 2 deletions
diff --git a/calc/main.c b/calc/main.c
index e0f2a57..0a27f58 100644
--- a/calc/main.c
+++ b/calc/main.c
@@ -81,7 +81,7 @@ static word_t char_getnib(char c){
}
static void puts_stack(size_t p){
- printf("%6zu ",p);
+ printf("%3zu ",p);
dump_fz(&STACK(p),fl);
write_nl();
}
diff --git a/makefile b/makefile
index 9124cdc..88013af 100644
--- a/makefile
+++ b/makefile
@@ -66,7 +66,7 @@ out := $(bin_dir)/$(out)
ifneq ($(run),)
run_cmd := @echo "run $(out)" 1>&2
#run_cmd += && ./$(out) 256 16
- run_cmd += && cat prog/ch5_hw1 | $(out) 256 16
+ run_cmd += && cat prog/ch5_input prog/ch5_hw1 | $(out) 256 16
endif
ifneq ($(debug),)
diff --git a/prog/ch4_num b/prog/ch4_input
index 36419a3..36419a3 100644
--- a/prog/ch4_num
+++ b/prog/ch4_input
diff --git a/prog/ch5_hw1 b/prog/ch5_hw1
new file mode 100644
index 0000000..cb0184b
--- /dev/null
+++ b/prog/ch5_hw1
@@ -0,0 +1,10 @@
+````*_'/={}{[/ SAD]ZQ}_
+``'``*_'/={}{[/ SAD]ZQ}_
+
+````*_'%.={}{[% SAD]ZQ}__
+``'``*_'%.={}{[% SAD]ZQ}__
+
+````*_'\.={={}{[\ SAD]ZQ}_}{[\ SAD]ZQ}_
+``'``*_'\.={={}{[\ SAD]ZQ}_}{[\ SAD]ZQ}_
+
+[OK]
diff --git a/prog/ch5_input b/prog/ch5_input
new file mode 100644
index 0000000..b4eb594
--- /dev/null
+++ b/prog/ch5_input
@@ -0,0 +1 @@
+.5.3