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
mike@0 1 (* hello.p *)
mike@0 2 begin
mike@0 3 print_string("Hello world!");
mike@0 4 newline()
mike@0 5 end.
mike@0 6
mike@0 7 (*<<
mike@0 8 Hello world!
mike@0 9 >>*)
mike@0 10
mike@0 11 (*[[
mike@0 12 MODULE Main 0 0
mike@0 13 IMPORT Lib 0
mike@0 14 ENDHDR
mike@0 15
mike@0 16 PROC MAIN 0 0 0
mike@0 17 ! print_string("Hello world!");
mike@0 18 CONST 12
mike@0 19 GLOBAL g1
mike@0 20 CONST 0
mike@0 21 GLOBAL lib.print_string
mike@0 22 PCALL 2
mike@0 23 ! newline()
mike@0 24 CONST 0
mike@0 25 GLOBAL lib.newline
mike@0 26 PCALL 0
mike@0 27 RETURN
mike@0 28 END
mike@0 29
mike@0 30 ! String "Hello world!"
mike@0 31 DEFINE g1
mike@0 32 STRING 48656C6C6F20776F726C642100
mike@0 33
mike@0 34 ! End
mike@0 35 ]]*)