Last change
on this file since 9519422 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | .globl _errno
|
---|
2 | .globl __ConBuf
|
---|
3 | .comm __ConBuf,258
|
---|
4 | .globl __CBused
|
---|
5 | .comm __CBused,2
|
---|
6 | .globl __conin
|
---|
7 | .text
|
---|
8 | __conin:
|
---|
9 | ~~_conin:
|
---|
10 | ~x=8
|
---|
11 | ~buff=10
|
---|
12 | ~len=14
|
---|
13 | link R14,#-2
|
---|
14 | movem.l R6-R7,-(sp)
|
---|
15 | ~nbp=-2
|
---|
16 | ~l=R7
|
---|
17 | *line 29
|
---|
18 | *line 29
|
---|
19 | tst.b 1+__ConBuf
|
---|
20 | bne L2
|
---|
21 | *line 30
|
---|
22 | *line 31
|
---|
23 | move.b #255,__ConBuf
|
---|
24 | *line 32
|
---|
25 | clr R0
|
---|
26 | move.b R0,2+__ConBuf
|
---|
27 | move.b R0,1+__ConBuf
|
---|
28 | *line 33
|
---|
29 | *line 34
|
---|
30 | move.l #__ConBuf,(sp)
|
---|
31 | move #2,-(sp)
|
---|
32 | jsr _readbuf
|
---|
33 | addq.l #2,sp
|
---|
34 | *line 35
|
---|
35 | move.l #L3,(sp)
|
---|
36 | move #2,-(sp)
|
---|
37 | jsr _writeln
|
---|
38 | addq.l #2,sp
|
---|
39 | *line 36
|
---|
40 | *line 37
|
---|
41 | *line 37
|
---|
42 | cmp.b #26,2+__ConBuf
|
---|
43 | bne L4
|
---|
44 | *line 38
|
---|
45 | *line 39
|
---|
46 | clr.b 1+__ConBuf
|
---|
47 | *line 40
|
---|
48 | clr R0
|
---|
49 | bra L1
|
---|
50 | *line 41
|
---|
51 | *line 42
|
---|
52 | L4:
|
---|
53 | *line 43
|
---|
54 | move.b 1+__ConBuf,R0
|
---|
55 | ext.w R0
|
---|
56 | add #1,R0
|
---|
57 | move.b R0,1+__ConBuf
|
---|
58 | move R0,-2(R14)
|
---|
59 | *line 44
|
---|
60 | move -2(R14),R8
|
---|
61 | add.l #__ConBuf,R8
|
---|
62 | move.b #13,1(R8)
|
---|
63 | add #1,-2(R14)
|
---|
64 | *line 45
|
---|
65 | move.l #__ConBuf,R8
|
---|
66 | move -2(R14),R9
|
---|
67 | add.l R9,R8
|
---|
68 | move.b #10,1(R8)
|
---|
69 | *line 46
|
---|
70 | move #2,__CBused
|
---|
71 | *line 47
|
---|
72 | *line 48
|
---|
73 | L2:
|
---|
74 | *line 49
|
---|
75 | *line 50
|
---|
76 | move.b 1+__ConBuf,R7
|
---|
77 | ext.w R7
|
---|
78 | move R7,R0
|
---|
79 | cmp 14(R14),R0
|
---|
80 | ble L5
|
---|
81 | *line 50
|
---|
82 | move 14(R14),R7
|
---|
83 | *line 51
|
---|
84 | L5:
|
---|
85 | *line 52
|
---|
86 | move R7,(sp)
|
---|
87 | move.l #__ConBuf,R0
|
---|
88 | move __CBused,R1
|
---|
89 | ext.l R1
|
---|
90 | add.l R1,R0
|
---|
91 | move.l R0,-(sp)
|
---|
92 | move.l 10(R14),-(sp)
|
---|
93 | jsr _memcpy
|
---|
94 | addq.l #8,sp
|
---|
95 | *line 53
|
---|
96 | add R7,__CBused
|
---|
97 | *line 54
|
---|
98 | move R7,R0
|
---|
99 | move.b 1+__ConBuf,R1
|
---|
100 | sub.b R0,R1
|
---|
101 | move.b R1,1+__ConBuf
|
---|
102 | *line 55
|
---|
103 | move R7,R0
|
---|
104 | bra L1
|
---|
105 | L1:tst.l (sp)+
|
---|
106 | movem.l (sp)+,R7-R7
|
---|
107 | unlk R14
|
---|
108 | rts
|
---|
109 | .data
|
---|
110 | L3:.dc.b $D,$A,$0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.