Hi Miguel,
I am really glad to see you using the preprocessor extension to the WP 34S assembler! That is gratifying. Your code is an excellent example of usage of the extension.
A couple of points that will help in certain cases:
1) Most importantly, if you are using this tool (wp34s_pp or the -pp switch in wp34s_asm), it is better to let the tool assign the local label names (eg: LBL 01) and use a symbolic label for the target of your SLV or XEQ statement. (Just as a reminder, and not that you violated this, but the preprocessor cannot handle duplicate local labels [ie: LBL 01]. It is usually (always?!) better to let the tool choose local labels to use itself.)
2) For ease of input you can recode most of the text strings by using double quotes. The tool will parse it and figure out the most efficient coding required. Several things, like spaces, are automatically recoded as the '[space]' equivalent. In some cases, the double quote technique will produce fewer steps than you would have gotten otherwise. Regardless of whether the output steps are identical or not, it is certainly easier to code the strings using double quotes.
3) You have a few cases where your use stretched to the tool to places it was not intended to go :-) In at least one case, you made use of a GTO with a 'soft' label (step 16 of 'CFE', for example) where it had been my intention that this technique designed for use with the pseudo JMP instruction. In a way I am glad that the GTO actually worked in this case but I don't think it was never tested (at least not extensively)! In this example, if you had used a JMP instead GTO, the tool would have decided that this could have been coded with a SKIP instruction. These JMP->SKIP promotions will save a few steps here and there because the tool would not be forced to inject a LBL for the soft-targetted GTO.
I have attached a 'diff' output between your code and a slightly modified version to show you what I mean. The first line of each diff pair is the original line(s) from your code and the second line(s) are how I modified it. I can send you the modified code as a whole if you'd like. Just let me know.
Not that the resulting compression make too much difference, but your code assembled to 317 words in total (228 steps) and my variation assembled to 314 words (again, in 228 steps). This is mostly the loss of the additional LBLs (I think).
Keep up the fine work!
280c280
< [alpha]'CF'
---
> "CF"
282,283c282
< [alpha] [^]
< [alpha] n
---
> "[^]n"
287c286
< GTO endloop
---
> JMP endloop
311,312c310
< [alpha]'CF'
< [alpha] =
---
> "CF="
346c344
< [alpha]'CF'
---
> "CF"
348c346
< [alpha] =
---
> "="
396c394
< XEQ 00
---
> XEQ calcNPV_IRR
399,400c397
< [alpha]'NPV'
< [alpha] =
---
> "NPV="
435c432
< SLV 00
---
> SLV calcNPV_IRR
447,448c444
< [alpha]'IRR'
< [alpha] =
---
> "IRR="
454,455c450
< LBL 00 // Calculates NPV and solves for IRR
< 1
---
> calcNPV_IRR:: 1 // Calculates NPV and solves for IRR
468c463
< GTO intzero
---
> JMP intzero
527,528c522
< [alpha]'Cap'
< [alpha] ?
---
> "Cap?"
533,534c527
< [alpha]'Pmt'
< [alpha] ?
---
> "Pmt?"
539,540c532
< [alpha]'Tpr'
< [alpha]'ds?'
---
> "Tprds?"
548,549c540
< [alpha]'I/P'
< [alpha]'%?'
---
> "I/P%?"
588,589c579
< [alpha]'Prd'
< [alpha]'-I?'
---
> "Prd-I?"
595,596c585
< [alpha]'Prd'
< [alpha]'-F?'
---
> "Prd-F?"
611c600
< [alpha]'Pri'
---
> "Pri"
616c605
< [alpha]'Int'
---
> "Int"
621c610
< [alpha]'Bal'
---
> "Bal"
701,702c690
< [alpha]'P-Y'
< [alpha] ?
---
> "P-Y?"
733c721
< XEQ 01
---
> XEQ calcEFF_NOM
739,740c727
< LBL 01 // Calculates EFF and solves for NOM
< RCL D
---
> calcEFF_NOM:: RCL D // Calculates EFF and solves for NOM