Manz Simulator Format
Tentative SOLVE mapping:
--from hp15c/dm32: Read the program in as found even though this means the R47 form won’t actually run as such. Until we have that in memory and start working on the output, we don’t know what mappings to do.For HP-15C inputs, keep the guess range given in X and Y for round-tripping. It’s useless to the DM32 and R47, but also probably harmless.
--to SAME: Program emits 1:1 for lossless round-tripping.--from hp15c --to p47[u]: Scan input forSOLVEops with the arg coded as one of the 25 allowed HP-15CLBLvalues, then for each one found:- find the referenced
LBL - inject an
MVARdefinition immediately after - change all uses of register X until RTN to that variable
Make the name up using a pattern like
RJMV1to refer to the firstrejiginventedMVAR.The
SOLVEcall itself needs to be changed to aPGMSLVtaking the sameLBLso that on encountering it, the calculator pops up theMVARlist. (SOLVEis meant more for interactive use on the R47.)- find the referenced
--from dm32 --to p47[u]: Scan input forSOLVEops, which take as an argument the single-lettered variable to solve for. Replace all followingINPUTstatements untilRTNwithMVARones with the same variable name.--from p47[u] --to dm32: RevertMVARtoINPUT.--from p47[u] --to hp15c: Tentatively drop the firstMVARorINPUTafter aLBLand replace each subsequent reference to it untilRTNwith a reference to register X instead. If there is more than oneMVARorINPUT, abort on the grounds that the HP-15C doesn’t allow solving for any variable in the program.
If that works, then the same principle can work for integration.
Wider Format Support
WP43
*.p43formatAdd output formats that can graphically realize the lightweight TeX notation in OpInfo.Name strings, such as the "_" subscripts.
- HTML with…
- old-school inline markup (e.g.
<i>e<sup>x</sup></i>for the exponential function) - MathJax (pull JS from CDN and use its formatting to produce inline MathML)
- literal inline MathML (no-JS alternative)
- old-school inline markup (e.g.
- MD + AsciiMath for Fossil
- RTF: replicate the C47 XPORTP format referencing the custom font
- HTML with…
Misc Ideas
Add
--comma-radixoption.Map system flag values from numeric form into the closest R47 equivalent, then back out on lowering. Check that 15C-to-32S works, etc. Keep unmappable flags as numbers for round-tripping.