Last change
on this file since de91266 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
760 bytes
|
Line | |
---|
1 | .globl _Cbuffs
|
---|
2 | .globl _Stdbufs
|
---|
3 | .globl _Stdbuf
|
---|
4 | .globl _fread
|
---|
5 | .text
|
---|
6 | _fread:
|
---|
7 | ~~fread:
|
---|
8 | ~buffer=R13
|
---|
9 | ~size=12
|
---|
10 | ~number=14
|
---|
11 | ~stream=16
|
---|
12 | link R14,#-2
|
---|
13 | movem.l R5-R7/R13-R13,-(sp)
|
---|
14 | ~total=-2
|
---|
15 | ~c=R7
|
---|
16 | ~i=R6
|
---|
17 | *line 28
|
---|
18 | move.l 8(R14),R13
|
---|
19 | *line 28
|
---|
20 | clr -2(R14)
|
---|
21 | bra L4
|
---|
22 | L5:
|
---|
23 | *line 29
|
---|
24 | *line 30
|
---|
25 | move 12(R14),R6
|
---|
26 | bra L8
|
---|
27 | L9:
|
---|
28 | *line 31
|
---|
29 | *line 32
|
---|
30 | *line 33
|
---|
31 | move.l 16(R14),(sp)
|
---|
32 | jsr _getc
|
---|
33 | move R0,R7
|
---|
34 | cmp #-1,R7
|
---|
35 | bne L10
|
---|
36 | *line 33
|
---|
37 | move -2(R14),R0
|
---|
38 | bra L1
|
---|
39 | *line 34
|
---|
40 | L10:
|
---|
41 | *line 35
|
---|
42 | move.b R7,(R13)+
|
---|
43 | L7:
|
---|
44 | *line 30
|
---|
45 | sub #1,R6
|
---|
46 | L8:
|
---|
47 | *line 30
|
---|
48 | tst R6
|
---|
49 | bne L9
|
---|
50 | L6:
|
---|
51 | *line 36
|
---|
52 | L3:
|
---|
53 | *line 28
|
---|
54 | add #1,-2(R14)
|
---|
55 | L4:
|
---|
56 | *line 28
|
---|
57 | move -2(R14),R0
|
---|
58 | cmp 14(R14),R0
|
---|
59 | blt L5
|
---|
60 | L2:
|
---|
61 | *line 38
|
---|
62 | move -2(R14),R0
|
---|
63 | bra L1
|
---|
64 | L1:tst.l (sp)+
|
---|
65 | movem.l (sp)+,R6-R7/R13-R13
|
---|
66 | unlk R14
|
---|
67 | rts
|
---|
68 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.