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 | .globl _chantab
|
---|
| 2 | .globl _Wrkbuf
|
---|
| 3 | .globl _errno
|
---|
| 4 | .data
|
---|
| 5 | L1:
|
---|
| 6 | *line 56
|
---|
| 7 | .dc.l __badfd
|
---|
| 8 | *line 57
|
---|
| 9 | .dc.l __filerd
|
---|
| 10 | *line 59
|
---|
| 11 | .dc.l __conin
|
---|
| 12 | .text
|
---|
| 13 | .globl _read
|
---|
| 14 | .text
|
---|
| 15 | _read:
|
---|
| 16 | ~~read:
|
---|
| 17 | ~fd=8
|
---|
| 18 | ~buff=10
|
---|
| 19 | ~len=14
|
---|
| 20 | link R14,#0
|
---|
| 21 | movem.l R7-R7/R13-R13,-(sp)
|
---|
| 22 | ~chp=R13
|
---|
| 23 | *line 79
|
---|
| 24 | *line 79
|
---|
| 25 | tst 8(R14)
|
---|
| 26 | blt L10000
|
---|
| 27 | cmp #11,8(R14)
|
---|
| 28 | ble L3
|
---|
| 29 | L10000:*line 80
|
---|
| 30 | *line 81
|
---|
| 31 | move #9,_errno
|
---|
| 32 | *line 82
|
---|
| 33 | move #-1,R0
|
---|
| 34 | bra L2
|
---|
| 35 | *line 83
|
---|
| 36 | *line 84
|
---|
| 37 | L3:
|
---|
| 38 | *line 85
|
---|
| 39 | move 8(R14),R0
|
---|
| 40 | muls #12,R0
|
---|
| 41 | move.l R0,R13
|
---|
| 42 | add.l #_chantab,R13
|
---|
| 43 | *line 86
|
---|
| 44 | move 14(R14),-(sp)
|
---|
| 45 | move.l 10(R14),-(sp)
|
---|
| 46 | move.l 8(R13),-(sp)
|
---|
| 47 | move.b (R13),R0
|
---|
| 48 | ext.w R0
|
---|
| 49 | move R0,R8
|
---|
| 50 | add.l R8,R8
|
---|
| 51 | add.l R8,R8
|
---|
| 52 | move.l #L1,R9
|
---|
| 53 | move.l 0(R8,R9.l),R8
|
---|
| 54 | jsr (R8)
|
---|
| 55 | adda.l #10,sp
|
---|
| 56 | bra L2
|
---|
| 57 | L2:tst.l (sp)+
|
---|
| 58 | movem.l (sp)+,R13-R13
|
---|
| 59 | unlk R14
|
---|
| 60 | rts
|
---|
| 61 | .globl __getsec
|
---|
| 62 | .text
|
---|
| 63 | __getsec:
|
---|
| 64 | ~~_getsec:
|
---|
| 65 | ~fp=R13
|
---|
| 66 | ~buf=12
|
---|
| 67 | ~len=16
|
---|
| 68 | link R14,#0
|
---|
| 69 | movem.l R7-R7/R13-R13,-(sp)
|
---|
| 70 | *line 105
|
---|
| 71 | move.l 8(R14),R13
|
---|
| 72 | *line 105
|
---|
| 73 | *line 106
|
---|
| 74 | move.l #_Wrkbuf,(sp)
|
---|
| 75 | move.l R13,-(sp)
|
---|
| 76 | jsr _ReadRN
|
---|
| 77 | addq.l #4,sp
|
---|
| 78 | move R0,_errno
|
---|
| 79 | beq L5
|
---|
| 80 | *line 106
|
---|
| 81 | move #-1,R0
|
---|
| 82 | bra L4
|
---|
| 83 | *line 107
|
---|
| 84 | L5:
|
---|
| 85 | *line 108
|
---|
| 86 | move 16(R14),(sp)
|
---|
| 87 | clr R0
|
---|
| 88 | move 38(R13),R0
|
---|
| 89 | swap R0
|
---|
| 90 | clr R0
|
---|
| 91 | swap R0
|
---|
| 92 | add.l #_Wrkbuf,R0
|
---|
| 93 | move.l R0,-(sp)
|
---|
| 94 | move.l 12(R14),-(sp)
|
---|
| 95 | jsr _memcpy
|
---|
| 96 | addq.l #8,sp
|
---|
| 97 | *line 110
|
---|
| 98 | *line 110
|
---|
| 99 | clr R0
|
---|
| 100 | move 38(R13),R0
|
---|
| 101 | add 16(R14),R0
|
---|
| 102 | and #511,R0
|
---|
| 103 | move R0,38(R13)
|
---|
| 104 | bne L6
|
---|
| 105 | *line 111
|
---|
| 106 | *line 112
|
---|
| 107 | add.l #$1,40(R13)
|
---|
| 108 | *line 113
|
---|
| 109 | *line 114
|
---|
| 110 | *line 115
|
---|
| 111 | move.l R13,(sp)
|
---|
| 112 | jsr __seek
|
---|
| 113 | tst R0
|
---|
| 114 | bge L7
|
---|
| 115 | *line 115
|
---|
| 116 | move #-1,R0
|
---|
| 117 | bra L4
|
---|
| 118 | L7:
|
---|
| 119 | *line 116
|
---|
| 120 | *line 117
|
---|
| 121 | L6:
|
---|
| 122 | *line 118
|
---|
| 123 | clr R0
|
---|
| 124 | bra L4
|
---|
| 125 | L4:tst.l (sp)+
|
---|
| 126 | movem.l (sp)+,R13-R13
|
---|
| 127 | unlk R14
|
---|
| 128 | rts
|
---|
| 129 | .globl __filerd
|
---|
| 130 | .text
|
---|
| 131 | __filerd:
|
---|
| 132 | ~~_filerd:
|
---|
| 133 | ~fp=R13
|
---|
| 134 | ~buffer=12
|
---|
| 135 | ~len=16
|
---|
| 136 | link R14,#0
|
---|
| 137 | movem.l R2-R7/R13-R13,-(sp)
|
---|
| 138 | ~l=R7
|
---|
| 139 | ~j=R6
|
---|
| 140 | ~k=R5
|
---|
| 141 | ~curpos=R4
|
---|
| 142 | ~newpos=R3
|
---|
| 143 | *line 141
|
---|
| 144 | move.l 8(R14),R13
|
---|
| 145 | *line 141
|
---|
| 146 | clr R7
|
---|
| 147 | *line 142
|
---|
| 148 | clr.l R4
|
---|
| 149 | move 38(R13),R4
|
---|
| 150 | move.l 40(R13),R0
|
---|
| 151 | move.l #$9,R1
|
---|
| 152 | asl.l R1,R0
|
---|
| 153 | add.l R0,R4
|
---|
| 154 | *line 143
|
---|
| 155 | move.l R4,R3
|
---|
| 156 | clr.l R0
|
---|
| 157 | move 16(R14),R0
|
---|
| 158 | add.l R0,R3
|
---|
| 159 | *line 151
|
---|
| 160 | *line 151
|
---|
| 161 | cmp.l 48(R13),R3
|
---|
| 162 | ble L9
|
---|
| 163 | *line 152
|
---|
| 164 | *line 153
|
---|
| 165 | move.l 48(R13),R0
|
---|
| 166 | sub.l R4,R0
|
---|
| 167 | move R0,16(R14)
|
---|
| 168 | *line 154
|
---|
| 169 | *line 158
|
---|
| 170 | *line 159
|
---|
| 171 | *line 160
|
---|
| 172 | L9:
|
---|
| 173 | *line 161
|
---|
| 174 | *line 161
|
---|
| 175 | tst 38(R13)
|
---|
| 176 | beq L10
|
---|
| 177 | *line 162
|
---|
| 178 | *line 163
|
---|
| 179 | *line 164
|
---|
| 180 | move #512,R7
|
---|
| 181 | sub 38(R13),R7
|
---|
| 182 | clr R0
|
---|
| 183 | move R7,R0
|
---|
| 184 | cmp 16(R14),R0
|
---|
| 185 | bls L11
|
---|
| 186 | *line 164
|
---|
| 187 | move 16(R14),R7
|
---|
| 188 | *line 165
|
---|
| 189 | L11:
|
---|
| 190 | *line 166
|
---|
| 191 | *line 167
|
---|
| 192 | move R7,(sp)
|
---|
| 193 | move.l 12(R14),-(sp)
|
---|
| 194 | move.l R13,-(sp)
|
---|
| 195 | jsr __getsec
|
---|
| 196 | addq.l #8,sp
|
---|
| 197 | tst R0
|
---|
| 198 | beq L12
|
---|
| 199 | *line 167
|
---|
| 200 | clr R0
|
---|
| 201 | move 16(R14),R0
|
---|
| 202 | bra L8
|
---|
| 203 | L12:
|
---|
| 204 | *line 168
|
---|
| 205 | *line 169
|
---|
| 206 | L10:
|
---|
| 207 | *line 170
|
---|
| 208 | *line 171
|
---|
| 209 | move 16(R14),R5
|
---|
| 210 | sub R7,R5
|
---|
| 211 | move #9,R0
|
---|
| 212 | lsr R0,R5
|
---|
| 213 | beq L13
|
---|
| 214 | *line 171
|
---|
| 215 | *line 172
|
---|
| 216 | move R5,(sp)
|
---|
| 217 | clr R0
|
---|
| 218 | move R7,R0
|
---|
| 219 | swap R0
|
---|
| 220 | clr R0
|
---|
| 221 | swap R0
|
---|
| 222 | add.l 12(R14),R0
|
---|
| 223 | move.l R0,-(sp)
|
---|
| 224 | move.l R13,-(sp)
|
---|
| 225 | jsr _blkrd
|
---|
| 226 | addq.l #8,sp
|
---|
| 227 | move R0,R6
|
---|
| 228 | tst R6
|
---|
| 229 | beq L14
|
---|
| 230 | *line 172
|
---|
| 231 | clr R0
|
---|
| 232 | move R7,R0
|
---|
| 233 | clr R1
|
---|
| 234 | move R5,R1
|
---|
| 235 | sub R6,R1
|
---|
| 236 | move #9,R2
|
---|
| 237 | lsl R2,R1
|
---|
| 238 | add R1,R0
|
---|
| 239 | bra L8
|
---|
| 240 | *line 173
|
---|
| 241 | L14:L13:
|
---|
| 242 | *line 174
|
---|
| 243 | clr R0
|
---|
| 244 | move R5,R0
|
---|
| 245 | move #9,R1
|
---|
| 246 | lsl R1,R0
|
---|
| 247 | add R0,R7
|
---|
| 248 | *line 176
|
---|
| 249 | *line 177
|
---|
| 250 | cmp 16(R14),R7
|
---|
| 251 | bcc L15
|
---|
| 252 | *line 177
|
---|
| 253 | *line 178
|
---|
| 254 | move 16(R14),(sp)
|
---|
| 255 | clr R0
|
---|
| 256 | move R7,R0
|
---|
| 257 | sub R0,(sp)
|
---|
| 258 | clr R0
|
---|
| 259 | move R7,R0
|
---|
| 260 | swap R0
|
---|
| 261 | clr R0
|
---|
| 262 | swap R0
|
---|
| 263 | add.l 12(R14),R0
|
---|
| 264 | move.l R0,-(sp)
|
---|
| 265 | move.l R13,-(sp)
|
---|
| 266 | jsr __getsec
|
---|
| 267 | addq.l #8,sp
|
---|
| 268 | tst R0
|
---|
| 269 | beq L16
|
---|
| 270 | *line 178
|
---|
| 271 | clr R0
|
---|
| 272 | move R7,R0
|
---|
| 273 | bra L8
|
---|
| 274 | *line 179
|
---|
| 275 | L16:L15:
|
---|
| 276 | *line 180
|
---|
| 277 | clr R0
|
---|
| 278 | move 16(R14),R0
|
---|
| 279 | bra L8
|
---|
| 280 | L8:tst.l (sp)+
|
---|
| 281 | movem.l (sp)+,R3-R7/R13-R13
|
---|
| 282 | unlk R14
|
---|
| 283 | rts
|
---|
| 284 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.