3 Wegematic 1000


Index - - Contents - - Previous chapter - Next chapter - - Previous page - Next page
Simpsons Rule for Integration, cont.

dc  c145  E=ii is stored in 45                45 76ii17dc c5
41  bcNN  AB <- AB + yNN-ii+1
    7701  E <- 1
45  76ii  E <- ii-1. 76ii is load E with ii-E, because the 
          code is 76=77-1.
    17dc  E <- ii-2; if c(E) not 0 then go to dc else next c.

          When reaching 49, AB, actually B (A is empty),
          contains the sum in the bracket of the formula
          above, so now the multiplication remains. 
49  e54a  AB <- B x D (D = h). The address 4a has no effect 
          on the result, but times the start of the 
          multiplication for speed up of the program.
    3000  A <-> B
4d  e755  AB <- B x C(55). C(55) = 2/3         55 aaaaaab d5
    3000  A <-> B
51  77EE  E <- EE, i.e., original content of E restored
    11RA  Jump to return address, result in the B register.