Submitted by Steve Fewell
Routine:numasc
Name: NUMASC (Numeric value to ASCII String conversion)
Starting Address: &A118
Entry criteria: Either the IWA or the FWA contains the numeric value
to convert into ASCII (for printing to the screen, etc...).
&15 is negative if the value should be converted to ASCII with a Hexadecimal
representation of the value.
Y is negative if the value is a Floating-Point value (stored in the FWA), or positive
if the value is an Integer value (stored in the IWA).
Exit: The SWA contains the ASCII result.
Description:
A118 - A137: validate the format & number of digits to print
The format that the number will be converted to and the number of digits to print
is specified by variable @%. This variable consists of 4 bytes with the following meanings:
Byte 4: Conains a non-zero value if STR$ function should use @% Number conversion format (default value 0).
Example 2:
Value = 28.96301767 (FWA Exponent is &85, FWA Mantissa is &E7B4429C00)
Output format = 1 (Exponential format).
The NUMASC routine will process this value as follows:
[&A10B] The FWA exponent is > &83, so divide the FWA by 10 and increment the decimal exponent.
Now, FWA = 2.896301767 (Exponent &82, Mantissa &B95D021666). &48 = 1.
[&A16F] ?&38 = ?&4D (9).
Output format is not 2 so goto &A190.
Decimals (?&38) is 9, so the roundup value is 0.000000005.
Add roundup value to numeric value = 2.896301772 (Exponent = &82, Mantissa = &B95D021BC4).
FWA Exponent is < &84, so divide FWA by 2 & increment exponent; FWA now = 2.896301772 (Exp: &83, Mantissa: &5CAE810DE2)
FWA Exponent is < &84, so divide FWA by 2 & increment exponent; FWA now = 2.896301772 (Exp: &84, Mantissa: &2E574086F1)
[&A1C6] FWA Mantissa byte 1 is less than #&A0, so okay, continue to &A1DE.
[&A1DE] Format is scientific so jump to &A215
[&A215] Set ?&4D to decimal point position (A) = position 1 in the output string (as we are outputting in
exponential format).
[&A217] Call &A26C (output top digit "2", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&8F6885456A)
Decrement &4D to 0; &4D is zero, so [&A21E] Add "." to the output string.
Decrement &38 to 8; (no decrement for the "." as it isn't a significant digit!). Jump to &A217 as &38 not zero.
[&A217] Call &A26C (output top digit "8", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&9A1534B624)
Decrement &4D to &FF; &4D is not zero, so [&A223] Decrement &38 to 7; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "9", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&64D40F1D68)
Decrement &4D to &FE; &4D is not zero, so [&A223] Decrement &38 to 6; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "6", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&3048972610)
Decrement &4D to &FD; &4D is not zero, so [&A223] Decrement &38 to 5; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "3", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&02D5E77CA0)
Decrement &4D to &FC; &4D is not zero, so [&A223] Decrement &38 to 4; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&1C5B0ADE40)
Decrement &4D to &FB; &4D is not zero, so [&A223] Decrement &38 to 3; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "1", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&7B8E6CAE80)
Decrement &4D to &FA; &4D is not zero, so [&A223] Decrement &38 to 2; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "7", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&73903ED100)
Decrement &4D to &F9; &4D is not zero, so [&A223] Decrement &38 to 1; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "7", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&23A2742A00)
Decrement &4D to &F8; &4D is not zero, so [&A223] Decrement &38 to 0; &38 is now zero so goto &A244.
[&A244] Now the output string is contained in SWA locations &600-&609, which contain the value "2.89630177".
The output format is exponential, so add "E" to the output string (for the exponent).
The Exponent value (&48) is positive (1), so no minus sign required.
Call &A2BC to add the exponent to the output string - "1" is added.
The exponent was not negative, so add a space to the end of the output string.
The exponent was only 1-digit long, so add a space to the end of the output string.
The SWA output string value is now: "2.89630177E1 " so exit as complete.
Example 3:
Value = 3.1417321E-5 (FWA Exponent is &72, FWA Mantissa is &8F55347000)
Output format = 2 (Fixed-Point format).
The NUMASC routine will process this value as follows:
[&A10B] The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 0.0003417321 (Exponent &75, Mantissa &B32A818C). &48 = &FF.
The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 0.003417321 (Exponent &78, Mantissa &EFF521EF). &48 = &FE.
The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 0.03417321 (Exponent &7C, Mantissa &8BF93536). &48 = &FD.
The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 0.3417321 (Exponent &7F, Mantissa &AEF78283). &48 = &FC.
The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 3.417321 (Exponent &82, Mantissa &DAB5632366). &48 = &FB.
[&A16F] ?&38 = ?&4D (9).
Output format is 2 (fixed) so do the following:
Add &48 (decimal exponent) to &38 (decimals to output) = &FB + 9 + 1 (carry) = &05.
The result (&05) is < #&0B, so Set &38 (digits to output) to 5 (the result), zero the exponent (&48),
and goto &A190.
[&A190] Decimals is 9, so the roundup value is 0.000000005.
Add roundup value to numeric value = 3.417321005 (Exponent = &82, Mantissa = &DAB56328C4).
FWA Exponent is < &84, so divide FWA by 2 & increment exponent; FWA now = 3.417321005 (Exp: &83, Mantissa: &6D5AB19462)
FWA Exponent is < &84, so divide FWA by 2 & increment exponent; FWA now = 3.417321005 (Exp: &84, Mantissa: &36AD58CA31)
[&A1C6] FWA Mantissa byte 1 is less than #&A0, so okay, continue to &A1E4.
[&A1DE] The exponent is negative and format is 2 (Fixed), so goto &A1FE.
[&A1FE] Add "0." to the output string (SWA).
Increment the Exponent value (&48), and keep adding "0" to the output string until &48 is 0.
Now the output string is "0.0000".
[&A213] Set ?&4D to &80 (as we do not need to print a decimal point now).
[&A217] Call &A26C (output top digit "3", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&42C577E5EA)
Decrement &4D to &7F; &4D is not zero, so [&A223] Decrement &38 to 4; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "4", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&1BB6AEFB24)
Decrement &4D to &7E; &4D is not zero, so [&A223] Decrement &38 to 3; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "1", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&7522D5CF68)
Decrement &4D to &7D; &4D is not zero, so [&A223] Decrement &38 to 2; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "7", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&335C5A1A10)
Decrement &4D to &7C; &4D is not zero, so [&A223] Decrement &38 to 1; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "3", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&219B8504A0)
Decrement &4D to &7B; &4D is not zero, so [&A223] Decrement &38 to 0; &38 is now zero so goto &A240.
[&A240] The exponent (&48) is zero so exit with SWA = "0.000034173".
Example 4:
value = 8.92381E-10 (FWA Exponent is &62, FWA Mantissa is &F54BBAF5)
Output format = 0 (General format).
The NUMASC routine will process this value as follows:
[&A10B] While the FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 8.92381 (Exponent &84, Mantissa &8EC7ECFEB7). &48 = &F6 (-10).
[&A16F] ?&38 = ?&4D (9).
Output format is not 2 so goto &A190.
Decimals (?&38) is 9, so the roundup value is 0.000000005.
Add roundup value to numeric value = 8.923810005 (Exponent = &84, Mantissa = &8EC7ED000E).
[&A1C6] FWA Mantissa byte 1 is less than #&A0, so okay, continue to &A1E4.
[&A1E4] The Exponent is negative, so [&A1F4] check whether the exponent is = #&FF
as a single zero before the first non-zero digit after the decimal point is the threshold for the
general output format. Our value does not meet this threshold, so store 1 in &4D (output in Exponential format).
[&A217] Call &A26C (output top digit "8", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&93CF42008C)
Decrement &4D to 0; &4D is zero, so [&A21E] Add "." to the output string.
Decrement &38 to 8; (no decrement for the "." as it isn't a significant digit!). Jump to &A217 as &38 not zero.
[&A217] Call &A26C (output top digit "9", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&2618940578)
Decrement &4D to &FF; &4D is not zero, so [&A223] Decrement &38 to 7; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "2", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&3CF5C836B0)
Decrement &4D to &FE; &4D is not zero, so [&A223] Decrement &38 to 6; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "3", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&8199D222E0)
Decrement &4D to &FD; &4D is not zero, so [&A223] Decrement &38 to 5; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "8", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&1002355CC0)
Decrement &4D to &FC; &4D is not zero, so [&A223] Decrement &38 to 4; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "1", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&0016159F80)
Decrement &4D to &FB; &4D is not zero, so [&A223] Decrement &38 to 3; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&00DCD83B00)
Decrement &4D to &FA; &4D is not zero, so [&A223] Decrement &38 to 2; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&08A0724E00)
Decrement &4D to &F9; &4D is not zero, so [&A223] Decrement &38 to 1; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&5644770C00)
Decrement &4D to &F8; &4D is not zero, so [&A223] Decrement &38 to 0; &38 is now zero so goto &A244.
[&A244] Now the output string is contained in SWA locations &600-&609, which contain the value "8.92381000".
The output format is exponential, so add "E" to the output string (for the exponent).
The Exponent value (&48) is negative (-10), so add a minus sign ("-") to the output string.
Call &A2BC to add the exponent to the output string - "10" is added.
The exponent is subtracted from 0 in order to obtain its positive value.
The SWA output string value is now: "8.92381000E-10" so exit as complete.
Example 5:
Value = 0.8 (FWA Exponent is &80, FWA Mantissa is &CCCCCCCD00)
Output format = 2 (Fixed-Point format).
The NUMASC routine will process this value as follows:
[&A10B] The FWA exponent is < &81, so multiply the FWA by 10 and increment the decimal exponent.
Now, FWA = 8.0 (Exponent &84, Mantissa &8000000020). &48 = &FF.
[&A16F] ?&38 = ?&4D (9).
Output format is 2 (fixed) so do the following:
Add &48 (decimal exponent) to &38 (decimals to output) = &FF + 9 + 1 (carry) = &09.
The result (&09) is < #&0B, so Set &38 (digits to output) to 9 (the result), zero the exponent (&48),
and goto &A190.
[&A190] Decimals is 9, so the roundup value is 0.000000005.
Add roundup value to numeric value = 8.000000005 (Exponent = &84, Mantissa = &8000000177).
[&A1C6] FWA Mantissa byte 1 is less than #&A0, so okay, continue to &A1E4.
[&A1E4] The exponent is negative and format is 2 (Fixed), so goto &A1FE.
[&A1FE] Add "0." to the output string (SWA).
Increment the Exponent value (&48), the exponent value is now 0, so there are no further "0"'s to add after the
decimal point. Now the output string is "0.".
[&A213] Set ?&4D to &80 (as we do not need to print a decimal point now).
[&A217] Call &A26C (output top digit "8", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&0000000EA6)
Decrement &4D to &7F; &4D is not zero, so [&A223] Decrement &38 to 8; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&000000927C)
Decrement &4D to &7E; &4D is not zero, so [&A223] Decrement &38 to 7; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&000005B8D8)
Decrement &4D to &7D; &4D is not zero, so [&A223] Decrement &38 to 6; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&0000393870)
Decrement &4D to &7C; &4D is not zero, so [&A223] Decrement &38 to 5; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&00023C3460)
Decrement &4D to &7B; &4D is not zero, so [&A223] Decrement &38 to 4; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&00165A0BC0)
Decrement &4D to &7A; &4D is not zero, so [&A223] Decrement &38 to 3; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&00DF847580)
Decrement &4D to &79; &4D is not zero, so [&A223] Decrement &38 to 2; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&08BB2C9700)
Decrement &4D to &78; &4D is not zero, so [&A223] Decrement &38 to 1; &38 isn't zero so goto &A217.
[&A217] Call &A26C (output top digit "0", & multiply FWA mantissa by 10; now FWA=(Exp=&84, Mantissa=&574FBDE600)
Decrement &4D to &77; &4D is not zero, so [&A223] Decrement &38 to 0; &38 is now zero so goto &A240.
[&A240] The exponent (&48) is zero so exit with SWA = "0.800000000". Note: In Fixed-Point format the trailing
zeros are not stripped.
A0CA | 152 | 98 | TYA | |
A0CB | 016 003 | 10 03 | BPL 3 --> &A0D0 | |
A0CD | 032 195 150 | 20 C3 96 | JSR &96C3 Convert Float to Integer | |
A0D0 | 162 000 | A2 00 | LDX#&00 | |
A0D2 | 160 000 | A0 00 | LDY#&00 | |
A0D4 | * | 185 042 000 | B9 2A 00 | LDA &002A,Y |
A0D7 | H | 072 | 48 | PHA |
A0D8 | ) | 041 015 | 29 0F | AND#&0F |
A0DA | ? | 149 063 | 95 3F | STA &3F,X |
A0DC | h | 104 | 68 | PLA |
A0DD | J | 074 | 4A | LSR A |
A0DE | J | 074 | 4A | LSR A |
A0DF | J | 074 | 4A | LSR A |
A0E0 | J | 074 | 4A | LSR A |
A0E1 | 232 | E8 | INX | |
A0E2 | ? | 149 063 | 95 3F | STA &3F,X |
A0E4 | 232 | E8 | INX | |
A0E5 | 200 | C8 | INY | |
A0E6 | 192 004 | C0 04 | CPY#&04 | |
A0E8 | 208 234 | D0 EA | BNE -22 --> &A0D4 | |
A0EA | 202 | CA | DEX | |
A0EB | 240 004 | F0 04 | BEQ 4 --> &A0F1 | |
A0ED | ? | 181 063 | B5 3F | LDA &3F,X |
A0EF | 240 249 | F0 F9 | BEQ -7 --> &A0EA | |
A0F1 | ? | 181 063 | B5 3F | LDA &3F,X |
A0F3 | 201 010 | C9 0A | CMP#&0A | |
A0F5 | 144 002 | 90 02 | BCC 2 --> &A0F9 | |
A0F7 | i | 105 006 | 69 06 | ADC#&06 |
A0F9 | i0 | 105 048 | 69 30 | ADC#&30 |
A0FB | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A0FE | 202 | CA | DEX | |
A0FF | 016 240 | 10 F0 | BPL -16 --> &A0F1 | |
A101 | ` | 096 | 60 | RTS |
A102 | 016 007 | 10 07 | BPL 7 --> &A10B | |
A104 | - | 169 045 | A9 2D | LDA#&2D |
A106 | d. | 100 046 | 64 2E | STZ &2E |
A108 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A10B | 0 | 165 048 | A5 30 | LDA &30 |
A10D | 201 129 | C9 81 | CMP#&81 | |
A10F | K | 176 075 | B0 4B | BCS 75 --> &A15C |
A111 | 6 | 032 054 164 | 20 36 A4 | JSR &A436 Floating-point multiply by 10 [FWA=FWA*10] |
A114 | H | 198 072 | C6 48 | DEC &48 |
A116 | 128 243 | 80 F3 | BRA -13 --> &A10B |
A118 | 174 002 004 | AE 02 04 | LDX &0402 | |
A11B | 224 003 | E0 03 | CPX#&03 | |
A11D | 144 002 | 90 02 | BCC 2 --> &A121 | |
A11F | 162 000 | A2 00 | LDX#&00 | |
A121 | 7 | 134 055 | 86 37 | STX &37 |
A123 | 173 001 004 | AD 01 04 | LDA &0401 | |
A126 | 240 006 | F0 06 | BEQ 6 --> &A12E | |
A128 | 201 010 | C9 0A | CMP#&0A | |
A12A | 176 006 | B0 06 | BCS 6 --> &A132 | |
A12C | 128 006 | 80 06 | BRA 6 --> &A134 | |
A12E | 224 002 | E0 02 | CPX#&02 | |
A130 | 240 002 | F0 02 | BEQ 2 --> &A134 | |
A132 | 169 010 | A9 0A | LDA#&0A | |
A134 | 8 | 133 056 | 85 38 | STA &38 |
A136 | M | 133 077 | 85 4D | STA &4D |
A138 | d6 | 100 054 | 64 36 | STZ &36 |
A13A | dH | 100 072 | 64 48 | STZ &48 |
A13C | $ | 036 021 | 24 15 | BIT &15 |
A13E | 0 | 048 138 | 30 8A | BMI -118 --> &A0CA |
A140 | 152 | 98 | TYA | |
A141 | 0 | 048 003 | 30 03 | BMI 3 --> &A146 |
A143 | 032 133 129 | 20 85 81 | JSR &8185 Convert Integer to Float | |
A146 | 032 242 163 | 20 F2 A3 | JSR &A3F2 Obtain Sign of the FWA Floating-Point value | |
A149 | 208 183 | D0 B7 | BNE -73 --> &A102 | |
A14B | 7 | 165 055 | A5 37 | LDA &37 |
A14D | 208 005 | D0 05 | BNE 5 --> &A154 | |
A14F | 0 | 169 048 | A9 30 | LDA#&30 |
A151 | L | 076 208 162 | 4C D0 A2 | JMP &A2D0 Add ASCII character to existing output string (SWA) |
A154 | L | 076 208 161 | 4C D0 A1 | JMP &A1D0 |
A157 | 032 216 165 | 20 D8 A5 | JSR &A5D8 Set FWA to 1.0 | |
A15A | 128 015 | 80 0F | BRA 15 --> &A16B | |
A15C | 201 132 | C9 84 | CMP#&84 | |
A15E | 144 015 | 90 0F | BCC 15 --> &A16F | |
A160 | 208 006 | D0 06 | BNE 6 --> &A168 | |
A162 | 1 | 165 049 | A5 31 | LDA &31 |
A164 | 201 160 | C9 A0 | CMP#&A0 | |
A166 | 144 007 | 90 07 | BCC 7 --> &A16F | |
A168 | x | 032 120 164 | 20 78 A4 | JSR &A478 Divide Floating-Point value by 10 [FWA=FWA/10] |
A16B | H | 230 072 | E6 48 | INC &48 |
A16D | 128 156 | 80 9C | BRA -100 --> &A10B |
A16F | 5 | 165 053 | A5 35 | LDA &35 |
A171 | ' | 133 039 | 85 27 | STA &27 |
A173 | 032 017 165 | 20 11 A5 | JSR &A511 Store FWA to &046C & set argp=&046C | |
A176 | M | 165 077 | A5 4D | LDA &4D |
A178 | 8 | 133 056 | 85 38 | STA &38 |
A17A | 7 | 166 055 | A6 37 | LDX &37 |
A17C | 224 002 | E0 02 | CPX#&02 | |
A17E | 208 016 | D0 10 | BNE 16 --> &A190 | |
A180 | eH | 101 072 | 65 48 | ADC &48 |
A182 | 0P | 048 080 | 30 50 | BMI 80 --> &A1D4 |
A184 | 8 | 133 056 | 85 38 | STA &38 |
A186 | 201 011 | C9 0B | CMP#&0B | |
A188 | 144 006 | 90 06 | BCC 6 --> &A190 | |
A18A | 169 010 | A9 0A | LDA#&0A | |
A18C | 8 | 133 056 | 85 38 | STA &38 |
A18E | d7 | 100 055 | 64 37 | STZ &37 |
A190 | 032 184 166 | 20 B8 A6 | JSR &A6B8 Clear FWA (except Exp/Mantissa1) | |
A193 | 169 160 | A9 A0 | LDA#&A0 | |
A195 | 1 | 133 049 | 85 31 | STA &31 |
A197 | 169 131 | A9 83 | LDA#&83 | |
A199 | 0 | 133 048 | 85 30 | STA &30 |
A19B | 8 | 166 056 | A6 38 | LDX &38 |
A19D | 240 006 | F0 06 | BEQ 6 --> &A1A5 | |
A19F | x | 032 120 164 | 20 78 A4 | JSR &A478 Divide Floating-Point value by 10 [FWA=FWA/10] |
A1A2 | 202 | CA | DEX | |
A1A3 | 208 250 | D0 FA | BNE -6 --> &A19F | |
A1A5 | 032 146 165 | 20 92 A5 | JSR &A592 Set argp to &046C | |
A1A8 | 032 224 164 | 20 E0 A4 | JSR &A4E0 Unpack (&4A, &4B) variable to FWB | |
A1AB | ' | 165 039 | A5 27 | LDA &27 |
A1AD | A | 133 065 | 85 41 | STA &41 |
A1AF | h | 032 104 131 | 20 68 83 | JSR &8368 Floating-Point Addition |
A1B2 | 0 | 165 048 | A5 30 | LDA &30 |
A1B4 | 201 132 | C9 84 | CMP#&84 | |
A1B6 | 176 014 | B0 0E | BCS 14 --> &A1C6 | |
A1B8 | f1 | 102 049 | 66 31 | ROR &31 |
A1BA | f2 | 102 050 | 66 32 | ROR &32 |
A1BC | f3 | 102 051 | 66 33 | ROR &33 |
A1BE | f4 | 102 052 | 66 34 | ROR &34 |
A1C0 | f5 | 102 053 | 66 35 | ROR &35 |
A1C2 | 0 | 230 048 | E6 30 | INC &30 |
A1C4 | 208 236 | D0 EC | BNE -20 --> &A1B2 | |
A1C6 | 1 | 165 049 | A5 31 | LDA &31 |
A1C8 | 201 160 | C9 A0 | CMP#&A0 | |
A1CA | 176 139 | B0 8B | BCS -117 --> &A157 | |
A1CC | 8 | 165 056 | A5 38 | LDA &38 |
A1CE | 208 014 | D0 0E | BNE 14 --> &A1DE |
A1D0 | 201 001 | C9 01 | CMP#&01 | ||
A1D2 | A | 240 065 | F0 41 | BEQ 65 --> &A215 | |
A1D4 | 032 180 166 | 20 B4 A6 | JSR &A6B4 | JSR &A6B4 Clear FWA | |
A1D7 | dH | 100 072 | 64 48 | STZ &48 | |
A1D9 | M | 165 077 | A5 4D | LDA &4D | |
A1DB | 026 | 1A | INC A | ||
A1DC | 8 | 133 056 | 85 38 | STA &38 |
A1DE | 169 001 | A9 01 | LDA#&01 | |
A1E0 | 7 | 197 055 | C5 37 | CMP &37 |
A1E2 | 1 | 240 049 | F0 31 | BEQ 49 --> &A215 |
A1E4 | H | 164 072 | A4 48 | LDY &48 |
A1E6 | 0 | 048 010 | 30 0A | BMI 10 --> &A1F2 |
A1E8 | 8 | 196 056 | C4 38 | CPY &38 |
A1EA | ) | 176 041 | B0 29 | BCS 41 --> &A215 |
A1EC | dH | 100 072 | 64 48 | STZ &48 |
A1EE | 200 | C8 | INY | |
A1EF | 152 | 98 | TYA | |
A1F0 | # | 208 035 | D0 23 | BNE 35 --> &A215 |
A1F2 | 7 | 165 055 | A5 37 | LDA &37 |
A1F4 | 201 002 | C9 02 | CMP#&02 | |
A1F6 | 240 006 | F0 06 | BEQ 6 --> &A1FE | |
A1F8 | 169 001 | A9 01 | LDA#&01 | |
A1FA | 192 255 | C0 FF | CPY#&FF | |
A1FC | 208 023 | D0 17 | BNE 23 --> &A215 | |
A1FE | 0 | 169 048 | A9 30 | LDA#&30 |
A200 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A203 | . | 169 046 | A9 2E | LDA#&2E |
A205 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A208 | 0 | 169 048 | A9 30 | LDA#&30 |
A20A | H | 230 072 | E6 48 | INC &48 |
A20C | 240 005 | F0 05 | BEQ 5 --> &A213 | |
A20E | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A211 | 128 247 | 80 F7 | BRA -9 --> &A20A | |
A213 | 169 128 | A9 80 | LDA#&80 | |
A215 | M | 133 077 | 85 4D | STA &4D |
A217 | l | 032 108 162 | 20 6C A2 | JSR &A26C |
A21A | M | 198 077 | C6 4D | DEC &4D |
A21C | 208 005 | D0 05 | BNE 5 --> &A223 | |
A21E | . | 169 046 | A9 2E | LDA#&2E |
A220 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A223 | 8 | 198 056 | C6 38 | DEC &38 |
A225 | 208 240 | D0 F0 | BNE -16 --> &A217 | |
A227 | 7 | 164 055 | A4 37 | LDY &37 |
A229 | 136 | 88 | DEY | |
A22A | 240 024 | F0 18 | BEQ 24 --> &A244 | |
A22C | 136 | 88 | DEY | |
A22D | 240 017 | F0 11 | BEQ 17 --> &A240 | |
A22F | 6 | 164 054 | A4 36 | LDY &36 |
A231 | 136 | 88 | DEY | |
A232 | 185 000 006 | B9 00 06 | LDA &0600,Y | |
A235 | 0 | 201 048 | C9 30 | CMP#&30 |
A237 | 240 248 | F0 F8 | BEQ -8 --> &A231 | |
A239 | . | 201 046 | C9 2E | CMP#&2E |
A23B | 240 001 | F0 01 | BEQ 1 --> &A23E | |
A23D | 200 | C8 | INY | |
A23E | 6 | 132 054 | 84 36 | STY &36 |
A240 | H | 165 072 | A5 48 | LDA &48 |
A242 | ' | 240 039 | F0 27 | BEQ 39 --> &A26B |
A244 | E | 169 069 | A9 45 | LDA#&45 |
A246 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A249 | H | 165 072 | A5 48 | LDA &48 |
A24B | 016 010 | 10 0A | BPL 10 --> &A257 | |
A24D | - | 169 045 | A9 2D | LDA#&2D |
A24F | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A252 | 8 | 056 | 38 | SEC |
A253 | 169 000 | A9 00 | LDA#&00 | |
A255 | H | 229 072 | E5 48 | SBC &48 |
A257 | 032 188 162 | 20 BC A2 | JSR &A2BC Add exponent to the output string | |
A25A | 7 | 165 055 | A5 37 | LDA &37 |
A25C | 240 013 | F0 0D | BEQ 13 --> &A26B | |
A25E | 169 032 | A9 20 | LDA#&20 | |
A260 | H | 164 072 | A4 48 | LDY &48 |
A262 | 0 | 048 003 | 30 03 | BMI 3 --> &A267 |
A264 | 032 208 162 | 20 D0 A2 | JSR &A2D0 Add ASCII character to existing output string (SWA) | |
A267 | 224 000 | E0 00 | CPX#&00 | |
A269 | e | 240 101 | F0 65 | BEQ 101 --> &A2D0 Add ASCII character to existing output string (SWA) |
A26B | ` | 096 | 60 | RTS |
A26C | 1 | 165 049 | A5 31 | LDA &31 |
A26E | J | 074 | 4A | LSR A |
A26F | J | 074 | 4A | LSR A |
A270 | J | 074 | 4A | LSR A |
A271 | J | 074 | 4A | LSR A |
A272 | 032 206 162 | 20 CE A2 | JSR &A2CE | |
A275 | 169 240 | A9 F0 | LDA#&F0 | |
A277 | 1 | 020 049 | 14 31 | TRB &31 |
A279 | H | 072 | 48 | PHA |
A27A | 4 | 166 052 | A6 34 | LDX &34 |
A27C | 1 | 165 049 | A5 31 | LDA &31 |
A27E | H | 072 | 48 | PHA |
A27F | 2 | 165 050 | A5 32 | LDA &32 |
A281 | H | 072 | 48 | PHA |
A282 | 3 | 165 051 | A5 33 | LDA &33 |
A284 | H | 072 | 48 | PHA |
A285 | 5 | 165 053 | A5 35 | LDA &35 |
A287 | 010 | 0A | ASL A | |
A288 | &4 | 038 052 | 26 34 | ROL &34 |
A28A | &3 | 038 051 | 26 33 | ROL &33 |
A28C | &2 | 038 050 | 26 32 | ROL &32 |
A28E | &1 | 038 049 | 26 31 | ROL &31 |
A290 | 010 | 0A | ASL A | |
A291 | &4 | 038 052 | 26 34 | ROL &34 |
A293 | &3 | 038 051 | 26 33 | ROL &33 |
A295 | &2 | 038 050 | 26 32 | ROL &32 |
A297 | &1 | 038 049 | 26 31 | ROL &31 |
A299 | e5 | 101 053 | 65 35 | ADC &35 |
A29B | 5 | 133 053 | 85 35 | STA &35 |
A29D | 138 | 8A | TXA | |
A29E | e4 | 101 052 | 65 34 | ADC &34 |
A2A0 | 4 | 133 052 | 85 34 | STA &34 |
A2A2 | h | 104 | 68 | PLA |
A2A3 | e3 | 101 051 | 65 33 | ADC &33 |
A2A5 | 3 | 133 051 | 85 33 | STA &33 |
A2A7 | h | 104 | 68 | PLA |
A2A8 | e2 | 101 050 | 65 32 | ADC &32 |
A2AA | 2 | 133 050 | 85 32 | STA &32 |
A2AC | h | 104 | 68 | PLA |
A2AD | e1 | 101 049 | 65 31 | ADC &31 |
A2AF | 5 | 006 053 | 06 35 | ASL &35 |
A2B1 | &4 | 038 052 | 26 34 | ROL &34 |
A2B3 | &3 | 038 051 | 26 33 | ROL &33 |
A2B5 | &2 | 038 050 | 26 32 | ROL &32 |
A2B7 | * | 042 | 2A | ROL A |
A2B8 | 1 | 133 049 | 85 31 | STA &31 |
A2BA | h | 104 | 68 | PLA |
A2BB | ` | 096 | 60 | RTS |
A2BC | 162 255 | A2 FF | LDX#&FF | |
A2BE | 8 | 056 | 38 | SEC |
A2BF | 232 | E8 | INX | |
A2C0 | 233 010 | E9 0A | SBC#&0A | |
A2C2 | 176 251 | B0 FB | BCS -5 --> &A2BF | |
A2C4 | i | 105 010 | 69 0A | ADC#&0A |
A2C6 | H | 072 | 48 | PHA |
A2C7 | 138 | 8A | TXA | |
A2C8 | 240 003 | F0 03 | BEQ 3 --> &A2CD | |
A2CA | 032 206 162 | 20 CE A2 | JSR &A2CE | |
A2CD | h | 104 | 68 | PLA |
A2CE | 0 | 009 048 | 09 30 | ORA#&30 |
A2D0 | 218 | DA | PHX | |
A2D1 | 6 | 166 054 | A6 36 | LDX &36 |
A2D3 | 157 000 006 | 9D 00 06 | STA &0600,X | |
A2D6 | 250 | FA | PLX | |
A2D7 | 6 | 230 054 | E6 36 | INC &36 |
A2D9 | ` | 096 | 60 | RTS |