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:
3.4 KB
|
Rev | Line | |
---|
[7bf3856] | 1 | .data
|
---|
| 2 | L1:.dc.l $0
|
---|
| 3 | .dc.l $19A0
|
---|
| 4 | .dc.l $3336
|
---|
| 5 | .dc.l $4CD0
|
---|
| 6 | .dc.l $6668
|
---|
| 7 | .dc.l $8000
|
---|
| 8 | .dc.l $99A0
|
---|
| 9 | .dc.l $B336
|
---|
| 10 | .dc.l $CCCE
|
---|
| 11 | .dc.l $E668
|
---|
| 12 | .dc.l $0
|
---|
| 13 | .dc.l $290
|
---|
| 14 | .dc.l $520
|
---|
| 15 | .dc.l $7B0
|
---|
| 16 | .dc.l $A40
|
---|
| 17 | .dc.l $CD0
|
---|
| 18 | .dc.l $F60
|
---|
| 19 | .dc.l $11F0
|
---|
| 20 | .dc.l $1480
|
---|
| 21 | .dc.l $1710
|
---|
| 22 | .text
|
---|
| 23 | .data
|
---|
| 24 | L2:.dc.l $C350
|
---|
| 25 | .dc.l $61A8
|
---|
| 26 | .dc.l $30D4
|
---|
| 27 | .dc.l $186A
|
---|
| 28 | .dc.l $C35
|
---|
| 29 | .dc.l $61A
|
---|
| 30 | .dc.l $30D
|
---|
| 31 | .dc.l $186
|
---|
| 32 | .dc.l $C3
|
---|
| 33 | .dc.l $61
|
---|
| 34 | .dc.l $30
|
---|
| 35 | .dc.l $18
|
---|
| 36 | .dc.l $C
|
---|
| 37 | .dc.l $6
|
---|
| 38 | .dc.l $3
|
---|
| 39 | .dc.l $1
|
---|
| 40 | .text
|
---|
| 41 | .globl _dec2fr
|
---|
| 42 | .text
|
---|
| 43 | _dec2fr:
|
---|
| 44 | ~~dec2fr:
|
---|
| 45 | ~s=R13
|
---|
| 46 | link R14,#0
|
---|
| 47 | movem.l R6-R7/R13-R13,-(sp)
|
---|
| 48 | ~i=R7
|
---|
| 49 | *line 49
|
---|
| 50 | move.l 8(R14),R13
|
---|
| 51 | *line 49
|
---|
| 52 | *line 49
|
---|
| 53 | cmp.b #49,(R13)
|
---|
| 54 | bne L4
|
---|
| 55 | *line 50
|
---|
| 56 | *line 51
|
---|
| 57 | *line 51
|
---|
| 58 | cmp.b #48,1(R13)
|
---|
| 59 | bne L5
|
---|
| 60 | *line 52
|
---|
| 61 | *line 53
|
---|
| 62 | *line 53
|
---|
| 63 | cmp.b #48,2(R13)
|
---|
| 64 | bne L6
|
---|
| 65 | *line 54
|
---|
| 66 | *line 55
|
---|
| 67 | *line 56
|
---|
| 68 | cmp.b #45,3(R13)
|
---|
| 69 | bne L7
|
---|
| 70 | *line 56
|
---|
| 71 | move #-32768,R0
|
---|
| 72 | bra L3
|
---|
| 73 | *line 57
|
---|
| 74 | bra L8
|
---|
| 75 | L7:
|
---|
| 76 | *line 58
|
---|
| 77 | move #32767,R0
|
---|
| 78 | bra L3
|
---|
| 79 | L8:
|
---|
| 80 | *line 59
|
---|
| 81 | bra L9
|
---|
| 82 | L6:
|
---|
| 83 | *line 60
|
---|
| 84 | *line 61
|
---|
| 85 | *line 62
|
---|
| 86 | move #-1,R0
|
---|
| 87 | bra L3
|
---|
| 88 | L9:
|
---|
| 89 | *line 63
|
---|
| 90 | *line 64
|
---|
| 91 | bra L10
|
---|
| 92 | L5:
|
---|
| 93 | *line 65
|
---|
| 94 | *line 66
|
---|
| 95 | *line 67
|
---|
| 96 | move #-1,R0
|
---|
| 97 | bra L3
|
---|
| 98 | *line 68
|
---|
| 99 | L10:
|
---|
| 100 | *line 69
|
---|
| 101 | *line 70
|
---|
| 102 | *line 71
|
---|
| 103 | *line 72
|
---|
| 104 | *line 73
|
---|
| 105 | bra L11
|
---|
| 106 | L4:
|
---|
| 107 | *line 74
|
---|
| 108 | *line 74
|
---|
| 109 | cmp.b #48,(R13)
|
---|
| 110 | bne L12
|
---|
| 111 | *line 75
|
---|
| 112 | *line 76
|
---|
| 113 | move.b 1(R13),R0
|
---|
| 114 | ext.w R0
|
---|
| 115 | add #-48,R0
|
---|
| 116 | move R0,R8
|
---|
| 117 | add.l R8,R8
|
---|
| 118 | add.l R8,R8
|
---|
| 119 | move.l #L1,R9
|
---|
| 120 | move.l 0(R8,R9.l),R0
|
---|
| 121 | move.b 2(R13),R1
|
---|
| 122 | ext.w R1
|
---|
| 123 | add #-48,R1
|
---|
| 124 | move R1,R9
|
---|
| 125 | add.l R9,R9
|
---|
| 126 | add.l R9,R9
|
---|
| 127 | add.l #L1,R9
|
---|
| 128 | move.l 40(R9),R1
|
---|
| 129 | add.l R1,R0
|
---|
| 130 | asr.l #$1,R0
|
---|
| 131 | move R0,R7
|
---|
| 132 | *line 77
|
---|
| 133 | *line 78
|
---|
| 134 | *line 78
|
---|
| 135 | cmp.b #45,3(R13)
|
---|
| 136 | bne L13
|
---|
| 137 | *line 79
|
---|
| 138 | *line 80
|
---|
| 139 | *line 81
|
---|
| 140 | tst R7
|
---|
| 141 | beq L14
|
---|
| 142 | *line 81
|
---|
| 143 | move R7,R0
|
---|
| 144 | not R0
|
---|
| 145 | bra L3
|
---|
| 146 | *line 82
|
---|
| 147 | bra L15
|
---|
| 148 | L14:
|
---|
| 149 | *line 83
|
---|
| 150 | clr R0
|
---|
| 151 | bra L3
|
---|
| 152 | L15:
|
---|
| 153 | *line 84
|
---|
| 154 | bra L16
|
---|
| 155 | L13:
|
---|
| 156 | *line 85
|
---|
| 157 | *line 86
|
---|
| 158 | *line 87
|
---|
| 159 | move R7,R0
|
---|
| 160 | bra L3
|
---|
| 161 | L16:
|
---|
| 162 | *line 88
|
---|
| 163 | *line 89
|
---|
| 164 | *line 90
|
---|
| 165 | L12:L11:
|
---|
| 166 | *line 91
|
---|
| 167 | move #-1,R0
|
---|
| 168 | bra L3
|
---|
| 169 | L3:tst.l (sp)+
|
---|
| 170 | movem.l (sp)+,R7-R7/R13-R13
|
---|
| 171 | unlk R14
|
---|
| 172 | rts
|
---|
| 173 | .globl _fr2dec
|
---|
| 174 | .text
|
---|
| 175 | _fr2dec:
|
---|
| 176 | ~~fr2dec:
|
---|
| 177 | ~v=R7
|
---|
| 178 | ~s=R13
|
---|
| 179 | link R14,#0
|
---|
| 180 | movem.l R2-R7/R13-R13,-(sp)
|
---|
| 181 | ~acc=R6
|
---|
| 182 | ~sc=R5
|
---|
| 183 | ~i=R4
|
---|
| 184 | ~p=R3
|
---|
| 185 | *line 114
|
---|
| 186 | move 8(R14),R7
|
---|
| 187 | *line 114
|
---|
| 188 | move.l 10(R14),R13
|
---|
| 189 | *line 114
|
---|
| 190 | *line 114
|
---|
| 191 | cmp #32767,R7
|
---|
| 192 | bne L18
|
---|
| 193 | *line 115
|
---|
| 194 | *line 116
|
---|
| 195 | move.l #L19,(sp)
|
---|
| 196 | move.l R13,-(sp)
|
---|
| 197 | jsr _sprintf
|
---|
| 198 | addq.l #4,sp
|
---|
| 199 | *line 117
|
---|
| 200 | move.l R13,R0
|
---|
| 201 | bra L17
|
---|
| 202 | *line 118
|
---|
| 203 | *line 119
|
---|
| 204 | L18:
|
---|
| 205 | *line 120
|
---|
| 206 | *line 120
|
---|
| 207 | cmp #-32768,R7
|
---|
| 208 | bne L20
|
---|
| 209 | *line 121
|
---|
| 210 | *line 122
|
---|
| 211 | move.l #L21,(sp)
|
---|
| 212 | move.l R13,-(sp)
|
---|
| 213 | jsr _sprintf
|
---|
| 214 | addq.l #4,sp
|
---|
| 215 | *line 123
|
---|
| 216 | move.l R13,R0
|
---|
| 217 | bra L17
|
---|
| 218 | *line 124
|
---|
| 219 | *line 125
|
---|
| 220 | L20:
|
---|
| 221 | *line 126
|
---|
| 222 | *line 126
|
---|
| 223 | move R7,R0
|
---|
| 224 | and #-32768,R0
|
---|
| 225 | beq L22
|
---|
| 226 | *line 127
|
---|
| 227 | *line 128
|
---|
| 228 | move R7,R0
|
---|
| 229 | not R0
|
---|
| 230 | move R0,R7
|
---|
| 231 | *line 129
|
---|
| 232 | move #45,R3
|
---|
| 233 | *line 130
|
---|
| 234 | bra L23
|
---|
| 235 | L22:
|
---|
| 236 | *line 131
|
---|
| 237 | *line 132
|
---|
| 238 | *line 133
|
---|
| 239 | move #43,R3
|
---|
| 240 | L23:
|
---|
| 241 | *line 136
|
---|
| 242 | clr.l R6
|
---|
| 243 | *line 138
|
---|
| 244 | clr R4
|
---|
| 245 | bra L26
|
---|
| 246 | L27:
|
---|
| 247 | *line 139
|
---|
| 248 | *line 140
|
---|
| 249 | move R7,R0
|
---|
| 250 | move #1,R1
|
---|
| 251 | move #14,R2
|
---|
| 252 | sub R4,R2
|
---|
| 253 | asl R2,R1
|
---|
| 254 | and R1,R0
|
---|
| 255 | beq L28
|
---|
| 256 | *line 140
|
---|
| 257 | move R4,R8
|
---|
| 258 | add.l R8,R8
|
---|
| 259 | add.l R8,R8
|
---|
| 260 | add.l #L2,R8
|
---|
| 261 | move.l (R8),R0
|
---|
| 262 | add.l R0,R6
|
---|
| 263 | *line 141
|
---|
| 264 | L28:L25:
|
---|
| 265 | *line 138
|
---|
| 266 | add #1,R4
|
---|
| 267 | L26:
|
---|
| 268 | *line 138
|
---|
| 269 | cmp #15,R4
|
---|
| 270 | blt L27
|
---|
| 271 | L24:
|
---|
| 272 | *line 142
|
---|
| 273 | move.l #$3e8,R5
|
---|
| 274 | *line 143
|
---|
| 275 | move.l R5,-(sp)
|
---|
| 276 | move.l R6,-(sp)
|
---|
| 277 | jsr ldiv
|
---|
| 278 | addq.l #8,sp
|
---|
| 279 | move.l R0,R6
|
---|
| 280 | *line 144
|
---|
| 281 | move R3,(sp)
|
---|
| 282 | move.l R6,R0
|
---|
| 283 | move R0,-(sp)
|
---|
| 284 | move.l #L29,-(sp)
|
---|
| 285 | move.l R13,-(sp)
|
---|
| 286 | jsr _sprintf
|
---|
| 287 | adda.l #10,sp
|
---|
| 288 | *line 145
|
---|
| 289 | move.l R13,R0
|
---|
| 290 | bra L17
|
---|
| 291 | L17:tst.l (sp)+
|
---|
| 292 | movem.l (sp)+,R3-R7/R13-R13
|
---|
| 293 | unlk R14
|
---|
| 294 | rts
|
---|
| 295 | .data
|
---|
| 296 | L19:.dc.b $31,$30,$30,$2B,$0
|
---|
| 297 | L21:.dc.b $31,$30,$30,$2D,$0
|
---|
| 298 | L29:.dc.b $25,$30,$33,$64,$25,$63,$0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.