02-03-2013, 02:41 PM
Here's an alternative version of MIO that uses local registers. The main advantage is that it doesn't depend on the matrix descriptor being preserved in register L, so that the values of the matrix elements can be calculated without causing the program to fail.
001 LBL'MIO'
002 LBL A
003 LocR 002
004 STO .00
005 SF .00
006 LBL 02
007 RCL .00
008 M-ALL
009 STO .01
010 LBL 01
011 RCL .01
012 RCL .00
013 M.IJ
014 CL[alpha]
015 [alpha]'('
016 [alpha]IP X
017 [alpha]','
018 [alpha]IP Y
019 [alpha]')'
020 RCL[->].01
021 PROMPT
022 STO[->].01
023 ISG .01
024 GTO 01
025 FS? .00
026 GTO 02
027 GTO 03
028 LBL B
029 LocR 002
030 STO .00
031 LBL 03
032 CF .00
033 CL[alpha]
034 [alpha]'R|C'
035 PROMPT
036 x[<->]y
037 RCL .00
038 M.REG
039 STO .01
040 GTO 01