! Start of sample program. ! ! Store this code at B2.0 ! T2.0 ! BLOCK 0 - stored in block 2 on the drum. ! !0.0!20 340! Count of lines, each 4 powers. ! ! !1 240! Initial value of n, the number whose powers we print. . ! !0.1!9 440! Field width for R5. ! ! !0 500! Tell R5 no fraction required ! !0.2!2 600!<< Set number for R5 ! ! !0.4 100! Set link for R5 to return to 0.5 below. ! !0.3!53 072! ! ! !0.0 060!** Call R5 to print on a new line. ! !0.4!2 072! ! ! !0.5 060!** Link for R5 to return to 0.5 below. ! !0.5!3.0 310! Save X3 in U3.0, so we can use it for the inner loop counter. ! ! !0 000! Unused, no effect, a dummy order. ! !0.6!2 600! Current number to X6 ! ! !3 340! Count of 3 more powers, to go on the current line. ! !0.7!2 620!<< Multiply, to get next power in X7. ! ! !3 172! Read our next code block to U1, continue from 1.0. ! ! BLOCK 1 - stored in block 3 on the drum. ! !1.0!7 600! Set the next power for R5. The other parameters, in X4 and X5, are unchanged. ! ! !1.2 100! Set link for R5 to return to 1.3 below. ! !1.1!53 072! ! ! !0.2+060!** Call R5 to print on same line. ! !1.2!3 172! ! ! !1.3 060!** Link for R5 to return to 1.3 below. ! !1.3!2 072! Restore our block 0 to U0, which was used by R5.! ! !0.7 367! Repeat for the 3 numbers on this line. ! !1.4!0 000! Null. ! ! !3.0 300! Restore the count to X3. ! !1.5!1 241! Advance the outer number. ! ! !0.2 367! Count the 20 numbers whose powers are required. ! !1.6!0 000! ! ! !0 077! Stop when complete ! !1.7!1.7 060!** Loop stop on continue after 77 stop. ! ! !0 000! ! J2.0 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||