source: buchla-68k/alcyon/flread.s@ d21fc6f

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