source: buchla-68k/alcyon/fwrite.s@ 0170798

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: 926 bytes
RevLine 
[7bf3856]1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _fwrite
5.text
6_fwrite:
7~~fwrite:
8~buffer=R13
9~size=R7
10~number=R6
11~stream=R12
12link R14,#0
13movem.l R3-R7/R12-R13,-(sp)
14~i=R5
15~j=R4
16*line 30
17move.l 8(R14),R13
18*line 30
19move 12(R14),R7
20*line 30
21move 14(R14),R6
22*line 30
23move.l 16(R14),R12
24*line 30
25*line 31
26tst R7
27bge L2
28*line 31
29clr R0
30bra L1
31*line 32
32L2:
33*line 33
34*line 34
35tst R6
36bge L3
37*line 34
38clr R0
39bra L1
40*line 35
41L3:
42*line 36
43clr R5
44bra L6
45L7:
46*line 37
47clr R4
48bra L10
49L11:
50*line 38
51*line 39
52move.l R12,(sp)
53move.b (R13)+,R0
54ext.w R0
55move R0,-(sp)
56jsr _putc
57addq.l #2,sp
58cmp #-1,R0
59bne L12
60*line 39
61move R5,R0
62bra L1
63*line 40
64L12:L9:
65*line 37
66add #1,R4
67L10:
68*line 37
69cmp R7,R4
70blt L11
71L8:L5:
72*line 36
73add #1,R5
74L6:
75*line 36
76cmp R6,R5
77blt L7
78L4:
79*line 41
80move R6,R0
81bra L1
82L1:tst.l (sp)+
83movem.l (sp)+,R4-R7/R12-R13
84unlk R14
85rts
86.data
Note: See TracBrowser for help on using the repository browser.