source: buchla-68k/alcyon/ispow2.s@ 0170798

Last change on this file since 0170798 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 622 bytes
Line 
1.globl _ispow2
2.text
3_ispow2:
4~~ispow2:
5~x=R7
6link R14,#0
7movem.l R4-R7,-(sp)
8~i=R6
9~k=R5
10*line 22
11move.l 8(R14),R7
12*line 22
13move.l #$1,R5
14*line 24
15move #32,R6
16bra L4
17L5:
18*line 25
19*line 26
20*line 26
21move.l R7,R0
22and.l R5,R0
23beq L6
24*line 27
25*line 28
26*line 29
27move.l R7,R0
28move.l R5,R1
29not.l R1
30and.l R1,R0
31beq L7
32*line 29
33clr R0
34bra L1
35bra L8
36L7:
37*line 30
38*line 31
39move #1,R0
40bra L1
41L8:
42*line 32
43*line 33
44L6:
45*line 34
46asl.l #$1,R5
47L3:L4:
48*line 24
49move R6,R0
50sub #1,R6
51tst R0
52bne L5
53L2:
54*line 37
55clr R0
56bra L1
57L1:tst.l (sp)+
58movem.l (sp)+,R5-R7
59unlk R14
60rts
61.data
Note: See TracBrowser for help on using the repository browser.