software: Added more and more
[pdp8.git] / sw / f4 / FRTSRC / dmax1.ra
... / ...
CommitLineData
1/
2/ VERSION 5A 4-27-77 PT
3/
4 SECT DMAX1
5 BASE 0
6 DPCHK
7DPMAX, SETX XR
8MAXCOM, STARTD
9 FLDA 0 /ADDRESS OF JA .+2+2*N
10 FSTA 3
11 FLDA 30 /RETURN ADDRESS
12 FSTA RETN
13 FLDA% 3 / JA .+2+2*N
14 FSUB 0 /-JA .
15 FSUB TWO /- 2
16 LDX 1,1
17 ALN 1 /DIVIDE BY TWO
18 FNEG /-N
19 ATX 1
20 LDX 0,2 /FOR ARG PICKUP
21 FLDA% 0,2+ /ADDRESS OF FIRST ARG
22 FSTA 3
23 STARTE
24NEW, FLDA% 3 /SAVE NEW MAX
25 FSTA MAX
26SAME, JXN MORMAX,1+ /ANY MORE ARGS ?
27 FLDA MAX /GET RESULT
28RETN, JA .
29MORMAX, STARTD /NEXT ARG ADDRESS
30 FLDA% 0,2+
31 FSTA 3
32 STARTE
33 FLDA MAX /COMPARE
34 FSUB% 3
35 JGE SAME /SAME MAX
36 JA NEW /NEW MAX
37TWO, 0;2
38MAX, 0;0;0
39 0;0;0
40XR, 0;0;0;0;0;0;0;0
41 END
42\f