annotate ppc/test/string.p @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
rev   line source
0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
1 (* hello.p *)
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
2 begin
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
3 print_string("Hello world!");
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
4 newline()
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
5 end.
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
6
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
7 (*<<
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
8 Hello world!
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
9 >>*)
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
10
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
11 (*[[
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
12 MODULE Main 0 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
13 IMPORT Lib 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
14 ENDHDR
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
15
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
16 PROC MAIN 0 0 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
17 ! print_string("Hello world!");
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
18 CONST 12
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
19 GLOBAL g1
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
20 CONST 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
21 GLOBAL lib.print_string
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
22 PCALL 2
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
23 ! newline()
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
24 CONST 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
25 GLOBAL lib.newline
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
26 PCALL 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
27 RETURN
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
28 END
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
29
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
30 ! String "Hello world!"
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
31 DEFINE g1
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
32 STRING 48656C6C6F20776F726C642100
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
33
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
34 ! End
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
35 ]]*)