source: buchla-68k/alcyon/getbuff.s@ 7bb1284

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 738 bytes
Line 
1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _getbuff
5.text
6_getbuff:
7~~getbuff:
8~ptr=R13
9link R14,#-4
10movem.l R7-R7/R13-R13,-(sp)
11~buffer=-4
12*line 16
13move.l 8(R14),R13
14*line 16
15*line 16
16cmp #1,16(R13)
17bne L2
18*line 17
19*line 18
20lea 14(R13),R8
21move.l R8,8(R13)
22bra L1
23*line 19
24*line 20
25*line 21
26L2:
27*line 22
28*line 22
29tst.l _Stdbufs
30beq L3
31*line 23
32*line 24
33move.l _Stdbufs,-4(R14)
34*line 25
35move.l _Stdbufs,R8
36move.l (R8),_Stdbufs
37*line 26
38bra L4
39L3:
40*line 27
41*line 28
42*line 29
43lea 14(R13),R8
44move.l R8,8(R13)
45*line 30
46move #1,16(R13)
47bra L1
48*line 31
49L4:
50*line 34
51or.b #2,12(R13)
52*line 35
53move.l -4(R14),8(R13)
54bra L1
55L1:tst.l (sp)+
56movem.l (sp)+,R13-R13
57unlk R14
58rts
59.data
Note: See TracBrowser for help on using the repository browser.