Last change
on this file since 6099cac was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Added Alcyon C reference output.
|
-
Property mode
set to
100644
|
File size:
515 bytes
|
Line | |
---|
1 | .globl _Cbuffs
|
---|
2 | .globl _Stdbufs
|
---|
3 | .globl _Stdbuf
|
---|
4 | .globl _ungetc
|
---|
5 | .text
|
---|
6 | _ungetc:
|
---|
7 | ~~ungetc:
|
---|
8 | ~c=R7
|
---|
9 | ~ptr=R13
|
---|
10 | link R14,#0
|
---|
11 | movem.l R6-R7/R13-R13,-(sp)
|
---|
12 | *line 16
|
---|
13 | move 8(R14),R7
|
---|
14 | *line 16
|
---|
15 | move.l 10(R14),R13
|
---|
16 | *line 16
|
---|
17 | *line 17
|
---|
18 | cmp #-1,R7
|
---|
19 | beq L10000
|
---|
20 | move.l (R13),R0
|
---|
21 | cmp.l 8(R13),R0
|
---|
22 | bhi L2
|
---|
23 | L10000:*line 17
|
---|
24 | move #-1,R0
|
---|
25 | bra L1
|
---|
26 | *line 18
|
---|
27 | L2:
|
---|
28 | *line 19
|
---|
29 | sub.l #1,(R13)
|
---|
30 | move R7,R0
|
---|
31 | move.l (R13),R9
|
---|
32 | move.b R0,(R9)
|
---|
33 | *line 21
|
---|
34 | move R7,R0
|
---|
35 | bra L1
|
---|
36 | L1:tst.l (sp)+
|
---|
37 | movem.l (sp)+,R7-R7/R13-R13
|
---|
38 | unlk R14
|
---|
39 | rts
|
---|
40 | .data
|
---|
Note:
See
TracBrowser
for help on using the repository browser.