comparison lab4/test/print5.p @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bfdcc3820b32
1 (* Printing strings *)
2
3 begin
4 print_string("five"); newline()
5 end.
6
7 (*<<
8 five
9 >>*)
10
11 (*[[
12 @ picoPascal compiler output
13 .include "fixup.s"
14 .global pmain
15
16 .text
17 pmain:
18 mov ip, sp
19 stmfd sp!, {r4-r10, fp, ip, lr}
20 mov fp, sp
21 @ print_string("five"); newline()
22 mov r1, #4
23 set r0, g1
24 bl print_string
25 bl newline
26 ldmfd fp, {r4-r10, fp, sp, pc}
27 .ltorg
28
29 .data
30 g1:
31 .byte 102, 105, 118, 101
32 .byte 0
33 @ End
34 ]]*)