Submitted by Steve Fewell
Description:
AA1E | 032 030 131 | 20 1E 83 | JSR &831E Calculate next Random Number Seed value | |
AA21 | d. | 100 046 | 64 2E | STZ &2E |
AA23 | d/ | 100 047 | 64 2F | STZ &2F |
AA25 | d5 | 100 053 | 64 35 | STZ &35 |
AA27 | 169 128 | A9 80 | LDA#&80 | |
AA29 | 0 | 133 048 | 85 30 | STA &30 |
AA2B | 160 000 | A0 00 | LDY#&00 | |
AA2D | 162 003 | A2 03 | LDX#&03 | |
AA2F | Y | 089 013 000 | 59 0D 00 | EOR &000D,Y |
AA32 | 1 | 149 049 | 95 31 | STA &31,X |
AA34 | 200 | C8 | INY | |
AA35 | 202 | CA | DEX | |
AA36 | 016 247 | 10 F7 | BPL -9 --> &AA2F | |
AA38 | LT | 076 084 168 | 4C 54 A8 | JMP &A854 Normalise FWA, round FWA Mantissa to 4-bytes & set A=&FF |
AA3B | 230 027 | E6 1B | INC &1B | |
AA3D | 032 167 150 | 20 A7 96 | JSR &96A7 Extract Integer result of expression & check for ')' | |
AA40 | - | 165 045 | A5 2D | LDA &2D |
AA42 | 0% | 048 037 | 30 25 | BMI 37 --> &AA69 Set Random Number Seed value |
AA44 | , | 005 044 | 05 2C | ORA &2C |
AA46 | + | 005 043 | 05 2B | ORA &2B |
AA48 | 208 008 | D0 08 | BNE 8 --> &AA52 | |
AA4A | * | 165 042 | A5 2A | LDA &2A |
AA4C | 240 211 | F0 D3 | BEQ -45 --> &AA21 Get previous Random Floating-Point Number | |
AA4E | 201 001 | C9 01 | CMP#&01 | |
AA50 | 240 204 | F0 CC | BEQ -52 --> &AA1E Get new Random Floating-Point Number | |
AA52 | 032 133 129 | 20 85 81 | JSR &8185 Convert Integer to Float | |
AA55 | 032 250 187 | 20 FA BB | JSR &BBFA Push FWA to Stack | |
AA58 | 032 030 170 | 20 1E AA | JSR &AA1E Get new Random Floating-Point Number | |
AA5B | 032 232 187 | 20 E8 BB | JSR &BBE8 Pop Float from Stack to argp | |
AA5E | 032 207 166 | 20 CF A6 | JSR &A6CF Floating-Point Multiplication (FWA=argp*FWA) | |
AA61 | 032 195 150 | 20 C3 96 | JSR &96C3 Convert Float to Integer | |
AA64 | 032 239 190 | 20 EF BE | JSR &BEEF Increment IWA value | |
AA67 | ' | 128 039 | 80 27 | BRA 39 --> &AA90 Exit with A=&40 |
AA69 | 162 013 | A2 0D | LDX#&0D | |
AA6B | 032 198 189 | 20 C6 BD | JSR &BDC6 Store Integer (IWA) to zero page location | |
AA6E | @ | 169 064 | A9 40 | LDA#&40 |
AA70 | 133 017 | 85 11 | STA &11 | |
AA72 | ` | 096 | 60 | RTS |
AA73 | 164 027 | A4 1B | LDY &1B | |
AA75 | 177 025 | B1 19 | LDA (&19),Y | |
AA77 | ( | 201 040 | C9 28 | CMP#&28 |
AA79 | 240 192 | F0 C0 | BEQ -64 --> &AA3B | |
AA7B | 032 030 131 | 20 1E 83 | JSR &831E Calculate next Random Number Seed value | |
AA7E | 162 013 | A2 0D | LDX#&0D | |
AA80 | ...Load IWA with Integer from Zero Page Address... |