annotate ppc/test/biglocal.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 proc foo(var a: array 10000 of integer);
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
2 begin a[5000] := 3 end;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
3
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
4 var b: array 10000 of integer;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
5 begin foo(b) 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 MODULE Main 0 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
9 IMPORT Lib 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
10 ENDHDR
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
11
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
12 PROC _foo 0 0 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
13 ! begin a[5000] := 3 end;
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
14 CONST 3
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
15 LDLW 16
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
16 STNW 20000
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
17 RETURN
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
18 END
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
19
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
20 PROC MAIN 0 0 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
21 ! begin foo(b) end.
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
22 GLOBAL _b
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
23 CONST 0
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
24 GLOBAL _foo
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
25 PCALL 1
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
26 RETURN
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
27 END
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
28
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
29 GLOVAR _b 40000
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
30 ! End
Mike Spivey <mike@cs.ox.ac.uk>
parents:
diff changeset
31 ]]*)