Last change
on this file since 73dd55f 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
|
---|
6 | link R14,#0
|
---|
7 | movem.l R4-R7,-(sp)
|
---|
8 | ~i=R6
|
---|
9 | ~k=R5
|
---|
10 | *line 22
|
---|
11 | move.l 8(R14),R7
|
---|
12 | *line 22
|
---|
13 | move.l #$1,R5
|
---|
14 | *line 24
|
---|
15 | move #32,R6
|
---|
16 | bra L4
|
---|
17 | L5:
|
---|
18 | *line 25
|
---|
19 | *line 26
|
---|
20 | *line 26
|
---|
21 | move.l R7,R0
|
---|
22 | and.l R5,R0
|
---|
23 | beq L6
|
---|
24 | *line 27
|
---|
25 | *line 28
|
---|
26 | *line 29
|
---|
27 | move.l R7,R0
|
---|
28 | move.l R5,R1
|
---|
29 | not.l R1
|
---|
30 | and.l R1,R0
|
---|
31 | beq L7
|
---|
32 | *line 29
|
---|
33 | clr R0
|
---|
34 | bra L1
|
---|
35 | bra L8
|
---|
36 | L7:
|
---|
37 | *line 30
|
---|
38 | *line 31
|
---|
39 | move #1,R0
|
---|
40 | bra L1
|
---|
41 | L8:
|
---|
42 | *line 32
|
---|
43 | *line 33
|
---|
44 | L6:
|
---|
45 | *line 34
|
---|
46 | asl.l #$1,R5
|
---|
47 | L3:L4:
|
---|
48 | *line 24
|
---|
49 | move R6,R0
|
---|
50 | sub #1,R6
|
---|
51 | tst R0
|
---|
52 | bne L5
|
---|
53 | L2:
|
---|
54 | *line 37
|
---|
55 | clr R0
|
---|
56 | bra L1
|
---|
57 | L1:tst.l (sp)+
|
---|
58 | movem.l (sp)+,R5-R7
|
---|
59 | unlk R14
|
---|
60 | rts
|
---|
61 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.