source: buchla-68k/alcyon/lseg.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: 2.0 KB
Line 
1.globl _point
2.comm _point,4
3.globl _lseg
4.text
5_lseg:
6~~lseg:
7~x1=8
8~y1=10
9~x2=12
10~y2=14
11~t=16
12link R14,#-6
13movem.l R2-R7,-(sp)
14~dx=R7
15~dy=R6
16~ptx=R5
17~pty=R4
18~p=R3
19~i=-2
20~px=-4
21~py=-6
22*line 48
23move 8(R14),R5
24move 12(R14),R3
25sub R5,R3
26*line 49
27tst R3
28bge L10000
29move #-1,R0
30bra L10002
31L10000:tst R3
32beq L10003
33move #1,R0
34bra L10005
35L10003:clr R0
36L10005:L10002:move R0,R7
37*line 50
38tst R3
39bge L10006
40move R3,R0
41neg R0
42bra L10008
43L10006:move R3,R0
44L10008:move R0,-6(R14)
45*line 52
46move 10(R14),R4
47move 14(R14),R3
48sub R4,R3
49*line 53
50tst R3
51bge L10009
52move #-1,R0
53bra L10011
54L10009:tst R3
55beq L10012
56move #1,R0
57bra L10014
58L10012:clr R0
59L10014:L10011:move R0,R6
60*line 54
61tst R3
62bge L10015
63move R3,R0
64neg R0
65bra L10017
66L10015:move R3,R0
67L10017:move R0,-4(R14)
68*line 56
69move 16(R14),-(sp)
70move R4,-(sp)
71move R5,-(sp)
72move.l _point,R8
73jsr (R8)
74addq.l #6,sp
75*line 58
76*line 58
77move -6(R14),R0
78cmp -4(R14),R0
79ble L2
80*line 59
81*line 60
82move -6(R14),R3
83asr R3
84*line 61
85*line 62
86move #1,-2(R14)
87bra L5
88L6:
89*line 63
90*line 64
91add R7,R5
92*line 65
93*line 66
94*line 66
95sub -4(R14),R3
96bge L7
97*line 67
98*line 68
99add R6,R4
100*line 69
101add -6(R14),R3
102*line 70
103*line 71
104L7:
105*line 72
106move 16(R14),-(sp)
107move R4,-(sp)
108move R5,-(sp)
109move.l _point,R8
110jsr (R8)
111addq.l #6,sp
112L4:
113*line 62
114add #1,-2(R14)
115L5:
116*line 62
117move -2(R14),R0
118cmp -6(R14),R0
119blt L6
120L3:
121*line 73
122*line 74
123bra L8
124L2:
125*line 75
126*line 76
127*line 77
128move -4(R14),R3
129asr R3
130*line 78
131*line 79
132move #1,-2(R14)
133bra L11
134L12:
135*line 80
136*line 81
137add R6,R4
138*line 82
139*line 83
140*line 83
141sub -6(R14),R3
142bge L13
143*line 84
144*line 85
145add R7,R5
146*line 86
147add -4(R14),R3
148*line 87
149*line 88
150L13:
151*line 89
152move 16(R14),-(sp)
153move R4,-(sp)
154move R5,-(sp)
155move.l _point,R8
156jsr (R8)
157addq.l #6,sp
158L10:
159*line 79
160add #1,-2(R14)
161L11:
162*line 79
163move -2(R14),R0
164cmp -4(R14),R0
165ble L12
166L9:
167*line 90
168L8:L1:tst.l (sp)+
169movem.l (sp)+,R3-R7
170unlk R14
171rts
172.data
Note: See TracBrowser for help on using the repository browser.