| 1 | / |
| 2 | / VERSION 5A 4-27-77 PT |
| 3 | / |
| 4 | SECT DMAX1 |
| 5 | BASE 0 |
| 6 | DPCHK |
| 7 | DPMAX, SETX XR |
| 8 | MAXCOM, 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 |
| 24 | NEW, FLDA% 3 /SAVE NEW MAX |
| 25 | FSTA MAX |
| 26 | SAME, JXN MORMAX,1+ /ANY MORE ARGS ? |
| 27 | FLDA MAX /GET RESULT |
| 28 | RETN, JA . |
| 29 | MORMAX, 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 |
| 37 | TWO, 0;2 |
| 38 | MAX, 0;0;0 |
| 39 | 0;0;0 |
| 40 | XR, 0;0;0;0;0;0;0;0 |
| 41 | END |
| 42 | \f |