1 ; HP-35 ROM code disassembled from dump by Peter Monta 2 ; $Id: hp35.asm 110 2004-01-12 11:29:56Z eric $ 3 4 ; Much of the code is similar to the HP-45 ROM source code, so labels 5 ; have been copied from that. 6 ; 7 ; Some conditional branch instructions ("if no carry go to") may 8 ; effectively be unconditional, but there is no general way to 9 ; automatically detect this. 10 11 .rom @00 12 13 L00000: ..11.111.1 -> L00067 jsb l00067 14 L00001: 1.11111111 -> L00277 go to l00277 15 16 L00002: 1...1..1.. l00002: 0 -> s8 17 L00003: .....1.111 -> L00005 go to l00005 18 19 L00004: .1.1...1.. l00004: 1 -> s5 20 L00005: 1..1...1.. l00005: 1 -> s9 21 L00006: ..1....1.. 1 -> s2 22 L00007: .1...1.... -> L02010 ***** select rom 2 ; -> l02010 23 24 L00010: 1.11.1...1 -> L00264 l00010: jsb l00264 25 L00011: 1111111.11 -> L00376 go to l00376 26 27 L00012: ...1.11111 -> L00027 l00012: go to l00027 28 29 L00013: ..11....11 -> L00060 l00013: go to l00060 30 31 L00014: .11.1.1... stack -> a 32 L00015: 11.11..111 -> L00331 go to l00331 33 L00016: 1.111.111. 0 -> a[w] 34 L00017: 11111...1. a + 1 -> a[p] 35 L00020: ....1.111. l00020: 0 -> b[w] 36 L00021: ..1..1.... -> L01022 ***** select rom 1 ; -> asn12 37 38 L00022: 11111.1.1. dig6: a + 1 -> a[x] 39 L00023: 11111.1.1. dig5: a + 1 -> a[x] 40 L00024: 11111.1.1. dig4: a + 1 -> a[x] 41 L00025: ...11.1.11 -> L00032 if no carry go to dig3 42 43 L00026: 1..11.1..1 -> L00232 jsb l00232 44 L00027: ..1.1.1... l00027: c exchange m 45 L00030: 1.1.1.1... m -> c 46 L00031: ..11111111 -> L00077 go to l00077 47 48 L00032: 11111.1.1. dig3: a + 1 -> a[x] 49 L00033: 11111.1.1. dig2: a + 1 -> a[x] 50 L00034: 11111.1.1. dig1: a + 1 -> a[x] 51 L00035: ....11.... return 52 53 L00036: ..11..11.. l00036: 3 -> p 54 L00037: ..1.1.1.1. 0 - c -> c[x] 55 L00040: .11.1.1... l00040: stack -> a 56 L00041: ...1....11 -> L00020 go to l00020 57 58 L00042: .111.1..11 -> L00164 l00042: go to l00164 59 60 L00043: ..11..11.. l00043: 3 -> p 61 L00044: ....11.... return 62 63 L00045: .......... no operation 64 65 L00046: ..1.....11 -> L00040 L00046: go to l00040 66 67 L00047: .1.1...1.. l00047: 1 -> s5 68 L00050: ...1...1.. 1 -> s1 69 L00051: ..1.111.11 -> L00056 go to l00056 70 71 L00052: 1..1...1.. l00052: 1 -> s9 72 L00053: ..1..11111 -> L00047 go to l00047 73 74 L00054: 1.1....1.. l00054: 1 -> s10 75 L00055: 11....1.11 -> L00302 go to l00302 76 77 L00056: ....1.111. l00056: 0 -> b[w] 78 L00057: ..1..1.... -> L01060 ***** select rom 1 ; -> l01060 79 80 L00060: 11..1.1... l00060: down rotate 81 L00061: 11.11.1111 -> L00333 go to l00333 82 83 L00062: 11111.1.1. dig9: a + 1 -> a[x] 84 L00063: 11111.1.1. dig8: a + 1 -> a[x] 85 L00064: 11111.1.1. dig7: a + 1 -> a[x] 86 L00065: ...1..1.11 -> L00022 if no carry go to dig6 ; unconditional? 87 L00066: 1..11..111 -> L00231 go to sub0 88 89 L00067: 111.1.1... l00067: clear registers 90 L00070: .1.111...1 -> L00134 jsb of12 91 L00071: 11.111.111 -> L00335 l00071: go to fst2zx 92 93 L00072: 1111..1.11 -> L00362 l00072: go to eex2 94 95 L00073: 1.11..111. l00073: shift right a[w] 96 L00074: ..11...1.. 1 -> s3 97 L00075: .111.11.11 -> L00166 go to l00166 98 99 L00076: .1..1.1... l00076: c -> stack 100 L00077: ....11.1.. l00077: clear status 101 L00100: 1.11..111. shift right a[w] 102 L00101: 11.111.1.1 -> L00335 jsb fst2zx 103 L00102: .1..1.111. l00102: a -> b[w] 104 L00103: 1.11111.1. 0 -> a[xs] 105 L00104: .1...1.11. shift left a[ms] 106 L00105: 11.11.1.1. l00105: a - 1 -> a[x] 107 L00106: 111.....11 -> L00340 if no carry go to l00340 108 L00107: .11.111.1. if c[xs] = 0 109 L00110: 111..11.11 -> L00346 then go to l00346 110 L00111: 11..11.11. a exchange b[ms] 111 L00112: 11.1..11.. 13 -> p 112 L00113: 111..11.11 -> L00346 go to l00346 113 114 L00114: .....111.. eex7: p - 1 -> p 115 L00115: .1111.1.1. c + 1 -> c[x] 116 L00116: ........1. eex8: if b[p] = 0 117 L00117: .1..11..11 -> L00114 then go to eex7 118 L00120: 1.11...1.. 1 -> s11 119 L00121: 1.11.1.11. shift right a[ms] 120 L00122: 111.1..11. a exchange c[m] 121 L00123: .1...1.1.. if s4 = 0 122 L00124: 1....11111 -> L00207 then go to den1 123 L00125: .1.11111.1 -> L00137 jsb of14 124 L00126: 11.111.111 -> L00335 go to fst2zx 125 126 L00127: ..11.1..1. of11: 0 -> c[wp] 127 L00130: .1.111..1. c - 1 -> c[wp] 128 L00131: ..11.11.1. 0 -> c[xs] 129 L00132: 111...1.1. a + b -> a[x] 130 L00133: .1.111.111 -> L00135 if no carry go to of13 131 132 L00134: ..11..111. of12: 0 -> c[w] 133 L00135: ....11.1.. of13: clear status 134 L00136: .11...111. c -> a[w] 135 L00137: 11....11.. of14: 12 -> p 136 L00140: .1..1.1.1. a -> b[x] 137 L00141: .11...1.1. c -> a[x] 138 L00142: .11.111.1. if c[xs] = 0 139 L00143: .11.1...11 -> L00150 then go to of15 140 L00144: ..1.1.1.1. 0 - c -> c[x] 141 L00145: .1.1111.1. c - 1 -> c[xs] 142 L00146: .1.1.11111 -> L00127 if no carry go to of11 143 L00147: .1.1..11.. 5 -> p 144 L00150: 111.1.1.1. of15: a exchange c[x] 145 L00151: .1...1.1.. if s4 = 0 146 L00152: .1....1.11 -> L00102 then go to l00102 147 L00153: 11..1.1.1. a exchange b[x] 148 L00154: ....1.1.1. 0 -> b[x] 149 L00155: 1111.111.1 -> L00367 jsb dsp1 150 L00156: .1....1.1. shift left a[x] 151 L00157: 1.11..111. eex3: shift right a[w] 152 L00160: 11..1.11.. if p # 12 153 L00161: 1...1..111 -> L00211 then go to den7 154 L00162: 111.11..1. a exchange c[wp] 155 L00163: .1111.1.11 -> L00172 go to eex4 156 157 L00164: 1.11.1...1 -> L00264 l00164: jsb l00264 158 L00165: ..1..1.... -> L01166 ***** select rom 1 ; -> l01166 159 160 L00166: .1...1.1.. l00166: if s4 = 0 161 L00167: 1111.11.11 -> L00366 then go to chs3 162 L00170: 111.11..1. a exchange c[wp] 163 L00171: ..11111.1. 0 - c - 1 -> c[xs] 164 L00172: .11...111. eex4: c -> a[w] 165 L00173: .11.111.1. if c[xs] = 0 166 L00174: .111111111 -> L00177 then go to eex5 167 L00175: ..11.11.1. 0 -> c[xs] 168 L00176: ..1.1.1.1. 0 - c -> c[x] 169 L00177: 11.1..11.. eex5: 13 -> p 170 L00200: .1...1.11. eex6: shift left a[ms] 171 L00201: .1.11.1.1. c - 1 -> c[x] 172 L00202: 1..111111. if a[s] >= 1 173 L00203: .1..111.11 -> L00116 then go to eex8 174 L00204: 1..111.11. if a[ms] >= 1 175 L00205: 1.......11 -> L00200 then go to eex6 176 L00206: ..11..1.1. 0 -> c[x] 177 L00207: 1111.111.1 -> L00367 den1: jsb dsp1 178 L00210: 1.11.1.11. shift right a[ms] 179 L00211: .11..1111. den7: c -> a[s] 180 L00212: 11..1.11.. den2: if p # 12 181 L00213: 1..1..1111 -> L00223 then go to den4 182 L00214: ..1...111. b -> c[w] 183 L00215: .1111.111. c + 1 -> c[w] 184 L00216: ...1..11.. 1 -> p 185 L00217: .1...1..1. den3: shift left a[wp] 186 L00220: ....1111.. p + 1 -> p 187 L00221: .11.1...1. if c[p] = 0 188 L00222: 1...111111 -> L00217 then go to den3 189 L00223: 111.1.111. den4: a exchange c[w] 190 L00224: ..111.11.. if p # 3 191 L00225: 11111..111 -> L00371 then go to den5 192 L00226: ..11..1.1. 0 -> c[x] 193 L00227: .11....1.. 1 -> s6 194 L00230: .1111.1.11 -> L00172 go to eex4 195 196 L00231: ..1111111. sub0: 0 - c - 1 -> c[s] 197 L00232: .11.1.1... l00232: stack -> a 198 L00233: ....1.111. 0 -> b[w] 199 L00234: 1111111.1. a + 1 -> a[xs] 200 L00235: 1111111.1. a + 1 -> a[xs] 201 L00236: .111111.1. c + 1 -> c[xs] 202 L00237: .111111.1. c + 1 -> c[xs] 203 L00240: ...1..1.1. if a >= c[x] 204 L00241: 1.1...1111 -> L00243 then go to add4 205 L00242: 111.1.111. a exchange c[w] 206 L00243: 111.1..11. add4: a exchange c[m] 207 L00244: .11.1..11. if c[m] = 0 208 L00245: 1.1..11111 -> L00247 then go to add5 209 L00246: 111.1.111. a exchange c[w] 210 L00247: 1...1..11. add5: b exchange c[m] 211 L00250: ...1..1.1. add6: if a >= c[x] 212 L00251: 1.11111.11 -> L00276 then go to l00276 213 L00252: 1.1...111. shift right b[w] 214 L00253: 11111.1.1. a + 1 -> a[x] 215 L00254: ......111. if b[w] = 0 216 L00255: 1.11111.11 -> L00276 then go to l00276 217 L00256: 1.1.1...11 -> L00250 go to add6 218 219 L00257: 1.1111.11. fst3: 0 -> a[ms] 220 L00260: ..11.1.1.. if s3 = 0 221 L00261: 1.11.1..11 -> L00264 then go to l00264 222 L00262: 11.111111. a - 1 -> a[s] 223 L00263: ..1111111. 0 - c - 1 -> c[s] 224 L00264: .111.1.1.. l00264: if s7 = 0 225 L00265: 1.11.11111 -> L00267 then go to fst5 226 L00266: .1..1.1... c -> stack 227 L00267: .111...1.. fst5: 1 -> s7 228 L00270: ..11..111. 0 -> c[w] 229 L00271: .1.11.111. c - 1 -> c[w] 230 L00272: ..1.11111. 0 - c -> c[s] 231 L00273: .11111111. c + 1 -> c[s] 232 L00274: 1...1.111. b exchange c[w] 233 L00275: ....11.... return 234 235 L00276: ..1..1.... -> L01277 ***** l00276: select rom 1 ; go to add12 236 237 L00277: .1.111...1 -> L00134 l00277: jsb of12 238 L00300: .1.1...1.. 1 -> s5 239 L00301: 11.111.111 -> L00335 go to fst2zx 240 241 L00302: 1.11..111. l00302: shift right a[w] 242 L00303: .11..1111. dsp7: c -> a[s] 243 L00304: 1...1..1.. l00304: 0 -> s8 244 L00305: 11..111111 -> L00317 go to dsp8 245 246 L00306: .111111.1. dsp2: c + 1 -> c[xs] 247 L00307: 1......1.. dsp3: 1 -> s8 248 L00310: .1.1.1.1.. if s5 = 0 249 L00311: 11..11.111 -> L00315 then go to dsp5 250 L00312: .1111.1.1. c + 1 -> c[x] 251 L00313: 11...11.11 -> L00306 if no carry go to dsp2 252 L00314: ....1.1... dsp4: display toggle 253 L00315: .....1.1.. dsp5: if s0 = 0 254 L00316: 11...11111 -> L00307 then go to dsp3 255 L00317: ....1..1.. dsp8: 0 -> s0 256 L00320: .....111.. dsp6: p - 1 -> p 257 L00321: 11..1.11.. if p # 12 258 L00322: 11.1....11 -> L00320 then go to dsp6 259 L00323: 1...1.1... display off 260 L00324: 1....1.1.. if s8 = 0 261 L00325: 11..11..11 -> L00314 then go to dsp4 262 L00326: .1....111. shift left a[w] 263 L00327: .1.11..1.. 0 -> s5 264 L00330: ..11.1.... keys -> rom address 265 266 L00331: .1..1.1... l00331: c -> stack 267 L00332: 111.1.111. a exchange c[w] 268 L00333: .1.111.1.1 -> L00135 l00333: jsb of13 269 L00334: .111...1.. 1 -> s7 270 L00335: 1111.111.1 -> L00367 fst2zx: jsb dsp1 271 L00336: 1.1.1111.1 -> L00257 jsb fst3 272 L00337: 1...1.1.11 -> L00212 go to den2 273 274 L00340: 1.11.1.11. l00340: shift right a[ms] 275 L00341: .....111.. p - 1 -> p 276 L00342: ..1.1.11.. if p # 2 277 L00343: .1...1.111 -> L00105 then go to l00105 278 L00344: 11....11.. 12 -> p 279 L00345: 1.111.111. 0 -> a[w] 280 L00346: 1.1111.11. l00346: 0 -> a[ms] 281 L00347: 11111...1. a + 1 -> a[p] 282 L00350: 11111...1. a + 1 -> a[p] 283 L00351: ..1...11.. 2 -> p 284 L00352: ....1111.. l00352: p + 1 -> p 285 L00353: 11.11...1. a - 1 -> a[p] 286 L00354: 111.111111 -> L00357 if no carry go to l00357 287 L00355: ........1. if b[p] = 0 288 L00356: 111.1.1.11 -> L00352 then go to l00352 289 L00357: 11111...1. l00357: a + 1 -> a[p] 290 L00360: 11..1.111. a exchange b[w] 291 L00361: ....11.... return 292 293 L00362: .1.....1.. eex2: 1 -> s4 294 L00363: 1.11.1.1.. if s11 = 0 295 L00364: ...111..11 -> L00034 then go to dig1 296 L00365: .11.111111 -> L00157 go to eex3 297 298 L00366: ..1111111. chs3: 0 - c - 1 -> c[s] 299 L00367: 1.1.1..1.. dsp1: 0 -> s10 300 L00370: 11....1111 -> L00303 go to dsp7 301 302 L00371: .11..1.1.. den5: if s6 = 0 303 L00372: 111111..11 -> L00374 then go to den6 304 L00373: .....111.. p - 1 -> p 305 L00374: 1.1..1..1. den6: shift right b[wp] 306 L00375: .1111.1..1 -> L00172 jsb eex4 307 L00376: 1.1.1.1... l00376: m -> c 308 L00377: 11.11.1111 -> L00333 go to l00333 309 310 .rom @01 311 312 L01000: 1111..1111 -> L01363 go to tan13 313 314 L01001: 11..1.111. tan15: a exchange b[w] 315 L01002: ..1.1....1 -> L01050 jsb tnm11 316 L01003: .11.1.1... stack -> a 317 L01004: ..1.1....1 -> L01050 jsb tnm11 318 L01005: .11.1.1... stack -> a 319 L01006: 1..1.1.1.. if s9 = 0 320 L01007: ....1..111 -> L01011 then go to tan16 321 L01010: 111.1.111. a exchange c[w] 322 L01011: .1.1.1.1.. tan16: if s5 = 0 323 L01012: ...1..1.11 -> L01022 then go to asn12 324 L01013: ..11.1111. 0 -> c[s] 325 L01014: 1.1..11..1 -> L01246 jsb div11 326 L01015: .1..1.1... l01015: c -> stack 327 L01016: 1.1..1.1.1 -> L01245 jsb mpy11 328 L01017: 1..11....1 -> L01230 jsb add10 329 L01020: ..1..1.1.1 -> L01045 jsb sqt11 330 L01021: .11.1.1... stack -> a 331 L01022: 1.1..11..1 -> L01246 asn12: jsb div11 332 L01023: 1.1..1.1.. if s10 = 0 333 L01024: 11.11.1.11 -> L01332 then go to rtn12 334 L01025: 1.111.111. atn11: 0 -> a[w] 335 L01026: 11111...1. a + 1 -> a[p] 336 L01027: .1..1..11. a -> b[m] 337 L01030: 111.1..11. a exchange c[m] 338 L01031: .1.11.1.1. atn12: c - 1 -> c[x] 339 L01032: 1.1..1..1. shift right b[wp] 340 L01033: .11.111.1. if c[xs] = 0 341 L01034: ...11..111 -> L01031 then go to atn12 342 L01035: 1.11.1..1. atn13: shift right a[wp] 343 L01036: .1111.1.1. c + 1 -> c[x] 344 L01037: ...111.111 -> L01035 if no carry go to atn13 345 L01040: 1.11..111. shift right a[w] 346 L01041: 1.1...111. shift right b[w] 347 L01042: .1..1.1... c -> stack 348 L01043: 1...1.111. atn14: b exchange c[w] 349 L01044: .1.....111 -> L01101 go to atn18 350 351 L01045: 1...1.111. sqt11: b exchange c[w] 352 L01046: .1....11.. 4 -> p 353 L01047: 11.1111.11 -> L01336 go to sqt14 354 355 L01050: .1..1.1... tnm11: c -> stack 356 L01051: 111.1.111. a exchange c[w] 357 L01052: .11.1...1. if c[p] = 0 358 L01053: ..1.11.111 -> L01055 then go to tnm12 359 L01054: ..1.1.111. 0 - c -> c[w] 360 L01055: .11...111. tnm12: c -> a[w] 361 L01056: ..1...1.1. b -> c[x] 362 L01057: 11..1.1111 -> L01313 go to add15 363 364 L01060: .11...111. c -> a[w] 365 L01061: ...1.1.1.. if s1 = 0 366 L01062: ..1..1.111 -> L01045 then go to sqt11 367 L01063: 1.1..1.1.. if s10 = 0 368 L01064: .11.11.111 -> L01155 then go to l01155 369 L01065: .1.1.1.1.. if s5 = 0 370 L01066: ...1.1.111 -> L01025 then go to atn11 371 L01067: ..1111111. 0 - c - 1 -> c[s] 372 L01070: 111.11111. a exchange c[s] 373 L01071: ....11.111 -> L01015 go to l01015 374 375 L01072: 1.1..1..1. atn15: shift right b[wp] 376 L01073: 11.111111. atn16: a - 1 -> a[s] 377 L01074: ..111.1.11 -> L01072 if no carry go to atn15 378 L01075: .11111111. c + 1 -> c[s] 379 L01076: 11..11..1. a exchange b[wp] 380 L01077: .111.1..1. a + c -> c[wp] 381 L01100: 11..1.111. a exchange b[w] 382 L01101: .1..1.111. atn18: a -> b[w] 383 L01102: 11.1.1..1. a - c -> a[wp] 384 L01103: ..111.1111 -> L01073 if no carry go to atn16 385 L01104: .11.1.1... stack -> a 386 L01105: 1.11..111. shift right a[w] 387 L01106: 111.11..1. a exchange c[wp] 388 L01107: 11..1.111. a exchange b[w] 389 L01110: .1...1..1. shift left a[wp] 390 L01111: .1..1.1... c -> stack 391 L01112: 111111111. a + 1 -> a[s] 392 L01113: 111111111. a + 1 -> a[s] 393 L01114: ..1...1111 -> L01043 if no carry go to atn14 394 L01115: ..11..111. 0 -> c[w] 395 L01116: ....1.1.1. 0 -> b[x] 396 L01117: 1.11.1.11. shift right a[ms] 397 L01120: 1.11..1..1 -> L01262 jsb div14 398 L01121: .1.11...1. c - 1 -> c[p] 399 L01122: .11.1.1... stack -> a 400 L01123: 111.1.111. a exchange c[w] 401 L01124: .1....11.. 4 -> p 402 L01125: 1.1..1...1 -> L01244 jsb pqo13 403 L01126: .11...11.. 6 -> p 404 L01127: 1..11.11.1 -> L01233 jsb pmu11 405 L01130: 1.....11.. 8 -> p 406 L01131: 1..11.11.1 -> L01233 jsb pmu11 407 L01132: ..1...11.. 2 -> p 408 L01133: 1....11... load constant 8 409 L01134: 1.1...11.. 10 -> p 410 L01135: 1..11.11.1 -> L01233 jsb pmu11 411 L01136: 1...111..1 -> L01216 jsb atcd1 412 L01137: 1..11.11.1 -> L01233 jsb pmu11 413 L01140: 11..11...1 -> L01314 jsb atc1 414 L01141: .1....111. shift left a[w] 415 L01142: 1..11.11.1 -> L01233 jsb pmu11 416 L01143: ..1...111. b -> c[w] 417 L01144: 11..1.11.1 -> L01313 jsb add15 418 L01145: 11..11...1 -> L01314 jsb atc1 419 L01146: 1.1.1.111. c + c -> c[w] 420 L01147: 1.1..11..1 -> L01246 jsb div11 421 L01150: 1..1.1.1.. if s9 = 0 422 L01151: .11.11..11 -> L01154 then go to l01154 423 L01152: ..1111111. 0 - c - 1 -> c[s] 424 L01153: 1..11....1 -> L01230 jsb add10 425 L01154: ...11..1.. l01154: 0 -> s1 426 L01155: ..11..111. l01155: 0 -> c[w] 427 L01156: .1.11...1. c - 1 -> c[p] 428 L01157: .1111.1.1. c + 1 -> c[x] 429 L01160: ...1.1.1.. if s1 = 0 430 L01161: 1.1..1.111 -> L01245 then go to mpy11 431 L01162: 1.1..11..1 -> L01246 jsb div11 432 L01163: 11..11...1 -> L01314 jsb atc1 433 L01164: 1.1.1.111. c + c -> c[w] 434 L01165: 1.1..1.1.1 -> L01245 jsb mpy11 435 L01166: 11..11...1 -> L01314 jsb atc1 436 L01167: 1.1.1.111. c + c -> c[w] 437 L01170: 1.1.1.111. c + c -> c[w] 438 L01171: 1..1.1.1.1 -> L01225 jsb rtn11 439 L01172: 1.1.1.111. c + c -> c[w] 440 L01173: 111.1.11.1 -> L01353 jsb pre11 441 L01174: 11..11...1 -> L01314 jsb atc1 442 L01175: 1.1...11.. 10 -> p 443 L01176: 1..111...1 -> L01234 jsb pqo11 444 L01177: 1...111..1 -> L01216 jsb atcd1 445 L01200: 1.....11.. 8 -> p 446 L01201: 1..111.1.1 -> L01235 jsb pqo12 447 L01202: ..1...11.. 2 -> p 448 L01203: 1....11... load constant 8 449 L01204: .11...11.. 6 -> p 450 L01205: 1..111...1 -> L01234 jsb pqo11 451 L01206: .1....11.. 4 -> p 452 L01207: 1..111...1 -> L01234 jsb pqo11 453 L01210: 1..111...1 -> L01234 jsb pqo11 454 L01211: 11..1.111. a exchange b[w] 455 L01212: 1..1..111. shift right c[w] 456 L01213: 11.1..11.. 13 -> p 457 L01214: .1.1.11... load constant 5 458 L01215: 11111.1111 -> L01373 go to tan14 459 460 L01216: .11...11.. atcd1: 6 -> p 461 L01217: 1....11... load constant 8 462 L01220: .11..11... load constant 6 463 L01221: .1.1.11... load constant 5 464 L01222: ..1..11... load constant 2 465 L01223: .1...11... load constant 4 466 L01224: 1..1.11... load constant 9 467 L01225: ...1.1.1.. rtn11: if s1 = 0 468 L01226: 11.11.1.11 -> L01332 then go to rtn12 469 L01227: ....11.... return 470 471 L01230: 1.111.111. add10: 0 -> a[w] 472 L01231: 11111...1. a + 1 -> a[p] 473 L01232: .....1.... -> L00233 ***** select rom 0 ; -> l00233 474 475 L01233: .1...1.... -> L02234 ***** pmu11: select rom 2 ; -> pmu21 476 477 L01234: .1....111. pqo11: shift left a[w] 478 L01235: 1.1..1.11. pqo12: shift right b[ms] 479 L01236: 1...1.111. b exchange c[w] 480 L01237: 1.1....111 -> L01241 go to pqo16 481 482 L01240: .11111111. pqo15: c + 1 -> c[s] 483 L01241: 11....111. pqo16: a - b -> a[w] 484 L01242: 1.1.....11 -> L01240 if no carry go to pqo15 485 L01243: 111...111. a + b -> a[w] 486 L01244: .1...1.... -> L02245 ***** pqo13: select rom 2 ; -> l02245 487 488 L01245: .1...1.... -> L02246 ***** mpy11: select rom 2 ; -> mpy21 489 490 L01246: .1.1..1.1. div11: a - c -> c[x] 491 L01247: .1...1.... -> L02250 ***** select rom 2 ; -> l02250 492 493 L01250: .1111...1. sqt15: c + 1 -> c[p] 494 L01251: 11.1..111. sqt16: a - c -> a[w] 495 L01252: 1.1.1...11 -> L01250 if no carry go to sqt15 496 L01253: 1111..111. a + c -> a[w] 497 L01254: .1....111. shift left a[w] 498 L01255: .....111.. p - 1 -> p 499 L01256: 1..1.1..1. sqt17: shift right c[wp] 500 L01257: ....1.11.. if p # 0 501 L01260: 1.1.1..111 -> L01251 then go to sqt16 502 L01261: ..1.11.111 -> L01055 go to tnm12 503 504 L01262: .1111...1. div14: c + 1 -> c[p] 505 L01263: 11...1.11. div15: a - b -> a[ms] 506 L01264: 1.11..1.11 -> L01262 if no carry go to div14 507 L01265: 111..1.11. a + b -> a[ms] 508 L01266: .1...1.11. shift left a[ms] 509 L01267: .....111.. p - 1 -> p 510 L01270: ....1.11.. if p # 0 511 L01271: 1.11..1111 -> L01263 then go to div15 512 L01272: ..1.11.111 -> L01055 go to tnm12 513 514 L01273: .....111.. sqt12: p - 1 -> p 515 L01274: 111..1.11. a + b -> a[ms] 516 L01275: 11.11.1111 -> L01333 if no carry go to sqt18 517 L01276: .....1.... -> L00277 ***** select rom 0 ; -> l00277 518 519 L01277: .1.1111.1. add12: c - 1 -> c[xs] ; (from rom 00276) 520 L01300: .1.1111.1. c - 1 -> c[xs] 521 L01301: 1.111.1.1. 0 -> a[x] 522 L01302: 11.1.1111. a - c -> a[s] 523 L01303: 1..111111. if a[s] >= 1 524 L01304: 11...11.11 -> L01306 then go to add13 525 L01305: .1...1.... -> L02306 ***** select rom 2 ; -> l02306 526 527 L01306: 1......11. add13: if a >= b[m] 528 L01307: 11..1.1.11 -> L01312 then go to add14 529 L01310: ..1111111. 0 - c - 1 -> c[s] 530 L01311: 11..1.111. a exchange b[w] 531 L01312: 11....111. add14: a - b -> a[w] 532 L01313: .1...1.... -> L02314 ***** add15: select rom 2 ; -> nrm21 533 534 L01314: ..11..111. atc1: 0 -> c[w] 535 L01315: 1.11..11.. 11 -> p 536 L01316: .111.11... load constant 7 ; load pi/4 537 L01317: 1....11... load constant 8 538 L01320: .1.1.11... load constant 5 539 L01321: ..11.11... load constant 3 540 L01322: 1..1.11... load constant 9 541 L01323: 1....11... load constant 8 542 L01324: ...1.11... load constant 1 543 L01325: .11..11... load constant 6 544 L01326: ..11.11... load constant 3 545 L01327: .1.1.11... load constant 5 546 L01330: 11....11.. 12 -> p 547 L01331: ....11.... return 548 549 L01332: .....1.... -> L00333 ***** rtn12: select rom 0 ; -> l00333 550 551 L01333: 111...1.1. sqt18: a + b -> a[x] 552 L01334: 11.1111.11 -> L01336 if no carry go to sqt14 553 L01335: .1.11...1. c - 1 -> c[p] 554 L01336: .11111111. sqt14: c + 1 -> c[s] 555 L01337: ....1.11.. if p # 0 556 L01340: 1.111.1111 -> L01273 then go to sqt12 557 L01341: 111.1.1.1. a exchange c[x] 558 L01342: 1.111.1.1. 0 -> a[x] 559 L01343: ...11...1. if c[p] >= 1 560 L01344: 111..11.11 -> L01346 then go to sqt13 561 L01345: 1.11..111. shift right a[w] 562 L01346: 1..1..111. sqt13: shift right c[w] 563 L01347: 1...1.1.1. b exchange c[x] 564 L01350: ..11..1.1. 0 -> c[x] 565 L01351: 11....11.. 12 -> p 566 L01352: 1.1.111.11 -> L01256 go to sqt17 567 568 L01353: .1...1.... -> L02354 ***** pre11: select rom 2 ; -> pre21 569 570 L01354: 1.1..1..1. tan18: shift right b[wp] 571 L01355: 1.1..1..1. shift right b[wp] 572 L01356: .1.111111. tan19: c - 1 -> c[s] 573 L01357: 111.11..11 -> L01354 if no carry go to tan18 574 L01360: .111.1..1. a + c -> c[wp] 575 L01361: 11...1..1. a - b -> a[wp] 576 L01362: 1...11..1. b exchange c[wp] 577 L01363: ..1...111. tan13: b -> c[w] 578 L01364: 11.111111. a - 1 -> a[s] 579 L01365: 111.111.11 -> L01356 if no carry go to tan19 580 L01366: 111.11..1. a exchange c[wp] 581 L01367: .11.1.1... stack -> a 582 L01370: .....1111. if b[s] = 0 583 L01371: .......111 -> L01001 then go to tan15 584 L01372: .1....111. shift left a[w] 585 L01373: 111.11..1. tan14: a exchange c[wp] 586 L01374: .1..1.1... c -> stack 587 L01375: 1.1..1..1. shift right b[wp] 588 L01376: .1.111111. c - 1 -> c[s] 589 L01377: 1...11111. b exchange c[s] 590 591 .rom @02 592 593 L02000: .....1.... -> L00001 ***** err21: select rom 0 ; -> l00001 594 595 L02001: 11..11111. ln24: a exchange b[s] 596 L02002: 111111111. a + 1 -> a[s] 597 L02003: 1..1.1.11. shift right c[ms] 598 L02004: .1...1..1. shift left a[wp] 599 L02005: ...1..1.11 -> L02022 go to ln26 600 601 L02006: .11.1.1... xty22: stack -> a 602 L02007: 1.1..11..1 -> L02246 jsb mpy21 603 L02010: .11...111. c -> a[w] 604 L02011: 1....1.1.. if s8 = 0 605 L02012: .1....1.11 -> L02102 then go to exp21 606 L02013: 1.111.111. 0 -> a[w] 607 L02014: 11.1...11. a - c -> a[m] 608 L02015: ........11 -> L02000 if no carry go to err21 609 L02016: 1.11..111. shift right a[w] 610 L02017: .1.111111. c - 1 -> c[s] 611 L02020: ........11 -> L02000 if no carry go to err21 612 L02021: .11111111. ln25: c + 1 -> c[s] 613 L02022: .1..1.111. ln26: a -> b[w] 614 L02023: 1..1.11..1 -> L02226 jsb eca22 615 L02024: 11.11...1. a - 1 -> a[p] 616 L02025: ...1...111 -> L02021 if no carry go to ln25 617 L02026: 11..11..1. a exchange b[wp] 618 L02027: 111..1111. a + b -> a[s] 619 L02030: .......111 -> L02001 if no carry go to ln24 620 L02031: .111..11.. 7 -> p 621 L02032: .11.11.1.1 -> L02155 jsb pqo23 622 L02033: 1.....11.. 8 -> p 623 L02034: 1..111.1.1 -> L02235 jsb pmu22 624 L02035: 1..1..11.. 9 -> p 625 L02036: 1..111...1 -> L02234 jsb pmu21 626 L02037: 1111111..1 -> L02376 jsb lncd3 627 L02040: 1.1...11.. 10 -> p 628 L02041: 1..111...1 -> L02234 jsb pmu21 629 L02042: .11111.1.1 -> L02175 jsb lncd2 630 L02043: 1.11..11.. 11 -> p 631 L02044: 1..111...1 -> L02234 jsb pmu21 632 L02045: 11.11111.1 -> L02337 jsb lncd1 633 L02046: 1..111...1 -> L02234 jsb pmu21 634 L02047: 1.111..1.1 -> L02271 jsb lnc2 635 L02050: 1..111...1 -> L02234 jsb pmu21 636 L02051: 1111.11..1 -> L02366 jsb lnc10 637 L02052: 111.1.111. a exchange c[w] 638 L02053: .1.1..111. a - c -> c[w] 639 L02054: .....11.1. if b[xs] = 0 640 L02055: ..1.111111 -> L02057 then go to ln27 641 L02056: .1.1..111. a - c -> c[w] 642 L02057: 11..1.111. ln27: a exchange b[w] 643 L02060: .....111.. ln28: p - 1 -> p 644 L02061: .1....111. shift left a[w] 645 L02062: ...11.11.. if p # 1 646 L02063: ..11....11 -> L02060 then go to ln28 647 L02064: 111.1.111. a exchange c[w] 648 L02065: .11.11111. if c[s] = 0 649 L02066: ..111...11 -> L02070 then go to ln29 650 L02067: ..111..11. 0 - c - 1 -> c[m] 651 L02070: .1111.1.1. ln29: c + 1 -> c[x] 652 L02071: 1.11..11.. 11 -> p 653 L02072: 11...1.1.1 -> L02305 jsb mpy27 654 L02073: 1..1.1.1.. if s9 = 0 655 L02074: .....11.11 -> L02006 then go to xty22 656 L02075: .1.1.1.1.. if s5 = 0 657 L02076: 1..1.1..11 -> L02224 then go to rtn21 658 L02077: 1111.11..1 -> L02366 jsb lnc10 659 L02100: 1.1..111.1 -> L02247 jsb mpy22 660 L02101: 1..1.1..11 -> L02224 go to rtn21 661 662 L02102: 1111.11..1 -> L02366 exp21: jsb lnc10 663 L02103: 111.11...1 -> L02354 jsb pre21 664 L02104: 1.111..1.1 -> L02271 jsb lnc2 665 L02105: 1.11..11.. 11 -> p 666 L02106: 1..11.11.1 -> L02233 jsb pqo21 667 L02107: 11.11111.1 -> L02337 jsb lncd1 668 L02110: 1.1...11.. 10 -> p 669 L02111: 1..11.11.1 -> L02233 jsb pqo21 670 L02112: .11111.1.1 -> L02175 jsb lncd2 671 L02113: 1..1..11.. 9 -> p 672 L02114: 1..11.11.1 -> L02233 jsb pqo21 673 L02115: 1111111..1 -> L02376 jsb lncd3 674 L02116: 1.....11.. 8 -> p 675 L02117: 1..11.11.1 -> L02233 jsb pqo21 676 L02120: 1..11.11.1 -> L02233 jsb pqo21 677 L02121: 1..11.11.1 -> L02233 jsb pqo21 678 L02122: .......... no operation 679 L02123: .......... no operation 680 L02124: 11.1..11.. 13 -> p 681 L02125: 1...1.111. b exchange c[w] 682 L02126: 111.1.111. a exchange c[w] 683 L02127: .11..11... load constant 6 684 L02130: 1...111.11 -> L02216 go to exp23 685 686 L02131: ..1..1.1.. pre23: if s2 = 0 687 L02132: .1.1111.11 -> L02136 then go to pre24 688 L02133: 11111.1.1. a + 1 -> a[x] 689 L02134: 1..1111.1. pre29: if a[xs] >= 1 690 L02135: 11....1.11 -> L02302 then go to pre27 691 L02136: 11...1.11. pre24: a - b -> a[ms] 692 L02137: .1.11..111 -> L02131 if no carry go to pre23 693 L02140: 111..1.11. a + b -> a[ms] 694 L02141: .1....111. shift left a[w] 695 L02142: .1.11.1.1. c - 1 -> c[x] 696 L02143: .1.111..11 -> L02134 if no carry go to pre29 697 L02144: 1.11..111. pre25: shift right a[w] 698 L02145: ..11.1..1. 0 -> c[wp] 699 L02146: 111.1.1.1. a exchange c[x] 700 L02147: .11.11111. pre26: if c[s] = 0 701 L02150: .11.11..11 -> L02154 then go to pre28 702 L02151: 11..1.111. a exchange b[w] 703 L02152: 11....111. a - b -> a[w] 704 L02153: ..111.111. 0 - c - 1 -> c[w] 705 L02154: 1.11..111. pre28: shift right a[w] 706 L02155: 1...1.111. pqo23: b exchange c[w] 707 L02156: ..11..111. 0 -> c[w] 708 L02157: .1.11..11. c - 1 -> c[m] 709 L02160: ..1..1.1.. if s2 = 0 710 L02161: .111.11.11 -> L02166 then go to pqo28 711 L02162: .1...11... load constant 4 712 L02163: .1111..11. c + 1 -> c[m] 713 L02164: .1111..111 -> L02171 if no carry go to pqo24 714 L02165: .11..11... pqo27: load constant 6 715 L02166: ...11.11.. pqo28: if p # 1 716 L02167: .111.1.111 -> L02165 then go to pqo27 717 L02170: 1..1..111. shift right c[w] 718 L02171: 1..1..111. pqo24: shift right c[w] 719 L02172: ..1..1.1.. nrm26: if s2 = 0 720 L02173: 1..1.1..11 -> L02224 then go to rtn21 721 L02174: ....11.... return 722 723 L02175: .111..11.. lncd2: 7 -> p 724 L02176: ..11.11... lnc6: load constant 3 725 L02177: ..11.11... load constant 3 726 L02200: .....11... load constant 0 727 L02201: 1....11... lnc7: load constant 8 728 L02202: .1.1.11... load constant 5 729 L02203: .....11... load constant 0 730 L02204: 1..1.11... load constant 9 731 L02205: 111.1.1.11 -> L02352 go to lnc9 732 733 L02206: 1..1.11..1 -> L02226 exp29: jsb eca22 734 L02207: 11111...1. a + 1 -> a[p] 735 L02210: .1..1.111. exp22: a -> b[w] 736 L02211: .1.111111. c - 1 -> c[s] 737 L02212: 1....11.11 -> L02206 if no carry go to exp29 738 L02213: 1.11.1..1. shift right a[wp] 739 L02214: 111.1.111. a exchange c[w] 740 L02215: .1...1.11. shift left a[ms] 741 L02216: 111.1.111. exp23: a exchange c[w] 742 L02217: 11.111111. a - 1 -> a[s] 743 L02220: 1...1...11 -> L02210 if no carry go to exp22 744 L02221: 11..1.111. a exchange b[w] 745 L02222: 11111...1. a + 1 -> a[p] 746 L02223: 11..11...1 -> L02314 jsb nrm21 747 L02224: ..1..1.... -> L01225 ***** rtn21: select rom 1 ; -> rtn11 748 749 L02225: 1.11.1..1. eca21: shift right a[wp] 750 L02226: 11.111111. eca22: a - 1 -> a[s] 751 L02227: 1..1.1.111 -> L02225 if no carry go to eca21 752 L02230: 1.1111111. 0 -> a[s] 753 L02231: 111...111. a + b -> a[w] 754 L02232: ....11.... return 755 756 L02233: ..1..1.... -> L01234 ***** pqo21: select rom 1 ; -> pqo11 757 758 L02234: 1.11..111. pmu21: shift right a[w] 759 L02235: 1...1.111. pmu22: b exchange c[w] 760 L02236: 1.1.....11 -> L02240 go to pmu24 761 762 L02237: 111...111. pmu23: a + b -> a[w] 763 L02240: .1.111111. pmu24: c - 1 -> c[s] 764 L02241: 1..1111111 -> L02237 if no carry go to pmu23 765 L02242: 111.1.111. a exchange c[w] 766 L02243: .1...1.11. shift left a[ms] 767 L02244: 111.1.111. a exchange c[w] 768 L02245: .11.11.111 -> L02155 go to pqo23 769 770 L02246: ..11..11.. mpy21: 3 -> p 771 L02247: .111..1.1. mpy22: a + c -> c[x] 772 L02250: .1.1.1111. a - c -> c[s] 773 L02251: 1.1.1.1111 -> L02253 if no carry go to div22 774 L02252: ..1.11111. 0 - c -> c[s] 775 L02253: 11..1..11. div22: a exchange b[m] 776 L02254: 1.111.111. 0 -> a[w] 777 L02255: 11..1.11.. if p # 12 778 L02256: 11...1.111 -> L02305 then go to mpy27 779 L02257: ...11..11. if c[m] >= 1 780 L02260: 1.11.11.11 -> L02266 then go to div23 781 L02261: ...1.1.1.. if s1 = 0 782 L02262: ........11 -> L02000 then go to err21 783 L02263: ..1..1..1. b -> c[wp] 784 L02264: 11.11..11. a - 1 -> a[m] 785 L02265: .111111.1. c + 1 -> c[xs] 786 L02266: 1...11..1. div23: b exchange c[wp] 787 L02267: 111.1..11. a exchange c[m] 788 L02270: ..1..1.... -> L01271 ***** select rom 1 ; -> l01271 789 790 L02271: 1...1..1.. lnc2: 0 -> s8 791 L02272: .11..11... load constant 6 792 L02273: 1..1.11... load constant 9 793 L02274: ..11.11... load constant 3 794 L02275: ...1.11... load constant 1 795 L02276: .1...11... load constant 4 796 L02277: .111.11... load constant 7 797 L02300: ...1.11... load constant 1 798 L02301: 111..11.11 -> L02346 go to lnc8 799 800 L02302: 11111..11. pre27: a + 1 -> a[m] 801 L02303: .11..1..11 -> L02144 if no carry go to pre25 802 L02304: 111...111. myp26: a + b -> a[w] 803 L02305: .1.11...1. mpy27: c - 1 -> c[p] 804 L02306: 11...1..11 -> L02304 if no carry go to myp26 805 L02307: 1.11..111. mpy28: shift right a[w] 806 L02310: ....1111.. p + 1 -> p 807 L02311: 11.11.11.. if p # 13 808 L02312: 11...1.111 -> L02305 then go to mpy27 809 L02313: .1111.1.1. c + 1 -> c[x] 810 L02314: 1.1111111. nrm21: 0 -> a[s] 811 L02315: 11....11.. 12 -> p 812 L02316: ....1.111. 0 -> b[w] 813 L02317: 1..11...1. nrm23: if a[p] >= 1 814 L02320: 11.1.11.11 -> L02326 then go to nrm24 815 L02321: .1....111. shift left a[w] 816 L02322: .1.11.1.1. c - 1 -> c[x] 817 L02323: 1..11.111. if a[w] >= 1 818 L02324: 11..111111 -> L02317 then go to nrm23 819 L02325: ..11..111. 0 -> c[w] 820 L02326: .1..1.1.1. nrm24: a -> b[x] 821 L02327: 111...111. a + b -> a[w] 822 L02330: 1..111111. if a[s] >= 1 823 L02331: 11...11111 -> L02307 then go to mpy28 824 L02332: 111.1..11. a exchange c[m] 825 L02333: .11...111. c -> a[w] 826 L02334: ....1.111. 0 -> b[w] 827 L02335: 11....11.. nrm27: 12 -> p 828 L02336: .1111.1.11 -> L02172 go to nrm26 829 830 L02337: 1..1..11.. lncd1: 9 -> p 831 L02340: ..11.11... load constant 3 832 L02341: ...1.11... load constant 1 833 L02342: .....11... load constant 0 834 L02343: ...1.11... load constant 1 835 L02344: .111.11... load constant 7 836 L02345: 1..1.11... load constant 9 837 L02346: 1....11... lnc8: load constant 8 838 L02347: .....11... load constant 0 839 L02350: .1.1.11... load constant 5 840 L02351: .1.1.11... load constant 5 841 L02352: ..11.11... lnc9: load constant 3 842 L02353: 11.111.111 -> L02335 go to nrm27 843 844 L02354: 111.1.111. pre21: a exchange c[w] 845 L02355: .1..1.111. a -> b[w] 846 L02356: .11....11. c -> a[m] 847 L02357: 1.1.111.1. c + c -> c[xs] 848 L02360: .1.1111.11 -> L02136 if no carry go to pre24 849 L02361: .111111.1. c + 1 -> c[xs] 850 L02362: 1.11..111. pre22: shift right a[w] 851 L02363: .1111.1.1. c + 1 -> c[x] 852 L02364: 1111..1.11 -> L02362 if no carry go to pre22 853 L02365: .11..11111 -> L02147 go to pre26 854 855 L02366: ..11..111. lnc10: 0 -> c[w] 856 L02367: 11....11.. 12 -> p 857 L02370: ..1..11... load constant 2 858 L02371: ..11.11... load constant 3 859 L02372: .....11... load constant 0 860 L02373: ..1..11... load constant 2 861 L02374: .1.1.11... load constant 5 862 L02375: 1......111 -> L02201 go to lnc7 863 864 L02376: .1.1..11.. lncd3: 5 -> p 865 L02377: .111111.11 -> L02176 go to lnc6 0 errors, 0 warnings