Added newlines to 'Hello, World!' examples and fixed Makefiles.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Thu, 11 Jul 2019 12:34:53 +0000 (05:34 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Thu, 11 Jul 2019 12:34:53 +0000 (05:34 -0700)
examples/hello-stdlib/Makefile
examples/hello-stdlib/hello.pvvs
examples/hello-world/Makefile
examples/hello-world/hello.pvvs

index b8609e1..b94d87d 100644 (file)
@@ -10,7 +10,7 @@ hello:
        $(VVS_COMPILER) -i temp.pvvs -o hello.vvs
        @rm -f temp.pvvs
 
        $(VVS_COMPILER) -i temp.pvvs -o hello.vvs
        @rm -f temp.pvvs
 
-run:
+run: hello
        $(VVS_INTERPRETER) -i hello.vvs
 
 clean:
        $(VVS_INTERPRETER) -i hello.vvs
 
 clean:
index c0ddb0d..3b28850 100644 (file)
@@ -1,6 +1,7 @@
 @@ This program outputs "Hello, world!"
 
 SSSSN           | ST: Push +0 (ASCII '\0')
 @@ 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)
 SSSTSSSSTN      | ST: Push +33 (ASCII !)
 SSSTTSSTSSN     | ST: Push +100 (ASCII d)
 SSSTTSTTSSN     | ST: Push +108 (ASCII l)
index 32f38a7..c5bb796 100644 (file)
@@ -8,7 +8,7 @@ all: hello
 hello:
        $(VVS_COMPILER) -i hello.pvvs -o hello.vvs
 
 hello:
        $(VVS_COMPILER) -i hello.pvvs -o hello.vvs
 
-run:
+run: hello
        $(VVS_INTERPRETER) -i hello.vvs
 
 clean:
        $(VVS_INTERPRETER) -i hello.vvs
 
 clean:
index 145fe1c..53f515f 100644 (file)
@@ -27,4 +27,6 @@ SSSTTSSTSSN     | ST: Push +100 (ASCII d)
 TNSS            | IO: Output character
 SSSTSSSSTN      | ST: Push +33 (ASCII !)
 TNSS            | IO: Output character
 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
 NNN             | FC: Terminate program