Author: bernhard
Date: Tue Oct 18 13:37:06 2005
New Revision: 9511
Added:
trunk/examples/pasm/hello.pasm
- copied, changed from r9509, trunk/examples/assembly/hello.pasm
Removed:
trunk/examples/assembly/hello.pasm
Modified:
trunk/MANIFEST
trunk/config/gen/makefiles/root.in
trunk/docs/intro.pod
trunk/t/examples/pasm.t
Log:
Move the example 'hello.pasm' from assembly to pasm.
Added a test for hello.pasm.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Tue Oct 18 13:37:06 2005
@@ -446,7 +446,6 @@ examples/README
examples/assembly/Makefile [main]doc
examples/assembly/acorn.l [main]doc
examples/assembly/hanoi.pasm [main]doc
-examples/assembly/hello.pasm [main]doc
examples/assembly/hello-dwim.imc [main]doc
examples/assembly/io1.pasm [main]doc
examples/assembly/io2.pasm [main]doc
@@ -600,6 +599,7 @@ examples/mops/mops.scheme
examples/pasm/99beer.pasm [main]doc
examples/pasm/cat.pasm [main]doc
examples/pasm/fact.pasm [main]doc
+examples/pasm/hello.pasm [main]doc
examples/pir/euclid.pir [main]doc
examples/pir/mandel.pir [main]doc
examples/pir/sudoku.pir [main]doc
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in (original)
+++ trunk/config/gen/makefiles/root.in Tue Oct 18 13:37:06 2005
@@ -842,22 +842,22 @@ examples-clean:
examples/assembly/mops.pbc \
examples/mops/mops$(O) \
examples/mops/mops$(EXE) \
- examples/assembly/hello.pbc \
- examples/assembly/hello$(O) \
- examples/assembly/hello$(EXE)
+ examples/pasm/hello.pbc \
+ examples/pasm/hello$(O) \
+ examples/pasm/hello$(EXE)
# hello
-hello: test_prep examples/assembly/hello$(EXE)
- $(CUR_DIR)/examples/assembly/hello$(EXE)
+hello: test_prep examples/pasm/hello$(EXE)
+ $(CUR_DIR)/examples/pasm/hello$(EXE)
-examples/assembly/hello.pbc: examples/assembly/hello.pasm
- $(PARROT) -o examples/assembly/hello.pbc examples/assembly/hello.pasm
+examples/pasm/hello.pbc: examples/pasm/hello.pasm
+ $(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm
-examples/assembly/hello$(O): examples/assembly/hello.pbc
- $(PARROT) -o examples/assembly/hello$(O) examples/assembly/hello.pbc
+examples/pasm/hello$(O): examples/pasm/hello.pbc
+ $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc
-examples/assembly/hello$(EXE): examples/assembly/hello$(O)
- $(MAKE) EXEC=examples/assembly/hello exec
+examples/pasm/hello$(EXE): examples/pasm/hello$(O)
+ $(MAKE) EXEC=examples/pasm/hello exec
Modified: trunk/docs/intro.pod
==============================================================================
--- trunk/docs/intro.pod (original)
+++ trunk/docs/intro.pod Tue Oct 18 13:37:06 2005
@@ -229,7 +229,7 @@ C<.local> is a type. This can be C<int>
registers), C<string> (for S registers), C<pmc> (for P registers) or the name
of a PMC type.
-=head2 PIR vs PASM
+=head2 PIR vs. PASM
PIR can be turned into PASM by running:
Copied: trunk/examples/pasm/hello.pasm (from r9509,
trunk/examples/assembly/hello.pasm)
==============================================================================
--- trunk/examples/assembly/hello.pasm (original)
+++ trunk/examples/pasm/hello.pasm Tue Oct 18 13:37:06 2005
@@ -1,4 +1,15 @@
# $Id$
+=head1 NAME
+
+hello.pasm - Hello World
+
+=head1 DESCRIPTION
+
+This is also used in the top Makefile,
+for showing how to create an executable from PASM.
+
+=cut
+
print "Hello World\n"
end
Modified: trunk/t/examples/pasm.t
==============================================================================
--- trunk/t/examples/pasm.t (original)
+++ trunk/t/examples/pasm.t Tue Oct 18 13:37:06 2005
@@ -28,11 +28,12 @@ F<t/examples/japh.t>
=cut
use strict;
-use Parrot::Test tests => 1;
+use Parrot::Test tests => 2;
use Test::More;
# Set up expected output for examples
my %expected = (
+
'fact.pasm' => << 'END_EXPECTED',
fact of 0 is: 1
fact of 1 is: 1
@@ -42,6 +43,10 @@ fact of 4 is: 24
fact of 5 is: 120
fact of 6 is: 720
END_EXPECTED
+
+ 'hello.pasm' => << 'END_EXPECTED',
+Hello World
+END_EXPECTED
);
# Do the testing