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.2 KB
|
Rev | Line | |
---|
[7bf3856] | 1 | .globl ___atab
|
---|
| 2 | .globl _strtol
|
---|
| 3 | .text
|
---|
| 4 | _strtol:
|
---|
| 5 | ~~strtol:
|
---|
| 6 | ~str=R13
|
---|
| 7 | ~base=R7
|
---|
| 8 | ~ptr=12
|
---|
| 9 | link R14,#-4
|
---|
| 10 | movem.l R4-R7/R13-R13,-(sp)
|
---|
| 11 | ~val=R6
|
---|
| 12 | ~c=R5
|
---|
| 13 | ~xx=-2
|
---|
| 14 | ~neg=-4
|
---|
| 15 | *line 22
|
---|
| 16 | clr -4(R14)
|
---|
| 17 | *line 24
|
---|
| 18 | move.l 8(R14),R13
|
---|
| 19 | *line 24
|
---|
| 20 | move 16(R14),R7
|
---|
| 21 | *line 24
|
---|
| 22 | *line 25
|
---|
| 23 | tst.l 12(R14)
|
---|
| 24 | beq L2
|
---|
| 25 | *line 25
|
---|
| 26 | move.l 12(R14),R8
|
---|
| 27 | move.l R13,(R8)
|
---|
| 28 | *line 26
|
---|
| 29 | L2:
|
---|
| 30 | *line 27
|
---|
| 31 | *line 28
|
---|
| 32 | tst R7
|
---|
| 33 | blt L10000
|
---|
| 34 | cmp #36,R7
|
---|
| 35 | ble L3
|
---|
| 36 | L10000:*line 28
|
---|
| 37 | clr.l R0
|
---|
| 38 | bra L1
|
---|
| 39 | *line 29
|
---|
| 40 | L3:
|
---|
| 41 | *line 30
|
---|
| 42 | *line 30
|
---|
| 43 | move.b (R13),R5
|
---|
| 44 | ext.w R5
|
---|
| 45 | move.l #___atab,R8
|
---|
| 46 | move.b 0(R8,R5),R0
|
---|
| 47 | ext.w R0
|
---|
| 48 | and #28,R0
|
---|
| 49 | bne L4
|
---|
| 50 | *line 31
|
---|
| 51 | *line 32
|
---|
| 52 | bra L7
|
---|
| 53 | L6:
|
---|
| 54 | *line 33
|
---|
| 55 | add.l #1,R13
|
---|
| 56 | move.b (R13),R5
|
---|
| 57 | ext.w R5
|
---|
| 58 | L7:
|
---|
| 59 | *line 33
|
---|
| 60 | move R5,R8
|
---|
| 61 | add.l #___atab,R8
|
---|
| 62 | btst #5,(R8)
|
---|
| 63 | bne L6
|
---|
| 64 | L5:
|
---|
| 65 | *line 34
|
---|
| 66 | *line 35
|
---|
| 67 | move R5,R0
|
---|
| 68 | bra L9
|
---|
| 69 | *line 36
|
---|
| 70 | L10:
|
---|
| 71 | *line 37
|
---|
| 72 | *line 38
|
---|
| 73 | add #1,-4(R14)
|
---|
| 74 | *line 39
|
---|
| 75 | L11:
|
---|
| 76 | *line 40
|
---|
| 77 | *line 41
|
---|
| 78 | add.l #1,R13
|
---|
| 79 | move.b (R13),R5
|
---|
| 80 | ext.w R5
|
---|
| 81 | bra L8
|
---|
| 82 | L9:cmp #43,R0
|
---|
| 83 | beq L11
|
---|
| 84 | cmp #45,R0
|
---|
| 85 | beq L10
|
---|
| 86 | bra L8
|
---|
| 87 | L8:
|
---|
| 88 | *line 42
|
---|
| 89 | *line 43
|
---|
| 90 | *line 44
|
---|
| 91 | L4:
|
---|
| 92 | *line 45
|
---|
| 93 | *line 46
|
---|
| 94 | tst R7
|
---|
| 95 | bne L12
|
---|
| 96 | *line 46
|
---|
| 97 | *line 47
|
---|
| 98 | cmp #48,R5
|
---|
| 99 | beq L13
|
---|
| 100 | *line 47
|
---|
| 101 | move #10,R7
|
---|
| 102 | bra L14
|
---|
| 103 | L13:
|
---|
| 104 | *line 48
|
---|
| 105 | *line 49
|
---|
| 106 | cmp.b #120,1(R13)
|
---|
| 107 | beq L10001
|
---|
| 108 | cmp.b #88,1(R13)
|
---|
| 109 | bne L15
|
---|
| 110 | L10001:*line 49
|
---|
| 111 | move #16,R7
|
---|
| 112 | *line 50
|
---|
| 113 | bra L16
|
---|
| 114 | L15:
|
---|
| 115 | *line 51
|
---|
| 116 | move #8,R7
|
---|
| 117 | L16:L14:
|
---|
| 118 | *line 52
|
---|
| 119 | *line 53
|
---|
| 120 | *line 54
|
---|
| 121 | *line 55
|
---|
| 122 | *line 56
|
---|
| 123 | L12:
|
---|
| 124 | *line 57
|
---|
| 125 | *line 58
|
---|
| 126 | move.l #___atab,R8
|
---|
| 127 | move.b 0(R8,R5),R0
|
---|
| 128 | ext.w R0
|
---|
| 129 | and #28,R0
|
---|
| 130 | beq L10002
|
---|
| 131 | move R5,R8
|
---|
| 132 | add.l #___atab,R8
|
---|
| 133 | btst #2,(R8)
|
---|
| 134 | beq L10003
|
---|
| 135 | move R5,R0
|
---|
| 136 | add #-48,R0
|
---|
| 137 | bra L10005
|
---|
| 138 | L10003:move R5,R8
|
---|
| 139 | add.l #___atab,R8
|
---|
| 140 | btst #4,(R8)
|
---|
| 141 | beq L10006
|
---|
| 142 | move R5,R0
|
---|
| 143 | add #-87,R0
|
---|
| 144 | bra L10008
|
---|
| 145 | L10006:move R5,R0
|
---|
| 146 | add #-55,R0
|
---|
| 147 | L10008:L10005:move R0,-2(R14)
|
---|
| 148 | cmp R0,R7
|
---|
| 149 | bgt L17
|
---|
| 150 | L10002:*line 58
|
---|
| 151 | clr.l R0
|
---|
| 152 | bra L1
|
---|
| 153 | *line 59
|
---|
| 154 | L17:
|
---|
| 155 | *line 60
|
---|
| 156 | *line 61
|
---|
| 157 | *line 62
|
---|
| 158 | cmp #16,R7
|
---|
| 159 | bne L18
|
---|
| 160 | cmp #48,R5
|
---|
| 161 | bne L18
|
---|
| 162 | move.b 2(R13),R0
|
---|
| 163 | ext.w R0
|
---|
| 164 | ext.l R0
|
---|
| 165 | add.l #___atab,R0
|
---|
| 166 | move.l R0,R8
|
---|
| 167 | btst #7,(R8)
|
---|
| 168 | beq L18
|
---|
| 169 | cmp.b #120,1(R13)
|
---|
| 170 | beq L10009
|
---|
| 171 | cmp.b #88,1(R13)
|
---|
| 172 | bne L18
|
---|
| 173 | L10009:*line 62
|
---|
| 174 | add.l #2,R13
|
---|
| 175 | move.b (R13),R5
|
---|
| 176 | ext.w R5
|
---|
| 177 | *line 63
|
---|
| 178 | L18:
|
---|
| 179 | *line 64
|
---|
| 180 | move R5,R8
|
---|
| 181 | add.l #___atab,R8
|
---|
| 182 | btst #2,(R8)
|
---|
| 183 | beq L10010
|
---|
| 184 | move R5,R0
|
---|
| 185 | add #-48,R0
|
---|
| 186 | bra L10012
|
---|
| 187 | L10010:move R5,R8
|
---|
| 188 | add.l #___atab,R8
|
---|
| 189 | btst #4,(R8)
|
---|
| 190 | beq L10013
|
---|
| 191 | move R5,R0
|
---|
| 192 | add #-87,R0
|
---|
| 193 | bra L10015
|
---|
| 194 | L10013:move R5,R0
|
---|
| 195 | add #-55,R0
|
---|
| 196 | L10015:L10012:neg R0
|
---|
| 197 | ext.l R0
|
---|
| 198 | move.l R0,R6
|
---|
| 199 | bra L21
|
---|
| 200 | L22:
|
---|
| 201 | *line 65
|
---|
| 202 | *line 66
|
---|
| 203 | move R7,R0
|
---|
| 204 | ext.l R0
|
---|
| 205 | move.l R0,-(sp)
|
---|
| 206 | move.l R6,-(sp)
|
---|
| 207 | jsr lmul
|
---|
| 208 | addq.l #8,sp
|
---|
| 209 | move.l R0,R6
|
---|
| 210 | move -2(R14),R0
|
---|
| 211 | ext.l R0
|
---|
| 212 | sub.l R0,R6
|
---|
| 213 | L20:L21:
|
---|
| 214 | *line 64
|
---|
| 215 | add.l #1,R13
|
---|
| 216 | move.b (R13),R0
|
---|
| 217 | ext.w R0
|
---|
| 218 | move R0,R5
|
---|
| 219 | move.l #___atab,R8
|
---|
| 220 | move.b 0(R8,R5),R0
|
---|
| 221 | ext.w R0
|
---|
| 222 | and #28,R0
|
---|
| 223 | beq L10016
|
---|
| 224 | move R5,R8
|
---|
| 225 | add.l #___atab,R8
|
---|
| 226 | btst #2,(R8)
|
---|
| 227 | beq L10017
|
---|
| 228 | move R5,R0
|
---|
| 229 | add #-48,R0
|
---|
| 230 | bra L10019
|
---|
| 231 | L10017:move R5,R8
|
---|
| 232 | add.l #___atab,R8
|
---|
| 233 | btst #4,(R8)
|
---|
| 234 | beq L10020
|
---|
| 235 | move R5,R0
|
---|
| 236 | add #-87,R0
|
---|
| 237 | bra L10022
|
---|
| 238 | L10020:move R5,R0
|
---|
| 239 | add #-55,R0
|
---|
| 240 | L10022:L10019:move R0,-2(R14)
|
---|
| 241 | cmp R0,R7
|
---|
| 242 | bgt L22
|
---|
| 243 | L10016:L19:
|
---|
| 244 | *line 68
|
---|
| 245 | *line 69
|
---|
| 246 | tst.l 12(R14)
|
---|
| 247 | beq L23
|
---|
| 248 | *line 69
|
---|
| 249 | move.l 12(R14),R8
|
---|
| 250 | move.l R13,(R8)
|
---|
| 251 | *line 70
|
---|
| 252 | L23:
|
---|
| 253 | *line 71
|
---|
| 254 | tst -4(R14)
|
---|
| 255 | beq L10023
|
---|
| 256 | move.l R6,R0
|
---|
| 257 | bra L10025
|
---|
| 258 | L10023:move.l R6,R0
|
---|
| 259 | neg.l R0
|
---|
| 260 | L10025:bra L1
|
---|
| 261 | L1:tst.l (sp)+
|
---|
| 262 | movem.l (sp)+,R5-R7/R13-R13
|
---|
| 263 | unlk R14
|
---|
| 264 | rts
|
---|
| 265 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.