-------------------------------------------------------- simple trace for arc sin(x) 00056: ....1.111. l00056: 0 -> b[w] 00057: ..1..1.... -> 01060 select rom 1 ; -> l01060 01060: .11...111. c -> a[w] 01061: ...1.1.1.. if s1 = 0 01062: ..1..1.111 -> 01045 then go to sqt11 01063: 1.1..1.1.. if s10 = 0 01064: .11.11.111 -> 01155 then go to l01155 01065: .1.1.1.1.. if s5 = 0 01066: ...1.1.111 -> 01025 then go to atn11 01067: ..1111111. 0 - c - 1 -> c[s] 01070: 111.11111. a exchange c[s] 01071: ....11.111 -> 01015 go to l01015 01015: .1..1.1... l01015: c -> stack we compute (- x * x) 01016: 1.1..1.1.1 -> 01245 jsb mpy11 01245: .1...1.... -> 02246 mpy11: select rom 2 ; -> mpy21 02246: ..11..11.. mpy21: 3 -> p 02247: .111..1.1. mpy22: a + c -> c[x] 02250: .1.1.1111. a - c -> c[s] 02251: 1.1.1.1111 -> 02253 if no carry go to div22 02253: 11..1..11. div22: a exchange b[m] 02254: 1.111.111. 0 -> a[w] 02255: 11..1.11.. if p # 12 02256: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02313: .1111.1.1. c + 1 -> c[x] 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01227: ....11.... return we add 1 01017: 1..11....1 -> 01230 jsb add10 01230: 1.111.111. add10: 0 -> a[w] 01231: 11111...1. a + 1 -> a[p] 01232: .....1.... -> 00233 select rom 0 ; -> l00233 00233: ....1.111. 0 -> b[w] 00234: 1111111.1. a + 1 -> a[xs] 00235: 1111111.1. a + 1 -> a[xs] 00236: .111111.1. c + 1 -> c[xs] 00237: .111111.1. c + 1 -> c[xs] 00240: ...1..1.1. if a >= c[x] 00241: 1.1...1111 -> 00243 then go to add4 00243: 111.1..11. add4: a exchange c[m] 00244: .11.1..11. if c[m] = 0 00245: 1.1..11111 -> 00247 then go to add5 00246: 111.1.111. a exchange c[w] 00247: 1...1..11. add5: b exchange c[m] 00250: ...1..1.1. add6: if a >= c[x] 00251: 1.11111.11 -> 00276 then go to l00276 00252: 1.1...111. shift right b[w] 00253: 11111.1.1. a + 1 -> a[x] 00254: ......111. if b[w] = 0 00255: 1.11111.11 -> 00276 then go to l00276 00256: 1.1.1...11 -> 00250 go to add6 00250: ...1..1.1. add6: if a >= c[x] 00251: 1.11111.11 -> 00276 then go to l00276 00276: ..1..1.... -> 01277 l00276: select rom 1 ; go to ad 01277: .1.1111.1. add12: c - 1 -> c[xs] ; (from r 01300: .1.1111.1. c - 1 -> c[xs] 01301: 1.111.1.1. 0 -> a[x] 01302: 11.1.1111. a - c -> a[s] 01303: 1..111111. if a[s] >= 1 01304: 11...11.11 -> 01306 then go to add13 01306: 1......11. add13: if a >= b[m] 01307: 11..1.1.11 -> 01312 then go to add14 01312: 11....111. add14: a - b -> a[w] 01313: .1...1.... -> 02314 add15: select rom 2 ; -> nrm21 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02321: .1....111. shift left a[w] 02322: .1.11.1.1. c - 1 -> c[x] 02323: 1..11.111. if a[w] >= 1 02324: 11..111111 -> 02317 then go to nrm23 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01227: ....11.... return we take the square root 01020: ..1..1.1.1 -> 01045 jsb sqt11 01045: 1...1.111. sqt11: b exchange c[w] 01046: .1....11.. 4 -> p 01047: 11.1111.11 -> 01336 go to sqt14 01336: .11111111. sqt14: c + 1 -> c[s] 01337: ....1.11.. if p # 0 01340: 1.111.1111 -> 01273 then go to sqt12 01273: .....111.. sqt12: p - 1 -> p 01274: 111..1.11. a + b -> a[ms] 01275: 11.11.1111 -> 01333 if no carry go to sqt18 01333: 111...1.1. sqt18: a + b -> a[x] 01334: 11.1111.11 -> 01336 if no carry go to sqt14 01335: .1.11...1. c - 1 -> c[p] 01336: .11111111. sqt14: c + 1 -> c[s] 01337: ....1.11.. if p # 0 01340: 1.111.1111 -> 01273 then go to sqt12 01273: .....111.. sqt12: p - 1 -> p 01274: 111..1.11. a + b -> a[ms] 01275: 11.11.1111 -> 01333 if no carry go to sqt18 01333: 111...1.1. sqt18: a + b -> a[x] 01334: 11.1111.11 -> 01336 if no carry go to sqt14 01335: .1.11...1. c - 1 -> c[p] 01336: .11111111. sqt14: c + 1 -> c[s] 01337: ....1.11.. if p # 0 01340: 1.111.1111 -> 01273 then go to sqt12 01273: .....111.. sqt12: p - 1 -> p 01274: 111..1.11. a + b -> a[ms] 01275: 11.11.1111 -> 01333 if no carry go to sqt18 01333: 111...1.1. sqt18: a + b -> a[x] 01334: 11.1111.11 -> 01336 if no carry go to sqt14 01335: .1.11...1. c - 1 -> c[p] 01336: .11111111. sqt14: c + 1 -> c[s] 01337: ....1.11.. if p # 0 01340: 1.111.1111 -> 01273 then go to sqt12 01273: .....111.. sqt12: p - 1 -> p 01274: 111..1.11. a + b -> a[ms] 01275: 11.11.1111 -> 01333 if no carry go to sqt18 01333: 111...1.1. sqt18: a + b -> a[x] 01334: 11.1111.11 -> 01336 if no carry go to sqt14 01335: .1.11...1. c - 1 -> c[p] 01336: .11111111. sqt14: c + 1 -> c[s] 01337: ....1.11.. if p # 0 01340: 1.111.1111 -> 01273 then go to sqt12 01341: 111.1.1.1. a exchange c[x] 01342: 1.111.1.1. 0 -> a[x] 01343: ...11...1. if c[p] >= 1 01344: 111..11.11 -> 01346 then go to sqt13 01346: 1..1..111. sqt13: shift right c[w] 01347: 1...1.1.1. b exchange c[x] 01350: ..11..1.1. 0 -> c[x] 01351: 11....11.. 12 -> p 01352: 1.1.111.11 -> 01256 go to sqt17 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01250: .1111...1. sqt15: c + 1 -> c[p] 01251: 11.1..111. sqt16: a - c -> a[w] 01252: 1.1.1...11 -> 01250 if no carry go to sqt15 01253: 1111..111. a + c -> a[w] 01254: .1....111. shift left a[w] 01255: .....111.. p - 1 -> p 01256: 1..1.1..1. sqt17: shift right c[wp] 01257: ....1.11.. if p # 0 01260: 1.1.1..111 -> 01251 then go to sqt16 01261: ..1.11.111 -> 01055 go to tnm12 01055: .11...111. tnm12: c -> a[w] 01056: ..1...1.1. b -> c[x] 01057: 11..1.1111 -> 01313 go to add15 01313: .1...1.... -> 02314 add15: select rom 2 ; -> nrm21 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01227: ....11.... return 01021: .11.1.1... stack -> a 01022: 1.1..11..1 -> 01246 asn12: jsb div11 we divide x by the previous result 01246: .1.1..1.1. div11: a - c -> c[x] 01247: .1...1.... -> 02250 select rom 2 ; -> l02250 02250: .1.1.1111. a - c -> c[s] 02251: 1.1.1.1111 -> 02253 if no carry go to div22 02253: 11..1..11. div22: a exchange b[m] 02254: 1.111.111. 0 -> a[w] 02255: 11..1.11.. if p # 12 02256: 11...1.111 -> 02305 then go to mpy27 02257: ...11..11. if c[m] >= 1 02260: 1.11.11.11 -> 02266 then go to div23 02266: 1...11..1. div23: b exchange c[wp] 02267: 111.1..11. a exchange c[m] 02270: ..1..1.... -> 01271 select rom 1 ; -> l01271 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01262: .1111...1. div14: c + 1 -> c[p] 01263: 11...1.11. div15: a - b -> a[ms] 01264: 1.11..1.11 -> 01262 if no carry go to div14 01265: 111..1.11. a + b -> a[ms] 01266: .1...1.11. shift left a[ms] 01267: .....111.. p - 1 -> p 01270: ....1.11.. if p # 0 01271: 1.11..1111 -> 01263 then go to div15 01272: ..1.11.111 -> 01055 go to tnm12 01055: .11...111. tnm12: c -> a[w] 01056: ..1...1.1. b -> c[x] 01057: 11..1.1111 -> 01313 go to add15 01313: .1...1.... -> 02314 add15: select rom 2 ; -> nrm21 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02321: .1....111. shift left a[w] 02322: .1.11.1.1. c - 1 -> c[x] 02323: 1..11.111. if a[w] >= 1 02324: 11..111111 -> 02317 then go to nrm23 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01227: ....11.... return 01023: 1.1..1.1.. if s10 = 0 01024: 11.11.1.11 -> 01332 then go to rtn12 we now follow arc tan(x) algorithm 01025: 1.111.111. atn11: 0 -> a[w] 01026: 11111...1. a + 1 -> a[p] 01027: .1..1..11. a -> b[m] 01030: 111.1..11. a exchange c[m] 01031: .1.11.1.1. atn12: c - 1 -> c[x] 01032: 1.1..1..1. shift right b[wp] 01033: .11.111.1. if c[xs] = 0 01034: ...11..111 -> 01031 then go to atn12 01035: 1.11.1..1. atn13: shift right a[wp] 01036: .1111.1.1. c + 1 -> c[x] 01037: ...111.111 -> 01035 if no carry go to atn13 01035: 1.11.1..1. atn13: shift right a[wp] 01036: .1111.1.1. c + 1 -> c[x] 01037: ...111.111 -> 01035 if no carry go to atn13 01040: 1.11..111. shift right a[w] 01041: 1.1...111. shift right b[w] 01042: .1..1.1... c -> stack 01043: 1...1.111. atn14: b exchange c[w] 01044: .1.....111 -> 01101 go to atn18 ..... simple trace for arc cos(x) -------------------------------------------------------- same algorithm as above for arc sin(x) up to division by pi /2 then in 1152 we change sign of intermediate result R and add 1 1 - R * 90 = angle in degrees -------------------------------------------------------- 01152: ..1111111. 0 - c - 1 -> c[s] change sign 01153: 1..11....1 -> 01230 jsb add10 add 1 01230: 1.111.111. add10: 0 -> a[w] 01231: 11111...1. a + 1 -> a[p] 01232: .....1.... -> 00233 select rom 0 ; -> l00233 00233: ....1.111. 0 -> b[w] 00234: 1111111.1. a + 1 -> a[xs] 00235: 1111111.1. a + 1 -> a[xs] 00236: .111111.1. c + 1 -> c[xs] 00237: .111111.1. c + 1 -> c[xs] 00240: ...1..1.1. if a >= c[x] 00241: 1.1...1111 -> 00243 then go to add4 00243: 111.1..11. add4: a exchange c[m] 00244: .11.1..11. if c[m] = 0 00245: 1.1..11111 -> 00247 then go to add5 00246: 111.1.111. a exchange c[w] 00247: 1...1..11. add5: b exchange c[m] 00250: ...1..1.1. add6: if a >= c[x] 00251: 1.11111.11 -> 00276 then go to l00276 00252: 1.1...111. shift right b[w] 00253: 11111.1.1. a + 1 -> a[x] 00254: ......111. if b[w] = 0 00255: 1.11111.11 -> 00276 then go to l00276 00256: 1.1.1...11 -> 00250 go to add6 00250: ...1..1.1. add6: if a >= c[x] 00251: 1.11111.11 -> 00276 then go to l00276 00276: ..1..1.... -> 01277 l00276: select rom 1 ; go to ad 01277: .1.1111.1. add12: c - 1 -> c[xs] ; (from r 01300: .1.1111.1. c - 1 -> c[xs] 01301: 1.111.1.1. 0 -> a[x] 01302: 11.1.1111. a - c -> a[s] 01303: 1..111111. if a[s] >= 1 01304: 11...11.11 -> 01306 then go to add13 01306: 1......11. add13: if a >= b[m] 01307: 11..1.1.11 -> 01312 then go to add14 01312: 11....111. add14: a - b -> a[w] 01313: .1...1.... -> 02314 add15: select rom 2 ; -> nrm21 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02321: .1....111. shift left a[w] 02322: .1.11.1.1. c - 1 -> c[x] 02323: 1..11.111. if a[w] >= 1 02324: 11..111111 -> 02317 then go to nrm23 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01227: ....11.... return 01154: ...11..1.. l01154: 0 -> s1 01155: ..11..111. l01155: 0 -> c[w] 01156: .1.11...1. c - 1 -> c[p] we build number 90 in C 01157: .1111.1.1. c + 1 -> c[x] 01160: ...1.1.1.. if s1 = 0 01161: 1.1..1.111 -> 01245 then go to mpy11 01245: .1...1.... -> 02246 mpy11: select rom 2 ; -> mpy21 *90 02246: ..11..11.. mpy21: 3 -> p 02247: .111..1.1. mpy22: a + c -> c[x] 02250: .1.1.1111. a - c -> c[s] 02251: 1.1.1.1111 -> 02253 if no carry go to div22 02253: 11..1..11. div22: a exchange b[m] 02254: 1.111.111. 0 -> a[w] 02255: 11..1.11.. if p # 12 02256: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02304: 111...111. myp26: a + b -> a[w] 02305: .1.11...1. mpy27: c - 1 -> c[p] 02306: 11...1..11 -> 02304 if no carry go to myp26 02307: 1.11..111. mpy28: shift right a[w] 02310: ....1111.. p + 1 -> p 02311: 11.11.11.. if p # 13 02312: 11...1.111 -> 02305 then go to mpy27 02313: .1111.1.1. c + 1 -> c[x] 02314: 1.1111111. nrm21: 0 -> a[s] 02315: 11....11.. 12 -> p 02316: ....1.111. 0 -> b[w] 02317: 1..11...1. nrm23: if a[p] >= 1 02320: 11.1.11.11 -> 02326 then go to nrm24 02326: .1..1.1.1. nrm24: a -> b[x] 02327: 111...111. a + b -> a[w] 02330: 1..111111. if a[s] >= 1 02331: 11...11111 -> 02307 then go to mpy28 02332: 111.1..11. a exchange c[m] 02333: .11...111. c -> a[w] 02334: ....1.111. 0 -> b[w] 02335: 11....11.. nrm27: 12 -> p 02336: .1111.1.11 -> 02172 go to nrm26 02172: ..1..1.1.. nrm26: if s2 = 0 02173: 1..1.1..11 -> 02224 then go to rtn21 02224: ..1..1.... -> 01225 rtn21: select rom 1 ; -> rtn11 01225: ...1.1.1.. rtn11: if s1 = 0 01226: 11.11.1.11 -> 01332 then go to rtn12 01332: .....1.... -> 00333 rtn12: select rom 0 ; -> l00333 00333: .1.111.1.1 -> 00135 l00333: jsb of13 00135: ....11.1.. of13: clear status 00136: .11...111. c -> a[w] 00137: 11....11.. of14: 12 -> p 00140: .1..1.1.1. a -> b[x] 00141: .11...1.1. c -> a[x] 00142: .11.111.1. if c[xs] = 0 00143: .11.1...11 -> 00150 then go to of15 00150: 111.1.1.1. of15: a exchange c[x] 00151: .1...1.1.. if s4 = 0 00152: .1....1.11 -> 00102 then go to l00102 00102: .1..1.111. l00102: a -> b[w] 00103: 1.11111.1. 0 -> a[xs] 00104: .1...1.11. shift left a[ms] 00105: 11.11.1.1. l00105: a - 1 -> a[x] 00106: 111.....11 -> 00340 if no carry go to l00340 00340: 1.11.1.11. l00340: shift right a[ms] 00341: .....111.. p - 1 -> p 00342: ..1.1.11.. if p # 2 00343: .1...1.111 -> 00105 then go to l00105 00105: 11.11.1.1. l00105: a - 1 -> a[x] 00106: 111.....11 -> 00340 if no carry go to l00340 00107: .11.111.1. if c[xs] = 0 00110: 111..11.11 -> 00346 then go to l00346 00346: 1.1111.11. l00346: 0 -> a[ms] 00347: 11111...1. a + 1 -> a[p] 00350: 11111...1. a + 1 -> a[p] 00351: ..1...11.. 2 -> p 00352: ....1111.. l00352: p + 1 -> p 00353: 11.11...1. a - 1 -> a[p] 00354: 111.111111 -> 00357 if no carry go to l00357 00355: ........1. if b[p] = 0 00356: 111.1.1.11 -> 00352 then go to l00352 00357: 11111...1. l00357: a + 1 -> a[p] 00360: 11..1.111. a exchange b[w] 00361: ....11.... return 00334: .111...1.. 1 -> s7 00335: 1111.111.1 -> 00367 fst2zx: jsb dsp1 00367: 1.1.1..1.. dsp1: 0 -> s10 00370: 11....1111 -> 00303 go to dsp7 00303: .11..1111. dsp7: c -> a[s] 00304: 1...1..1.. l00304: 0 -> s8 00305: 11..111111 -> 00317 go to dsp8 00317: ....1..1.. dsp8: 0 -> s0 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00320: .....111.. dsp6: p - 1 -> p 00321: 11..1.11.. if p # 12 00322: 11.1....11 -> 00320 then go to dsp6 00323: 1...1.1... display off 00324: 1....1.1.. if s8 = 0 00325: 11..11..11 -> 00314 then go to dsp4 00314: ....1.1... dsp4: display toggle 00315: .....1.1.. dsp5: if s0 = 0 00316: 11...11111 -> 00307 then go to dsp3 00307: 1......1.. dsp3: 1 -> s8 00310: .1.1.1.1.. if s5 = 0 00311: 11..11.111 -> 00315 then go to dsp5 00315: .....1.1.. dsp5: if s0 = 0 00316: 11...11111 -> 00307 then go to dsp3 00307: 1......1.. dsp3: 1 -> s8 00310: .1.1.1.1.. if s5 = 0 00311: 11..11.111 -> 00315 then go to dsp5 00315: .....1.1.. dsp5: if s0 = 0 00316: 11...11111 -> 00307 then go to dsp3 00307: 1......1.. dsp3: 1 -> s8