source: buchla-68k/alcyon/bitrev.s@ 4810254

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 737 bytes
Line 
1.data
2L1:.dc.w $1
3.dc.w $2
4.dc.w $4
5.dc.w $8
6.dc.w $10
7.dc.w $20
8.dc.w $40
9.dc.w $80
10.dc.w $100
11.dc.w $200
12.dc.w $400
13.dc.w $800
14.dc.w $1000
15.dc.w $2000
16.dc.w $4000
17.dc.w $8000
18.text
19.globl _bitrev
20.text
21_bitrev:
22~~bitrev:
23~bitsin=8
24~nbits=10
25link R14,#-8
26~m=-2
27~n=-4
28*line 30
29clr -4(R14)
30*line 32
31clr -2(R14)
32bra L5
33L6:
34*line 33
35*line 34
36move -2(R14),R8
37add.l R8,R8
38move.l #L1,R9
39move 0(R8,R9.l),R0
40and 8(R14),R0
41beq L7
42*line 34
43move 10(R14),R8
44sub #1,R8
45sub -2(R14),R8
46add.l R8,R8
47add.l #L1,R8
48move (R8),R0
49or R0,-4(R14)
50*line 35
51L7:L4:
52*line 32
53add #1,-2(R14)
54L5:
55*line 32
56move -2(R14),R0
57cmp 10(R14),R0
58blt L6
59L3:
60*line 36
61move -4(R14),R0
62bra L2
63L2:unlk R14
64rts
65.data
Note: See TracBrowser for help on using the repository browser.