source: buchla-68k/alcyon/vputs.s@ 58ff1a9

Last change on this file since 58ff1a9 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 _vputs
2.text
3_vputs:
4~~vputs:
5~sbase=8
6~row=12
7~col=14
8~str=16
9~attrib=20
10link R14,#-6
11~c=-2
12*line 35
13bra L4
14L3:
15*line 36
16*line 37
17move 20(R14),(sp)
18move -2(R14),-(sp)
19move 14(R14),-(sp)
20move 12(R14),-(sp)
21move.l 8(R14),-(sp)
22jsr _vputc
23adda.l #10,sp
24*line 38
25*line 39
26*line 39
27add #1,14(R14)
28clr R0
29move 14(R14),R0
30cmp #64,R0
31blo L5
32*line 40
33*line 41
34clr 14(R14)
35*line 42
36*line 43
37*line 44
38add #1,12(R14)
39clr R0
40move 12(R14),R0
41cmp #25,R0
42blo L6
43*line 44
44clr 12(R14)
45L6:
46*line 45
47L5:L4:
48*line 46
49move.l 16(R14),R8
50move.b (R8),R0
51ext.w R0
52move R0,-2(R14)
53add.l #1,16(R14)
54tst R0
55bne L3
56L2:L1:unlk R14
57rts
58.globl _vputsa
59.text
60_vputsa:
61~~vputsa:
62~sbase=8
63~row=12
64~col=14
65~str=16
66~attrib=20
67link R14,#-6
68~c=-2
69*line 66
70bra L10
71L9:
72*line 67
73*line 68
74move.l 20(R14),R8
75move (R8),(sp)
76move -2(R14),-(sp)
77move 14(R14),-(sp)
78move 12(R14),-(sp)
79move.l 8(R14),-(sp)
80jsr _vputc
81adda.l #10,sp
82add.l #2,20(R14)
83*line 69
84*line 70
85*line 70
86add #1,14(R14)
87clr R0
88move 14(R14),R0
89cmp #64,R0
90blo L11
91*line 71
92*line 72
93clr 14(R14)
94*line 73
95*line 74
96*line 75
97add #1,12(R14)
98clr R0
99move 12(R14),R0
100cmp #25,R0
101blo L12
102*line 75
103clr 12(R14)
104L12:
105*line 76
106L11:L10:
107*line 77
108move.l 16(R14),R8
109move.b (R8),R0
110ext.w R0
111move R0,-2(R14)
112add.l #1,16(R14)
113tst R0
114bne L9
115L8:L7:unlk R14
116rts
117.data
Note: See TracBrowser for help on using the repository browser.