source: buchla-68k/alcyon/readrn.s@ 33b5477

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 804 bytes
Line 
1.globl _errno
2.globl __berrno
3.globl _ReadRN
4.text
5_ReadRN:
6~~ReadRN:
7~fcp=8
8~buf=12
9link R14,#-10
10~sv=-2
11~brc=-6
12*line 53
13*line 54
14move.l 8(R14),(sp)
15jsr __seek
16move R0,-2(R14)
17beq L2
18*line 54
19*line 54
20tst -2(R14)
21bge L3
22*line 55
23*line 56
24move #5,_errno
25*line 57
26move #-1,R0
27bra L1
28*line 58
29bra L4
30L3:
31*line 59
32*line 60
33*line 61
34move #22,_errno
35*line 62
36move #1,R0
37bra L1
38L4:
39*line 63
40*line 64
41*line 69
42*line 70
43*line 71
44L2:
45*line 72
46*line 72
47move.l 8(R14),R8
48move.l 44(R8),R0
49move R0,(sp)
50move.l 12(R14),-(sp)
51jsr __secrd
52addq.l #4,sp
53move.l R0,-6(R14)
54beq L5
55*line 75
56*line 76
57*line 77
58move.l -6(R14),__berrno
59*line 78
60move #5,_errno
61*line 79
62move #-1,R0
63bra L1
64*line 80
65*line 81
66L5:
67*line 82
68clr R0
69bra L1
70L1:unlk R14
71rts
72.data
Note: See TracBrowser for help on using the repository browser.