comparison ppc/test/bitnot.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 var x: integer;
2 begin
3 x := 314159265;
4 x := bitnot(x);
5 print_num(x); newline()
6 end.
7
8 (*<<
9 -314159266
10 >>*)
11
12 (*[[
13 MODULE Main 0 0
14 IMPORT Lib 0
15 ENDHDR
16
17 PROC MAIN 0 0 0
18 ! x := 314159265;
19 CONST 314159265
20 STGW _x
21 ! x := bitnot(x);
22 LDGW _x
23 BITNOT
24 STGW _x
25 ! print_num(x); newline()
26 LDGW _x
27 CONST 0
28 GLOBAL lib.print_num
29 PCALL 1
30 CONST 0
31 GLOBAL lib.newline
32 PCALL 0
33 RETURN
34 END
35
36 GLOVAR _x 4
37 ! End
38 ]]*)