From f4523a366b4cdb86a137ca9edcefde923263d126 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Thu, 11 Jul 2019 05:34:53 -0700 Subject: [PATCH] Added newlines to 'Hello, World!' examples and fixed Makefiles. --- examples/hello-stdlib/Makefile | 2 +- examples/hello-stdlib/hello.pvvs | 1 + examples/hello-world/Makefile | 2 +- examples/hello-world/hello.pvvs | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/hello-stdlib/Makefile b/examples/hello-stdlib/Makefile index b8609e1..b94d87d 100644 --- a/examples/hello-stdlib/Makefile +++ b/examples/hello-stdlib/Makefile @@ -10,7 +10,7 @@ hello: $(VVS_COMPILER) -i temp.pvvs -o hello.vvs @rm -f temp.pvvs -run: +run: hello $(VVS_INTERPRETER) -i hello.vvs clean: diff --git a/examples/hello-stdlib/hello.pvvs b/examples/hello-stdlib/hello.pvvs index c0ddb0d..3b28850 100644 --- a/examples/hello-stdlib/hello.pvvs +++ b/examples/hello-stdlib/hello.pvvs @@ -1,6 +1,7 @@ @@ This program outputs "Hello, world!" SSSSN | ST: Push +0 (ASCII '\0') +SSSTSTSN | ST: Push +10 (ASCII '\n') SSSTSSSSTN | ST: Push +33 (ASCII !) SSSTTSSTSSN | ST: Push +100 (ASCII d) SSSTTSTTSSN | ST: Push +108 (ASCII l) diff --git a/examples/hello-world/Makefile b/examples/hello-world/Makefile index 32f38a7..c5bb796 100644 --- a/examples/hello-world/Makefile +++ b/examples/hello-world/Makefile @@ -8,7 +8,7 @@ all: hello hello: $(VVS_COMPILER) -i hello.pvvs -o hello.vvs -run: +run: hello $(VVS_INTERPRETER) -i hello.vvs clean: diff --git a/examples/hello-world/hello.pvvs b/examples/hello-world/hello.pvvs index 145fe1c..53f515f 100644 --- a/examples/hello-world/hello.pvvs +++ b/examples/hello-world/hello.pvvs @@ -27,4 +27,6 @@ SSSTTSSTSSN | ST: Push +100 (ASCII d) TNSS | IO: Output character SSSTSSSSTN | ST: Push +33 (ASCII !) TNSS | IO: Output character +SSSTSTSN | ST: Push +10 (ASCII '\n') +TNSS | IO: Output character NNN | FC: Terminate program -- 2.20.1