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:
979 bytes
|
Line | |
---|
1 | .globl _Cbuffs
|
---|
2 | .globl _Stdbufs
|
---|
3 | .globl _Stdbuf
|
---|
4 | .globl _flread
|
---|
5 | .text
|
---|
6 | _flread:
|
---|
7 | ~~flread:
|
---|
8 | ~buff=R13
|
---|
9 | ~len=R7
|
---|
10 | ~fp=16
|
---|
11 | link R14,#0
|
---|
12 | movem.l R5-R7/R13-R13,-(sp)
|
---|
13 | ~ilen=R6
|
---|
14 | *line 29
|
---|
15 | move.l 8(R14),R13
|
---|
16 | *line 29
|
---|
17 | move.l 12(R14),R7
|
---|
18 | *line 29
|
---|
19 | bra L4
|
---|
20 | L3:
|
---|
21 | *line 30
|
---|
22 | *line 31
|
---|
23 | *line 31
|
---|
24 | cmp.l #$7e00,R7
|
---|
25 | blt L5
|
---|
26 | *line 32
|
---|
27 | *line 33
|
---|
28 | *line 34
|
---|
29 | move.l 16(R14),(sp)
|
---|
30 | move #1,-(sp)
|
---|
31 | move #32256,-(sp)
|
---|
32 | move.l R13,-(sp)
|
---|
33 | jsr _fread
|
---|
34 | addq.l #8,sp
|
---|
35 | cmp #1,R0
|
---|
36 | beq L6
|
---|
37 | *line 34
|
---|
38 | move #-1,R0
|
---|
39 | bra L1
|
---|
40 | *line 35
|
---|
41 | L6:
|
---|
42 | *line 36
|
---|
43 | add.l #$7e00,R13
|
---|
44 | *line 37
|
---|
45 | sub.l #$7e00,R7
|
---|
46 | *line 38
|
---|
47 | bra L7
|
---|
48 | L5:
|
---|
49 | *line 39
|
---|
50 | *line 40
|
---|
51 | *line 41
|
---|
52 | move R7,R6
|
---|
53 | *line 42
|
---|
54 | *line 43
|
---|
55 | *line 44
|
---|
56 | move.l 16(R14),(sp)
|
---|
57 | move #1,-(sp)
|
---|
58 | move R6,-(sp)
|
---|
59 | move.l R13,-(sp)
|
---|
60 | jsr _fread
|
---|
61 | addq.l #8,sp
|
---|
62 | cmp #1,R0
|
---|
63 | beq L8
|
---|
64 | *line 44
|
---|
65 | move #-1,R0
|
---|
66 | bra L1
|
---|
67 | *line 45
|
---|
68 | L8:
|
---|
69 | *line 46
|
---|
70 | clr.l R7
|
---|
71 | L7:
|
---|
72 | *line 47
|
---|
73 | L4:
|
---|
74 | *line 48
|
---|
75 | tst.l R7
|
---|
76 | bgt L3
|
---|
77 | L2:
|
---|
78 | *line 50
|
---|
79 | clr R0
|
---|
80 | bra L1
|
---|
81 | L1:tst.l (sp)+
|
---|
82 | movem.l (sp)+,R6-R7/R13-R13
|
---|
83 | unlk R14
|
---|
84 | rts
|
---|
85 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.