source: buchla-68k/alcyon/writern.s@ 6f49665

Last change on this file since 6f49665 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1.globl _errno
2.globl __berrno
3.globl _WriteRN
4.text
5_WriteRN:
6~~WriteRN:
7~fcp=8
8~buf=12
9link R14,#-10
10~sv=-2
11~brc=-6
12*line 53
13*line 53
14move.l 8(R14),(sp)
15jsr __seek
16move R0,-2(R14)
17beq L2
18*line 54
19*line 55
20*line 55
21tst -2(R14)
22bge L3
23*line 56
24*line 61
25*line 62
26*line 63
27move #5,_errno
28*line 64
29move #-1,R0
30bra L1
31*line 65
32bra L4
33L3:
34*line 66
35*line 66
36cmp #2,-2(R14)
37bne L5
38*line 67
39*line 68
40*line 68
41move.l 8(R14),(sp)
42jsr __alcnew
43tst R0
44beq L6
45*line 69
46*line 70
47move #5,_errno
48*line 71
49move #-1,R0
50bra L1
51*line 72
52*line 77
53*line 78
54L6:
55*line 79
56L5:L4:
57*line 80
58*line 81
59*line 86
60*line 87
61*line 88
62*line 89
63L2:
64*line 90
65*line 90
66clr (sp)
67move.l 8(R14),R8
68move.l 44(R8),R0
69move R0,-(sp)
70move #1,-(sp)
71move.l 12(R14),-(sp)
72move #1,-(sp)
73move #4,-(sp)
74jsr _trap13
75adda.l #12,sp
76move.l R0,-6(R14)
77beq L7
78*line 91
79*line 95
80*line 96
81*line 97
82move.l -6(R14),__berrno
83*line 98
84move #5,_errno
85*line 99
86move #-1,R0
87bra L1
88*line 100
89*line 101
90*line 102
91L7:
92*line 103
93move.l 8(R14),R8
94move.l 44(R8),R0
95move R0,(sp)
96move.l 12(R14),-(sp)
97jsr __secwr
98addq.l #4,sp
99*line 106
100clr R0
101bra L1
102L1:unlk R14
103rts
104.data
Note: See TracBrowser for help on using the repository browser.