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:
2.7 KB
|
Rev | Line | |
---|
[7bf3856] | 1 | .globl _Cbuffs
|
---|
| 2 | .globl _Stdbufs
|
---|
| 3 | .globl _Stdbuf
|
---|
| 4 | .globl _errno
|
---|
| 5 | .globl __opener
|
---|
| 6 | .text
|
---|
| 7 | __opener:
|
---|
| 8 | ~~_opener:
|
---|
| 9 | ~name=8
|
---|
| 10 | ~mode=12
|
---|
| 11 | ~aflag=16
|
---|
| 12 | link R14,#0
|
---|
| 13 | movem.l R6-R7/R13-R13,-(sp)
|
---|
| 14 | ~fp=R13
|
---|
| 15 | ~plusopt=R7
|
---|
| 16 | *line 23
|
---|
| 17 | move.l #_Cbuffs,R13
|
---|
| 18 | *line 25
|
---|
| 19 | bra L4
|
---|
| 20 | L3:
|
---|
| 21 | *line 26
|
---|
| 22 | *line 27
|
---|
| 23 | *line 28
|
---|
| 24 | add.l #18,R13
|
---|
| 25 | move.l R13,R0
|
---|
| 26 | cmp.l #198+_Cbuffs,R0
|
---|
| 27 | blo L5
|
---|
| 28 | *line 28
|
---|
| 29 | clr.l R0
|
---|
| 30 | bra L1
|
---|
| 31 | L5:L4:
|
---|
| 32 | *line 29
|
---|
| 33 | tst.b 12(R13)
|
---|
| 34 | bne L3
|
---|
| 35 | L2:
|
---|
| 36 | *line 31
|
---|
| 37 | move.l 12(R14),R8
|
---|
| 38 | cmp.b #43,1(R8)
|
---|
| 39 | beq L10000
|
---|
| 40 | clr R0
|
---|
| 41 | bra L10001
|
---|
| 42 | L10000:move #1,R0
|
---|
| 43 | L10001:move R0,R7
|
---|
| 44 | *line 33
|
---|
| 45 | move.l 12(R14),R8
|
---|
| 46 | move.b (R8),R0
|
---|
| 47 | ext.w R0
|
---|
| 48 | and #127,R0
|
---|
| 49 | bra L7
|
---|
| 50 | *line 34
|
---|
| 51 | L8:
|
---|
| 52 | *line 35
|
---|
| 53 | *line 36
|
---|
| 54 | *line 37
|
---|
| 55 | tst R7
|
---|
| 56 | beq L10002
|
---|
| 57 | move #2,(sp)
|
---|
| 58 | bra L10004
|
---|
| 59 | L10002:clr (sp)
|
---|
| 60 | L10004:move 16(R14),R0
|
---|
| 61 | or R0,(sp)
|
---|
| 62 | move.l 8(R14),-(sp)
|
---|
| 63 | jsr _open
|
---|
| 64 | addq.l #4,sp
|
---|
| 65 | move.b R0,13(R13)
|
---|
| 66 | cmp #-1,R0
|
---|
| 67 | bne L9
|
---|
| 68 | *line 37
|
---|
| 69 | clr.l R0
|
---|
| 70 | bra L1
|
---|
| 71 | L9:bra L6
|
---|
| 72 | *line 38
|
---|
| 73 | *line 39
|
---|
| 74 | L10:
|
---|
| 75 | *line 40
|
---|
| 76 | *line 41
|
---|
| 77 | *line 42
|
---|
| 78 | tst R7
|
---|
| 79 | beq L10005
|
---|
| 80 | move #2,(sp)
|
---|
| 81 | bra L10007
|
---|
| 82 | L10005:move #1,(sp)
|
---|
| 83 | L10007:move 16(R14),R0
|
---|
| 84 | or R0,(sp)
|
---|
| 85 | or #768,(sp)
|
---|
| 86 | move.l 8(R14),-(sp)
|
---|
| 87 | jsr _open
|
---|
| 88 | addq.l #4,sp
|
---|
| 89 | move.b R0,13(R13)
|
---|
| 90 | cmp #-1,R0
|
---|
| 91 | bne L11
|
---|
| 92 | *line 42
|
---|
| 93 | clr.l R0
|
---|
| 94 | bra L1
|
---|
| 95 | *line 43
|
---|
| 96 | L11:bra L6
|
---|
| 97 | *line 44
|
---|
| 98 | *line 45
|
---|
| 99 | L12:
|
---|
| 100 | *line 46
|
---|
| 101 | *line 47
|
---|
| 102 | *line 48
|
---|
| 103 | tst R7
|
---|
| 104 | beq L10008
|
---|
| 105 | move #2,(sp)
|
---|
| 106 | bra L10010
|
---|
| 107 | L10008:move #1,(sp)
|
---|
| 108 | L10010:move 16(R14),R0
|
---|
| 109 | or R0,(sp)
|
---|
| 110 | or #256,(sp)
|
---|
| 111 | move.l 8(R14),-(sp)
|
---|
| 112 | jsr _open
|
---|
| 113 | addq.l #4,sp
|
---|
| 114 | move.b R0,13(R13)
|
---|
| 115 | cmp #-1,R0
|
---|
| 116 | bne L13
|
---|
| 117 | *line 48
|
---|
| 118 | clr.l R0
|
---|
| 119 | bra L1
|
---|
| 120 | *line 49
|
---|
| 121 | L13:
|
---|
| 122 | *line 50
|
---|
| 123 | *line 50
|
---|
| 124 | move #2,(sp)
|
---|
| 125 | clr.l -(sp)
|
---|
| 126 | move.b 13(R13),R0
|
---|
| 127 | ext.w R0
|
---|
| 128 | move R0,-(sp)
|
---|
| 129 | jsr _lseek
|
---|
| 130 | addq.l #6,sp
|
---|
| 131 | tst.l R0
|
---|
| 132 | bge L14
|
---|
| 133 | *line 51
|
---|
| 134 | *line 52
|
---|
| 135 | move.b 13(R13),R0
|
---|
| 136 | ext.w R0
|
---|
| 137 | move R0,(sp)
|
---|
| 138 | jsr _close
|
---|
| 139 | *line 53
|
---|
| 140 | clr.l R0
|
---|
| 141 | bra L1
|
---|
| 142 | *line 54
|
---|
| 143 | *line 55
|
---|
| 144 | L14:bra L6
|
---|
| 145 | *line 56
|
---|
| 146 | *line 57
|
---|
| 147 | L15:
|
---|
| 148 | *line 58
|
---|
| 149 | *line 59
|
---|
| 150 | move #22,_errno
|
---|
| 151 | *line 60
|
---|
| 152 | clr.l R0
|
---|
| 153 | bra L1
|
---|
| 154 | bra L6
|
---|
| 155 | L7:cmp #97,R0
|
---|
| 156 | beq L12
|
---|
| 157 | cmp #114,R0
|
---|
| 158 | beq L8
|
---|
| 159 | cmp #119,R0
|
---|
| 160 | beq L10
|
---|
| 161 | bra L15
|
---|
| 162 | L6:
|
---|
| 163 | *line 63
|
---|
| 164 | move.b #1,12(R13)
|
---|
| 165 | *line 64
|
---|
| 166 | move #1024,16(R13)
|
---|
| 167 | *line 65
|
---|
| 168 | clr.l 8(R13)
|
---|
| 169 | *line 66
|
---|
| 170 | clr.l 4(R13)
|
---|
| 171 | *line 67
|
---|
| 172 | clr.l (R13)
|
---|
| 173 | *line 68
|
---|
| 174 | move.l R13,R0
|
---|
| 175 | bra L1
|
---|
| 176 | L1:tst.l (sp)+
|
---|
| 177 | movem.l (sp)+,R7-R7/R13-R13
|
---|
| 178 | unlk R14
|
---|
| 179 | rts
|
---|
| 180 | .globl _fopen
|
---|
| 181 | .text
|
---|
| 182 | _fopen:
|
---|
| 183 | ~~fopen:
|
---|
| 184 | ~name=8
|
---|
| 185 | ~mode=12
|
---|
| 186 | link R14,#-4
|
---|
| 187 | *line 78
|
---|
| 188 | clr (sp)
|
---|
| 189 | move.l 12(R14),-(sp)
|
---|
| 190 | move.l 8(R14),-(sp)
|
---|
| 191 | jsr __opener
|
---|
| 192 | addq.l #8,sp
|
---|
| 193 | bra L16
|
---|
| 194 | L16:unlk R14
|
---|
| 195 | rts
|
---|
| 196 | .globl _fopena
|
---|
| 197 | .text
|
---|
| 198 | _fopena:
|
---|
| 199 | ~~fopena:
|
---|
| 200 | ~name=8
|
---|
| 201 | ~mode=12
|
---|
| 202 | link R14,#-4
|
---|
| 203 | *line 85
|
---|
| 204 | clr (sp)
|
---|
| 205 | move.l 12(R14),-(sp)
|
---|
| 206 | move.l 8(R14),-(sp)
|
---|
| 207 | jsr __opener
|
---|
| 208 | addq.l #8,sp
|
---|
| 209 | bra L17
|
---|
| 210 | L17:unlk R14
|
---|
| 211 | rts
|
---|
| 212 | .globl _fopenb
|
---|
| 213 | .text
|
---|
| 214 | _fopenb:
|
---|
| 215 | ~~fopenb:
|
---|
| 216 | ~name=8
|
---|
| 217 | ~mode=12
|
---|
| 218 | link R14,#-4
|
---|
| 219 | *line 92
|
---|
| 220 | move #-32768,(sp)
|
---|
| 221 | move.l 12(R14),-(sp)
|
---|
| 222 | move.l 8(R14),-(sp)
|
---|
| 223 | jsr __opener
|
---|
| 224 | addq.l #8,sp
|
---|
| 225 | bra L18
|
---|
| 226 | L18:unlk R14
|
---|
| 227 | rts
|
---|
| 228 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.