I got distracted by work and forgot about this thread. Apologies. Here is a tiny rudimentary Python program that dumps the program within a Voyager save file. It expects the save file to be named as
just like in the previous Python programs.
mentioned earlier in this thread. Eventually these programs should be made more flexible with argument parsing, and put into a
repo along with other programs such as the Voyager overlay generator on a different forum thread, or perhaps even moved into a
directory of Nonpareil if its author would allow it.
Many thanks to Pierre for the spreadsheet from which the instruction map was derived.
Code:
# Python code to decode program from a Voyager calculator save file.
#
# WARNING: This code may brick your calculator. THE SOFTWARE IS PROVIDED
# "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
# SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
# DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
import io
# The following instructions were extracted from the PH15C_Interface.xls
# spreadsheet by Pierre.
instructions = {
b"\x01": "LBL 1",
b"\x02": "LBL 2",
b"\x03": "LBL 3",
b"\x04": "LBL 4",
b"\x05": "LBL 5",
b"\x06": "LBL 6",
b"\x07": "LBL 7",
b"\x08": "LBL 8",
b"\x09": "LBL 9",
b"\x0a": "LBL A",
b"\x0b": "LBL B",
b"\x0c": "LBL C",
b"\x0d": "LBL D",
b"\x0e": "LBL E",
b"\x10": "GTO 0",
b"\x11": "GTO 1",
b"\x12": "GTO 2",
b"\x13": "GTO 3",
b"\x14": "GTO 4",
b"\x15": "GTO 5",
b"\x16": "GTO 6",
b"\x17": "GTO 7",
b"\x18": "GTO 8",
b"\x19": "GTO 9",
b"\x1a": "GTO A",
b"\x1b": "GTO B",
b"\x1c": "GTO C",
b"\x1d": "GTO D",
b"\x1e": "GTO E",
b"\x20": "GSB 0",
b"\x21": "GSB 1",
b"\x22": "GSB 2",
b"\x23": "GSB 3",
b"\x24": "GSB 4",
b"\x25": "GSB 5",
b"\x26": "GSB 6",
b"\x27": "GSB 7",
b"\x28": "GSB 8",
b"\x29": "GSB 9",
b"\x2a": "GSB A",
b"\x2b": "GSB B",
b"\x2c": "GSB C",
b"\x2d": "GSB D",
b"\x2e": "GSB E",
b"\x30": "RCL 0",
b"\x31": "RCL 1",
b"\x32": "RCL 2",
b"\x33": "RCL 3",
b"\x34": "RCL 4",
b"\x35": "RCL 5",
b"\x36": "RCL 6",
b"\x37": "RCL 7",
b"\x38": "RCL 8",
b"\x39": "RCL 9",
b"\xbf\x3a": "u RCL A",
b"\xbf\x3b": "u RCL B",
b"\xbf\x3c": "u RCL C",
b"\xbf\x3d": "u RCL D",
b"\xbf\x3e": "u RCL E",
b"\xbf\x3a": "uRCL A",
b"\xbf\x3b": "uRCL B",
b"\xbf\x3c": "uRCL C",
b"\xbf\x3d": "uRCL D",
b"\xbf\x3e": "uRCL E",
b"\x3a": "RCL A",
b"\x3b": "RCL B",
b"\x3c": "RCL C",
b"\x3d": "RCL D",
b"\x3e": "RCL E",
b"\x40": "STO 0",
b"\x41": "STO 1",
b"\x42": "STO 2",
b"\x43": "STO 3",
b"\x44": "STO 4",
b"\x45": "STO 5",
b"\x46": "STO 6",
b"\x47": "STO 7",
b"\x48": "STO 8",
b"\x49": "STO 9",
b"\xbf\x4a": "u STO A",
b"\xbf\x4b": "u STO B",
b"\xbf\x4c": "u STO C",
b"\xbf\x4d": "u STO D",
b"\xbf\x4e": "u STO E",
b"\xbf\x4a": "uSTO A",
b"\xbf\x4b": "uSTO B",
b"\xbf\x4c": "uSTO C",
b"\xbf\x4d": "uSTO D",
b"\xbf\x4e": "uSTO E",
b"\x4a": "STO A",
b"\x4b": "STO B",
b"\x4c": "STO C",
b"\x4d": "STO D",
b"\x4e": "STO E",
b"\x50": "RCL .0",
b"\x51": "RCL .1",
b"\x52": "RCL .2",
b"\x53": "RCL .3",
b"\x54": "RCL .4",
b"\x55": "RCL .5",
b"\x56": "RCL .6",
b"\x57": "RCL .7",
b"\x58": "RCL .8",
b"\x59": "RCL .9",
b"\x50": "RCL .0",
b"\x51": "RCL .1",
b"\x52": "RCL .2",
b"\x53": "RCL .3",
b"\x54": "RCL .4",
b"\x55": "RCL .5",
b"\x56": "RCL .6",
b"\x57": "RCL .7",
b"\x58": "RCL .8",
b"\x59": "RCL .9",
b"\x5a": "RCL g A",
b"\x5b": "RCL g B",
b"\x5c": "RCL g C",
b"\x5d": "RCL g D",
b"\x5e": "RCL g E",
b"\x60": "STO .0",
b"\x61": "STO .1",
b"\x62": "STO .2",
b"\x63": "STO .3",
b"\x64": "STO .4",
b"\x65": "STO .5",
b"\x66": "STO .6",
b"\x67": "STO .7",
b"\x68": "STO .8",
b"\x69": "STO .9",
b"\x60": "STO .0",
b"\x61": "STO .1",
b"\x62": "STO .2",
b"\x63": "STO .3",
b"\x64": "STO .4",
b"\x65": "STO .5",
b"\x66": "STO .6",
b"\x67": "STO .7",
b"\x68": "STO .8",
b"\x69": "STO .9",
b"\x6a": "STO g A",
b"\x6b": "STO g B",
b"\x6c": "STO g C",
b"\x6d": "STO g D",
b"\x6e": "STO g E",
b"\x70": "x#0?",
b"\x70": "x#0",
b"\x70": "x!=0?",
b"\x70": "x!=0",
b"\x70": "x≠0?",
b"\x70": "x≠0",
b"\x70": "TEST 0",
b"\x71": "x>0?",
b"\x71": "x>0",
b"\x71": "TEST 1",
b"\x72": "x<0?",
b"\x72": "x<0",
b"\x72": "TEST 2",
b"\x73": "x>=0?",
b"\x73": "x>=0",
b"\x73": "x≥0?",
b"\x73": "x≥0",
b"\x73": "TEST 3",
b"\x74": "x<=0?",
b"\x74": "x<=0",
b"\x74": "x≤0?",
b"\x74": "x≤0",
b"\x74": "TEST 4",
b"\x75": "x=y?",
b"\x75": "x=y",
b"\x75": "TEST 5",
b"\x76": "x#y?",
b"\x76": "x#y",
b"\x76": "x!=y?",
b"\x76": "x!=y",
b"\x76": "x≠y?",
b"\x76": "x≠y",
b"\x76": "TEST 6",
b"\x77": "x>y?",
b"\x77": "x>y",
b"\x77": "TEST 7",
b"\x78": "x<y?",
b"\x78": "x<y",
b"\x78": "TEST 8",
b"\x79": "x>=y?",
b"\x79": "x>=y",
b"\x79": "x≥y?",
b"\x79": "x≥y",
b"\x79": "TEST 9",
b"\x7a": "RCL MATRIX A",
b"\x7b": "RCL MATRIX B",
b"\x7c": "RCL MATRIX C",
b"\x7d": "RCL MATRIX D",
b"\x7e": "RCL MATRIX E",
b"\x80": "X<> 0",
b"\x81": "x<> (i)",
b"\x82": "DSE 0",
b"\x83": "DSE (i)",
b"\x84": "ISG 0",
b"\x85": "ISG (i)",
b"\x86": "RCL (i)",
b"\x87": "RCL I",
b"\x88": "GTO I",
b"\x89": "GSB I",
b"\x8a": "RESULT A",
b"\x8b": "RESULT B",
b"\x8c": "RESULT C",
b"\x8d": "RESULT D",
b"\x8e": "RESULT E",
b"\x90": "x<> 1",
b"\x91": "x<> I",
b"\x92": "DSE 1",
b"\x93": "DSE I",
b"\x94": "ISG 1",
b"\x95": "ISG I",
b"\x96": "STO (i)",
b"\x97": "STO I",
b"\x98": "DIM (i)",
b"\x99": "DIM I",
b"\x9a": "DIM A",
b"\x9b": "DIM B",
b"\x9c": "DIM C",
b"\x9d": "DIM D",
b"\x9e": "DIM E",
b"\xa0": "y,r",
b"\xa1": "RAN#",
b"\xa2": "CLx",
b"\xa3": "FRAC",
b"\xa4": "I",
b"\xa5": "CLR_REG",
b"\xa6": "STO RESULT",
b"\xa7": "RCL SUM",
b"\xa7": "RCL Σ",
b"\xa8": "RCL DIM (i)",
b"\xa9": "RCL DIM I",
b"\xaa": "RCL DIM A",
b"\xab": "RCL DIM B",
b"\xac": "RCL DIM C",
b"\xad": "RCL DIM D",
b"\xae": "RCL DIM E",
b"\xb0": "s",
b"\xb1": "LSTx",
b"\xb2": "RTN",
b"\xb3": "ABS",
b"\xb4": "R_up",
b"\xb4": "R↑",
b"\xb5": "RND",
b"\xb6": "PI",
b"\xb6": "π",
b"\xb7": "SIN^-1",
b"\xb8": "COS^-1",
b"\xb9": "TAN^-1",
b"\xb7": "SIN-1",
b"\xb8": "COS-1",
b"\xb9": "TAN-1",
b"\xb7": "ASIN",
b"\xb8": "ACOS",
b"\xb9": "ATAN",
b"\xba": "x^2",
b"\xba": "X2",
b"\xba": "X²",
b"\xbb": "LN",
b"\xbc": "LOG",
b"\xbd": "%",
b"\xbe": "d%",
b"\xc0": ".",
b"\xc1": "ENTER",
b"\xc2": "R/S",
b"\xc3": "CHS",
b"\xc4": "R_dn",
b"\xc4": "R_down",
b"\xc4": "R↓",
b"\xc5": "x<>y",
b"\xc6": "EEX",
b"\xc7": "SIN",
b"\xc8": "COS",
b"\xc9": "TAN",
b"\xca": "SQRT",
b"\xca": "SQR",
b"\xca": "√",
b"\xcb": "e^x",
b"\xcc": "10^X",
b"\xcd": "y^x",
b"\xce": "1/x",
b"\xcf\x80": "RCL+0",
b"\xcf\x81": "RCL+1",
b"\xcf\x82": "RCL+2",
b"\xcf\x83": "RCL+3",
b"\xcf\x84": "RCL+4",
b"\xcf\x85": "RCL+5",
b"\xcf\x86": "RCL+6",
b"\xcf\x87": "RCL+7",
b"\xcf\x88": "RCL+8",
b"\xcf\x89": "RCL+9",
b"\xcf\x8a": "RCL+A",
b"\xcf\x8b": "RCL+B",
b"\xcf\x8c": "RCL+C",
b"\xcf\x8d": "RCL+D",
b"\xcf\x8e": "RCL+E",
b"\xcf\x90": "RCL+.0",
b"\xcf\x91": "RCL+.1",
b"\xcf\x92": "RCL+.2",
b"\xcf\x93": "RCL+.3",
b"\xcf\x94": "RCL+.4",
b"\xcf\x95": "RCL+.5",
b"\xcf\x96": "RCL+.6",
b"\xcf\x97": "RCL+.7",
b"\xcf\x98": "RCL+.8",
b"\xcf\x99": "RCL+.9",
b"\xcf\x90": "RCL+.0",
b"\xcf\x91": "RCL+.1",
b"\xcf\x92": "RCL+.2",
b"\xcf\x93": "RCL+.3",
b"\xcf\x94": "RCL+.4",
b"\xcf\x95": "RCL+.5",
b"\xcf\x96": "RCL+.6",
b"\xcf\x97": "RCL+.7",
b"\xcf\x98": "RCL+.8",
b"\xcf\x99": "RCL+.9",
b"\xcf\x9d": "RCL+(i)",
b"\xcf\x9e": "RCL+I",
b"\xcf\xa0": "RCL-0",
b"\xcf\xa1": "RCL-1",
b"\xcf\xa2": "RCL-2",
b"\xcf\xa3": "RCL-3",
b"\xcf\xa4": "RCL-4",
b"\xcf\xa5": "RCL-5",
b"\xcf\xa6": "RCL-6",
b"\xcf\xa7": "RCL-7",
b"\xcf\xa8": "RCL-8",
b"\xcf\xa9": "RCL-9",
b"\xcf\xaa": "RCL-A",
b"\xcf\xab": "RCL-B",
b"\xcf\xac": "RCL-C",
b"\xcf\xad": "RCL-D",
b"\xcf\xae": "RCL-E",
b"\xcf\xb0": "RCL-.0",
b"\xcf\xb1": "RCL-.1",
b"\xcf\xb2": "RCL-.2",
b"\xcf\xb3": "RCL-.3",
b"\xcf\xb4": "RCL-.4",
b"\xcf\xb5": "RCL-.5",
b"\xcf\xb6": "RCL-.6",
b"\xcf\xb7": "RCL-.7",
b"\xcf\xb8": "RCL-.8",
b"\xcf\xb9": "RCL-.9",
b"\xcf\xb0": "RCL-.0",
b"\xcf\xb1": "RCL-.1",
b"\xcf\xb2": "RCL-.2",
b"\xcf\xb3": "RCL-.3",
b"\xcf\xb4": "RCL-.4",
b"\xcf\xb5": "RCL-.5",
b"\xcf\xb6": "RCL-.6",
b"\xcf\xb7": "RCL-.7",
b"\xcf\xb8": "RCL-.8",
b"\xcf\xb9": "RCL-.9",
b"\xcf\xbd": "RCL-(i)",
b"\xcf\xbe": "RCL-I",
b"\xcf\xc0": "RCL*0",
b"\xcf\xc1": "RCL*1",
b"\xcf\xc2": "RCL*2",
b"\xcf\xc3": "RCL*3",
b"\xcf\xc4": "RCL*4",
b"\xcf\xc5": "RCL*5",
b"\xcf\xc6": "RCL*6",
b"\xcf\xc7": "RCL*7",
b"\xcf\xc8": "RCL*8",
b"\xcf\xc9": "RCL*9",
b"\xcf\xca": "RCL*A",
b"\xcf\xcb": "RCL*B",
b"\xcf\xcc": "RCL*C",
b"\xcf\xcd": "RCL*D",
b"\xcf\xce": "RCL*E",
b"\xcf\xd0": "RCL*.0",
b"\xcf\xd1": "RCL*.1",
b"\xcf\xd2": "RCL*.2",
b"\xcf\xd3": "RCL*.3",
b"\xcf\xd4": "RCL*.4",
b"\xcf\xd5": "RCL*.5",
b"\xcf\xd6": "RCL*.6",
b"\xcf\xd7": "RCL*.7",
b"\xcf\xd8": "RCL*.8",
b"\xcf\xd9": "RCL*.9",
b"\xcf\xd0": "RCL*.0",
b"\xcf\xd1": "RCL*.1",
b"\xcf\xd2": "RCL*.2",
b"\xcf\xd3": "RCL*.3",
b"\xcf\xd4": "RCL*.4",
b"\xcf\xd5": "RCL*.5",
b"\xcf\xd6": "RCL*.6",
b"\xcf\xd7": "RCL*.7",
b"\xcf\xd8": "RCL*.8",
b"\xcf\xd9": "RCL*.9",
b"\xcf\xdd": "RCL*(i)",
b"\xcf\xde": "RCL*I",
b"\xcf\xc0": "RCLx0",
b"\xcf\xc1": "RCLx1",
b"\xcf\xc2": "RCLx2",
b"\xcf\xc3": "RCLx3",
b"\xcf\xc4": "RCLx4",
b"\xcf\xc5": "RCLx5",
b"\xcf\xc6": "RCLx6",
b"\xcf\xc7": "RCLx7",
b"\xcf\xc8": "RCLx8",
b"\xcf\xc9": "RCLx9",
b"\xcf\xca": "RCLxA",
b"\xcf\xcb": "RCLxB",
b"\xcf\xcc": "RCLxC",
b"\xcf\xcd": "RCLxD",
b"\xcf\xce": "RCLxE",
b"\xcf\xd0": "RCLx.0",
b"\xcf\xd1": "RCLx.1",
b"\xcf\xd2": "RCLx.2",
b"\xcf\xd3": "RCLx.3",
b"\xcf\xd4": "RCLx.4",
b"\xcf\xd5": "RCLx.5",
b"\xcf\xd6": "RCLx.6",
b"\xcf\xd7": "RCLx.7",
b"\xcf\xd8": "RCLx.8",
b"\xcf\xd9": "RCLx.9",
b"\xcf\xd0": "RCLx.0",
b"\xcf\xd1": "RCLx.1",
b"\xcf\xd2": "RCLx.2",
b"\xcf\xd3": "RCLx.3",
b"\xcf\xd4": "RCLx.4",
b"\xcf\xd5": "RCLx.5",
b"\xcf\xd6": "RCLx.6",
b"\xcf\xd7": "RCLx.7",
b"\xcf\xd8": "RCLx.8",
b"\xcf\xd9": "RCLx.9",
b"\xcf\xdd": "RCLx(i)",
b"\xcf\xde": "RCLxI",
b"\xcf\xe0": "RCL/0",
b"\xcf\xe1": "RCL/1",
b"\xcf\xe2": "RCL/2",
b"\xcf\xe3": "RCL/3",
b"\xcf\xe4": "RCL/4",
b"\xcf\xe5": "RCL/5",
b"\xcf\xe6": "RCL/6",
b"\xcf\xe7": "RCL/7",
b"\xcf\xe8": "RCL/8",
b"\xcf\xe9": "RCL/9",
b"\xcf\xea": "RCL/A",
b"\xcf\xeb": "RCL/B",
b"\xcf\xec": "RCL/C",
b"\xcf\xed": "RCL/D",
b"\xcf\xee": "RCL/E",
b"\xcf\xf0": "RCL/.0",
b"\xcf\xf1": "RCL/.1",
b"\xcf\xf2": "RCL/.2",
b"\xcf\xf3": "RCL/.3",
b"\xcf\xf4": "RCL/.4",
b"\xcf\xf5": "RCL/.5",
b"\xcf\xf6": "RCL/.6",
b"\xcf\xf7": "RCL/.7",
b"\xcf\xf8": "RCL/.8",
b"\xcf\xf9": "RCL/.9",
b"\xcf\xf0": "RCL/.0",
b"\xcf\xf1": "RCL/.1",
b"\xcf\xf2": "RCL/.2",
b"\xcf\xf3": "RCL/.3",
b"\xcf\xf4": "RCL/.4",
b"\xcf\xf5": "RCL/.5",
b"\xcf\xf6": "RCL/.6",
b"\xcf\xf7": "RCL/.7",
b"\xcf\xf8": "RCL/.8",
b"\xcf\xf9": "RCL/.9",
b"\xcf\xfd": "RCL/(i)",
b"\xcf\xfe": "RCL/I",
b"\xcf\xe0": "RCL÷0",
b"\xcf\xe1": "RCL÷1",
b"\xcf\xe2": "RCL÷2",
b"\xcf\xe3": "RCL÷3",
b"\xcf\xe4": "RCL÷4",
b"\xcf\xe5": "RCL÷5",
b"\xcf\xe6": "RCL÷6",
b"\xcf\xe7": "RCL÷7",
b"\xcf\xe8": "RCL÷8",
b"\xcf\xe9": "RCL÷9",
b"\xcf\xea": "RCL÷A",
b"\xcf\xeb": "RCL÷B",
b"\xcf\xec": "RCL÷C",
b"\xcf\xed": "RCL÷D",
b"\xcf\xee": "RCL÷E",
b"\xcf\xf0": "RCL÷.0",
b"\xcf\xf1": "RCL÷.1",
b"\xcf\xf2": "RCL÷.2",
b"\xcf\xf3": "RCL÷.3",
b"\xcf\xf4": "RCL÷.4",
b"\xcf\xf5": "RCL÷.5",
b"\xcf\xf6": "RCL÷.6",
b"\xcf\xf7": "RCL÷.7",
b"\xcf\xf8": "RCL÷.8",
b"\xcf\xf9": "RCL÷.9",
b"\xcf\xf0": "RCL÷.0",
b"\xcf\xf1": "RCL÷.1",
b"\xcf\xf2": "RCL÷.2",
b"\xcf\xf3": "RCL÷.3",
b"\xcf\xf4": "RCL÷.4",
b"\xcf\xf5": "RCL÷.5",
b"\xcf\xf6": "RCL÷.6",
b"\xcf\xf7": "RCL÷.7",
b"\xcf\xf8": "RCL÷.8",
b"\xcf\xf9": "RCL÷.9",
b"\xcf\xfd": "RCL÷(i)",
b"\xcf\xfe": "RCL÷I",
b"\xd0": "x!",
b"\xd1": ">R",
b"\xd1": "->R",
b"\xd1": "→R",
b"\xd2": ">H.MS",
b"\xd2": "->H.MS",
b"\xd2": "→H.MS",
b"\xd3": ">RAD",
b"\xd3": "->RAD",
b"\xd3": "→RAD",
b"\xd4": "HYP SIN",
b"\xd5": "HYP COS",
b"\xd6": "HYP TAN",
b"\xd7": "RCL RESULT",
b"\xd8": "RCL RAN#",
b"\xd9": "STO RAN#",
b"\xda": "Py,x",
b"\xdb": "Re<>Im",
b"\xdc": "PSE",
b"\xdd": "CLR_Sum",
b"\xdd": "CLR_Σ",
b"\xde": "L.R.",
b"\xdf\x80": "STO+0",
b"\xdf\x81": "STO+1",
b"\xdf\x82": "STO+2",
b"\xdf\x83": "STO+3",
b"\xdf\x84": "STO+4",
b"\xdf\x85": "STO+5",
b"\xdf\x86": "STO+6",
b"\xdf\x87": "STO+7",
b"\xdf\x88": "STO+8",
b"\xdf\x89": "STO+9",
b"\xdf\x8a": "STO+A",
b"\xdf\x8b": "STO+B",
b"\xdf\x8c": "STO+C",
b"\xdf\x8d": "STO+D",
b"\xdf\x8e": "STO+E",
b"\xdf\x90": "STO+.0",
b"\xdf\x91": "STO+.1",
b"\xdf\x92": "STO+.2",
b"\xdf\x93": "STO+.3",
b"\xdf\x94": "STO+.4",
b"\xdf\x95": "STO+.5",
b"\xdf\x96": "STO+.6",
b"\xdf\x97": "STO+.7",
b"\xdf\x98": "STO+.8",
b"\xdf\x99": "STO+.9",
b"\xdf\x90": "STO+.0",
b"\xdf\x91": "STO+.1",
b"\xdf\x92": "STO+.2",
b"\xdf\x93": "STO+.3",
b"\xdf\x94": "STO+.4",
b"\xdf\x95": "STO+.5",
b"\xdf\x96": "STO+.6",
b"\xdf\x97": "STO+.7",
b"\xdf\x98": "STO+.8",
b"\xdf\x99": "STO+.9",
b"\xdf\x9d": "STO+(i)",
b"\xdf\x9e": "STO+I",
b"\xdf\xa0": "STO-0",
b"\xdf\xa1": "STO-1",
b"\xdf\xa2": "STO-2",
b"\xdf\xa3": "STO-3",
b"\xdf\xa4": "STO-4",
b"\xdf\xa5": "STO-5",
b"\xdf\xa6": "STO-6",
b"\xdf\xa7": "STO-7",
b"\xdf\xa8": "STO-8",
b"\xdf\xa9": "STO-9",
b"\xdf\xaa": "STO-A",
b"\xdf\xab": "STO-B",
b"\xdf\xac": "STO-C",
b"\xdf\xad": "STO-D",
b"\xdf\xae": "STO-E",
b"\xdf\xb0": "STO-.0",
b"\xdf\xb1": "STO-.1",
b"\xdf\xb2": "STO-.2",
b"\xdf\xb3": "STO-.3",
b"\xdf\xb4": "STO-.4",
b"\xdf\xb5": "STO-.5",
b"\xdf\xb6": "STO-.6",
b"\xdf\xb7": "STO-.7",
b"\xdf\xb8": "STO-.8",
b"\xdf\xb9": "STO-.9",
b"\xdf\xb0": "STO-.0",
b"\xdf\xb1": "STO-.1",
b"\xdf\xb2": "STO-.2",
b"\xdf\xb3": "STO-.3",
b"\xdf\xb4": "STO-.4",
b"\xdf\xb5": "STO-.5",
b"\xdf\xb6": "STO-.6",
b"\xdf\xb7": "STO-.7",
b"\xdf\xb8": "STO-.8",
b"\xdf\xb9": "STO-.9",
b"\xdf\xbd": "STO-(i)",
b"\xdf\xbe": "STO-I",
b"\xdf\xc0": "STO*0",
b"\xdf\xc1": "STO*1",
b"\xdf\xc2": "STO*2",
b"\xdf\xc3": "STO*3",
b"\xdf\xc4": "STO*4",
b"\xdf\xc5": "STO*5",
b"\xdf\xc6": "STO*6",
b"\xdf\xc7": "STO*7",
b"\xdf\xc8": "STO*8",
b"\xdf\xc9": "STO*9",
b"\xdf\xca": "STO*A",
b"\xdf\xcb": "STO*B",
b"\xdf\xcc": "STO*C",
b"\xdf\xcd": "STO*D",
b"\xdf\xce": "STO*E",
b"\xdf\xd0": "STO*.0",
b"\xdf\xd1": "STO*.1",
b"\xdf\xd2": "STO*.2",
b"\xdf\xd3": "STO*.3",
b"\xdf\xd4": "STO*.4",
b"\xdf\xd5": "STO*.5",
b"\xdf\xd6": "STO*.6",
b"\xdf\xd7": "STO*.7",
b"\xdf\xd8": "STO*.8",
b"\xdf\xd9": "STO*.9",
b"\xdf\xd0": "STO*.0",
b"\xdf\xd1": "STO*.1",
b"\xdf\xd2": "STO*.2",
b"\xdf\xd3": "STO*.3",
b"\xdf\xd4": "STO*.4",
b"\xdf\xd5": "STO*.5",
b"\xdf\xd6": "STO*.6",
b"\xdf\xd7": "STO*.7",
b"\xdf\xd8": "STO*.8",
b"\xdf\xd9": "STO*.9",
b"\xdf\xdd": "STO*(i)",
b"\xdf\xde": "STO*I",
b"\xdf\xc0": "STOx0",
b"\xdf\xc1": "STOx1",
b"\xdf\xc2": "STOx2",
b"\xdf\xc3": "STOx3",
b"\xdf\xc4": "STOx4",
b"\xdf\xc5": "STOx5",
b"\xdf\xc6": "STOx6",
b"\xdf\xc7": "STOx7",
b"\xdf\xc8": "STOx8",
b"\xdf\xc9": "STOx9",
b"\xdf\xca": "STOxA",
b"\xdf\xcb": "STOxB",
b"\xdf\xcc": "STOxC",
b"\xdf\xcd": "STOxD",
b"\xdf\xce": "STOxE",
b"\xdf\xd0": "STOx.0",
b"\xdf\xd1": "STOx.1",
b"\xdf\xd2": "STOx.2",
b"\xdf\xd3": "STOx.3",
b"\xdf\xd4": "STOx.4",
b"\xdf\xd5": "STOx.5",
b"\xdf\xd6": "STOx.6",
b"\xdf\xd7": "STOx.7",
b"\xdf\xd8": "STOx.8",
b"\xdf\xd9": "STOx.9",
b"\xdf\xd0": "STOx.0",
b"\xdf\xd1": "STOx.1",
b"\xdf\xd2": "STOx.2",
b"\xdf\xd3": "STOx.3",
b"\xdf\xd4": "STOx.4",
b"\xdf\xd5": "STOx.5",
b"\xdf\xd6": "STOx.6",
b"\xdf\xd7": "STOx.7",
b"\xdf\xd8": "STOx.8",
b"\xdf\xd9": "STOx.9",
b"\xdf\xdd": "STOx(i)",
b"\xdf\xde": "STOxI",
b"\xdf\xe0": "STO/0",
b"\xdf\xe1": "STO/1",
b"\xdf\xe2": "STO/2",
b"\xdf\xe3": "STO/3",
b"\xdf\xe4": "STO/4",
b"\xdf\xe5": "STO/5",
b"\xdf\xe6": "STO/6",
b"\xdf\xe7": "STO/7",
b"\xdf\xe8": "STO/8",
b"\xdf\xe9": "STO/9",
b"\xdf\xea": "STO/A",
b"\xdf\xeb": "STO/B",
b"\xdf\xec": "STO/C",
b"\xdf\xed": "STO/D",
b"\xdf\xee": "STO/E",
b"\xdf\xf0": "STO/.0",
b"\xdf\xf1": "STO/.1",
b"\xdf\xf2": "STO/.2",
b"\xdf\xf3": "STO/.3",
b"\xdf\xf4": "STO/.4",
b"\xdf\xf5": "STO/.5",
b"\xdf\xf6": "STO/.6",
b"\xdf\xf7": "STO/.7",
b"\xdf\xf8": "STO/.8",
b"\xdf\xf9": "STO/.9",
b"\xdf\xf0": "STO/.0",
b"\xdf\xf1": "STO/.1",
b"\xdf\xf2": "STO/.2",
b"\xdf\xf3": "STO/.3",
b"\xdf\xf4": "STO/.4",
b"\xdf\xf5": "STO/.5",
b"\xdf\xf6": "STO/.6",
b"\xdf\xf7": "STO/.7",
b"\xdf\xf8": "STO/.8",
b"\xdf\xf9": "STO/.9",
b"\xdf\xfd": "STO/(i)",
b"\xdf\xfe": "STO/I",
b"\xdf\xe0": "STO÷0",
b"\xdf\xe1": "STO÷1",
b"\xdf\xe2": "STO÷2",
b"\xdf\xe3": "STO÷3",
b"\xdf\xe4": "STO÷4",
b"\xdf\xe5": "STO÷5",
b"\xdf\xe6": "STO÷6",
b"\xdf\xe7": "STO÷7",
b"\xdf\xe8": "STO÷8",
b"\xdf\xe9": "STO÷9",
b"\xdf\xea": "STO÷A",
b"\xdf\xeb": "STO÷B",
b"\xdf\xec": "STO÷C",
b"\xdf\xed": "STO÷D",
b"\xdf\xee": "STO÷E",
b"\xdf\xf0": "STO÷.0",
b"\xdf\xf1": "STO÷.1",
b"\xdf\xf2": "STO÷.2",
b"\xdf\xf3": "STO÷.3",
b"\xdf\xf4": "STO÷.4",
b"\xdf\xf5": "STO÷.5",
b"\xdf\xf6": "STO÷.6",
b"\xdf\xf7": "STO÷.7",
b"\xdf\xf8": "STO÷.8",
b"\xdf\xf9": "STO÷.9",
b"\xdf\xf0": "STO÷.0",
b"\xdf\xf1": "STO÷.1",
b"\xdf\xf2": "STO÷.2",
b"\xdf\xf3": "STO÷.3",
b"\xdf\xf4": "STO÷.4",
b"\xdf\xf5": "STO÷.5",
b"\xdf\xf6": "STO÷.6",
b"\xdf\xf7": "STO÷.7",
b"\xdf\xf8": "STO÷.8",
b"\xdf\xf9": "STO÷.9",
b"\xdf\xfd": "STO÷(i)",
b"\xdf\xfe": "STO÷I",
b"\xe0": "E(x)",
b"\xe1": ">P",
b"\xe1": "->P",
b"\xe1": "→P",
b"\xe2": ">H",
b"\xe2": "->H",
b"\xe2": "→H",
b"\xe3": ">DEG",
b"\xe3": "->DEG",
b"\xe3": "→DEG",
b"\xe4": "HYP^-1 SIN",
b"\xe5": "HYP^-1 COS",
b"\xe6": "HYP^-1 TAN",
b"\xe4": "HYP-1 SIN",
b"\xe5": "HYP-1 COS",
b"\xe6": "HYP-1 TAN",
b"\xe7": "DEG",
b"\xe8": "RAD",
b"\xe9": "GRD",
b"\xea": "Cy,x",
b"\xeb": "INT",
b"\xec": "X=0?",
b"\xec": "X=0",
b"\xed": "x<=y?",
b"\xed": "x<=y",
b"\xed": "x≤y?",
b"\xed": "x≤y",
b"\xee": "SUM-",
b"\xee": "Σ-",
b"\xef\x10": "SOLVE 0",
b"\xef\x11": "SOLVE 1",
b"\xef\x12": "SOLVE 2",
b"\xef\x13": "SOLVE 3",
b"\xef\x14": "SOLVE 4",
b"\xef\x15": "SOLVE 5",
b"\xef\x16": "SOLVE 6",
b"\xef\x17": "SOLVE 7",
b"\xef\x11": "SOLVE 8",
b"\xef\x19": "SOLVE 9",
b"\xef\x1a": "SOLVE A",
b"\xef\x1b": "SOLVE B",
b"\xef\x1c": "SOLVE C",
b"\xef\x1d": "SOLVE D",
b"\xef\x1e": "SOLVE E",
b"\xef\x20": "SOLVE .0",
b"\xef\x21": "SOLVE .1",
b"\xef\x22": "SOLVE .2",
b"\xef\x23": "SOLVE .3",
b"\xef\x24": "SOLVE .4",
b"\xef\x25": "SOLVE .5",
b"\xef\x26": "SOLVE .6",
b"\xef\x27": "SOLVE .7",
b"\xef\x28": "SOLVE .8",
b"\xef\x29": "SOLVE .9",
b"\xef\x20": "SOLVE .0",
b"\xef\x21": "SOLVE .1",
b"\xef\x22": "SOLVE .2",
b"\xef\x23": "SOLVE .3",
b"\xef\x24": "SOLVE .4",
b"\xef\x25": "SOLVE .5",
b"\xef\x26": "SOLVE .6",
b"\xef\x27": "SOLVE .7",
b"\xef\x28": "SOLVE .8",
b"\xef\x29": "SOLVE .9",
b"\xef\x30": "int(xy) 0",
b"\xef\x31": "int(xy) 1",
b"\xef\x32": "int(xy) 2",
b"\xef\x33": "int(xy) 3",
b"\xef\x34": "int(xy) 4",
b"\xef\x35": "int(xy) 5",
b"\xef\x36": "int(xy) 6",
b"\xef\x37": "int(xy) 7",
b"\xef\x31": "int(xy) 8",
b"\xef\x39": "int(xy) 9",
b"\xef\x3a": "int(xy) A",
b"\xef\x3b": "int(xy) B",
b"\xef\x3c": "int(xy) C",
b"\xef\x3d": "int(xy) D",
b"\xef\x3e": "int(xy) E",
b"\xef\x40": "int(xy) .0",
b"\xef\x41": "int(xy) .1",
b"\xef\x42": "int(xy) .2",
b"\xef\x43": "int(xy) .3",
b"\xef\x44": "int(xy) .4",
b"\xef\x45": "int(xy) .5",
b"\xef\x46": "int(xy) .6",
b"\xef\x47": "int(xy) .7",
b"\xef\x48": "int(xy) .8",
b"\xef\x49": "int(xy) .9",
b"\xef\x40": "int(xy) .0",
b"\xef\x41": "int(xy) .1",
b"\xef\x42": "int(xy) .2",
b"\xef\x43": "int(xy) .3",
b"\xef\x44": "int(xy) .4",
b"\xef\x45": "int(xy) .5",
b"\xef\x46": "int(xy) .6",
b"\xef\x47": "int(xy) .7",
b"\xef\x48": "int(xy) .8",
b"\xef\x49": "int(xy) .9",
b"\xef\x52": "x<> 2",
b"\xef\x53": "x<> 3",
b"\xef\x54": "x<> 4",
b"\xef\x55": "x<> 5",
b"\xef\x56": "x<> 6",
b"\xef\x57": "x<> 7",
b"\xef\x58": "x<> 8",
b"\xef\x59": "x<> 9",
b"\xef\x5a": "x<> A",
b"\xef\x5b": "x<> B",
b"\xef\x5c": "x<> C",
b"\xef\x5d": "x<> D",
b"\xef\x5e": "x<> E",
b"\xef\x60": "x<> .0",
b"\xef\x61": "x<> .1",
b"\xef\x62": "x<> .2",
b"\xef\x63": "x<> .3",
b"\xef\x64": "x<> .4",
b"\xef\x65": "x<> .5",
b"\xef\x66": "x<> .6",
b"\xef\x67": "x<> .7",
b"\xef\x68": "x<> .8",
b"\xef\x69": "x<> .9",
b"\xef\x60": "x<> .0",
b"\xef\x61": "x<> .1",
b"\xef\x62": "x<> .2",
b"\xef\x63": "x<> .3",
b"\xef\x64": "x<> .4",
b"\xef\x65": "x<> .5",
b"\xef\x66": "x<> .6",
b"\xef\x67": "x<> .7",
b"\xef\x68": "x<> .8",
b"\xef\x69": "x<> .9",
b"\xef\x72": "DSE 2",
b"\xef\x73": "DSE 3",
b"\xef\x74": "DSE4",
b"\xef\x75": "DSE5",
b"\xef\x76": "DSE6",
b"\xef\x77": "DSE 7",
b"\xef\x78": "DSE 8",
b"\xef\x79": "DSE 9",
b"\xef\x7a": "DSE A",
b"\xef\x7b": "DSE B",
b"\xef\x7c": "DSE C",
b"\xef\x7d": "DSE D",
b"\xef\x7e": "DSE E",
b"\xef\x80": "DSE .0",
b"\xef\x81": "DSE .1",
b"\xef\x82": "DSE .2",
b"\xef\x83": "DSE .3",
b"\xef\x84": "DSE .4",
b"\xef\x85": "DSE .5",
b"\xef\x86": "DSE .6",
b"\xef\x87": "DSE .7",
b"\xef\x88": "DSE .8",
b"\xef\x89": "DSE .9",
b"\xef\x80": "DSE .0",
b"\xef\x81": "DSE .1",
b"\xef\x82": "DSE .2",
b"\xef\x83": "DSE .3",
b"\xef\x84": "DSE .4",
b"\xef\x85": "DSE .5",
b"\xef\x86": "DSE .6",
b"\xef\x87": "DSE .7",
b"\xef\x88": "DSE .8",
b"\xef\x89": "DSE .9",
b"\xef\x92": "ISG 2",
b"\xef\x93": "ISG 3",
b"\xef\x94": "ISG 4",
b"\xef\x95": "ISG 5",
b"\xef\x96": "ISG 6",
b"\xef\x97": "ISG 7",
b"\xef\x98": "ISG 8",
b"\xef\x99": "ISG 9",
b"\xef\x9a": "ISG A",
b"\xef\x9b": "ISG B",
b"\xef\x9c": "ISG C",
b"\xef\x9d": "ISG D",
b"\xef\x9e": "ISG E",
b"\xef\xa0": "ISG .0",
b"\xef\xa1": "ISG .1",
b"\xef\xa2": "ISG .2",
b"\xef\xa3": "ISG .3",
b"\xef\xa4": "ISG .4",
b"\xef\xa5": "ISG .5",
b"\xef\xa6": "ISG .6",
b"\xef\xa7": "ISG .7",
b"\xef\xa8": "ISG .8",
b"\xef\xa9": "ISG .9",
b"\xef\xa0": "ISG .0",
b"\xef\xa1": "ISG .1",
b"\xef\xa2": "ISG .2",
b"\xef\xa3": "ISG .3",
b"\xef\xa4": "ISG .4",
b"\xef\xa5": "ISG .5",
b"\xef\xa6": "ISG .6",
b"\xef\xa7": "ISG .7",
b"\xef\xa8": "ISG .8",
b"\xef\xa9": "ISG .9",
b"\xf0": "0.0",
b"\xf1": "1.0",
b"\xf2": "2.0",
b"\xf3": "3.0",
b"\xf4": "4.0",
b"\xf5": "5.0",
b"\xf6": "6.0",
b"\xf7": "7.0",
b"\xf8": "8.0",
b"\xf9": "9.0",
b"\xfa": "+",
b"\xfb": "-",
b"\xfc": "*",
b"\xfc": "x",
b"\xfd": "/",
b"\xfd": "÷",
b"\xfe": "SUM+",
b"\xfe": "Σ+",
b"\xff\x00": "LBL .0",
b"\xff\x01": "LBL .1",
b"\xff\x02": "LBL .2",
b"\xff\x03": "LBL .3",
b"\xff\x04": "LBL .4",
b"\xff\x05": "LBL .5",
b"\xff\x06": "LBL .6",
b"\xff\x07": "LBL .7",
b"\xff\x08": "LBL .8",
b"\xff\x09": "LBL .9",
b"\xff\x00": "LBL .0",
b"\xff\x01": "LBL .1",
b"\xff\x02": "LBL .2",
b"\xff\x03": "LBL .3",
b"\xff\x04": "LBL .4",
b"\xff\x05": "LBL .5",
b"\xff\x06": "LBL .6",
b"\xff\x07": "LBL .7",
b"\xff\x08": "LBL .8",
b"\xff\x09": "LBL .9",
b"\xff\x10": "GTO .0",
b"\xff\x11": "GTO .1",
b"\xff\x12": "GTO .2",
b"\xff\x13": "GTO .3",
b"\xff\x14": "GTO .4",
b"\xff\x15": "GTO .5",
b"\xff\x16": "GTO .6",
b"\xff\x17": "GTO .7",
b"\xff\x18": "GTO .8",
b"\xff\x19": "GTO .9",
b"\xff\x10": "GTO .0",
b"\xff\x11": "GTO .1",
b"\xff\x12": "GTO .2",
b"\xff\x13": "GTO .3",
b"\xff\x14": "GTO .4",
b"\xff\x15": "GTO .5",
b"\xff\x16": "GTO .6",
b"\xff\x17": "GTO .7",
b"\xff\x18": "GTO .8",
b"\xff\x19": "GTO .9",
b"\xff\x20": "GSB .0",
b"\xff\x21": "GSB .1",
b"\xff\x22": "GSB .2",
b"\xff\x23": "GSB .3",
b"\xff\x24": "GSB .4",
b"\xff\x25": "GSB .5",
b"\xff\x26": "GSB .6",
b"\xff\x27": "GSB .7",
b"\xff\x28": "GSB .8",
b"\xff\x29": "GSB .9",
b"\xff\x20": "GSB .0",
b"\xff\x21": "GSB .1",
b"\xff\x22": "GSB .2",
b"\xff\x23": "GSB .3",
b"\xff\x24": "GSB .4",
b"\xff\x25": "GSB .5",
b"\xff\x26": "GSB .6",
b"\xff\x27": "GSB .7",
b"\xff\x28": "GSB .8",
b"\xff\x29": "GSB .9",
b"\xff\x30": "SF 0",
b"\xff\x31": "SF 1",
b"\xff\x32": "SF 2",
b"\xff\x33": "SF 3",
b"\xff\x34": "SF 4",
b"\xff\x35": "SF 5",
b"\xff\x36": "SF 6",
b"\xff\x37": "SF 7",
b"\xff\x38": "SF 8",
b"\xff\x39": "SF 9",
b"\xff\x40": "CF 0",
b"\xff\x41": "CF 1",
b"\xff\x42": "CF 2",
b"\xff\x43": "CF 3",
b"\xff\x44": "CF 4",
b"\xff\x45": "CF 5",
b"\xff\x46": "CF 6",
b"\xff\x47": "CF 7",
b"\xff\x48": "CF 8",
b"\xff\x49": "CF 9",
b"\xff\x50": "F? 0",
b"\xff\x51": "F? 1",
b"\xff\x52": "F? 2",
b"\xff\x53": "F? 3",
b"\xff\x54": "F? 4",
b"\xff\x55": "F? 5",
b"\xff\x56": "F? 6",
b"\xff\x57": "F? 7",
b"\xff\x58": "F? 8",
b"\xff\x59": "F? 9",
b"\xff\x60": "FIX 0",
b"\xff\x61": "FIX 1",
b"\xff\x62": "FIX 2",
b"\xff\x63": "FIX 3",
b"\xff\x64": "FIX 4",
b"\xff\x65": "FIX 5",
b"\xff\x66": "FIX 6",
b"\xff\x67": "FIX 7",
b"\xff\x68": "FIX 8",
b"\xff\x69": "FIX 9",
b"\xff\x70": "SCI 0",
b"\xff\x71": "SCI 1",
b"\xff\x72": "SCI 2",
b"\xff\x73": "SCI 3",
b"\xff\x74": "SCI 4",
b"\xff\x75": "SCI 5",
b"\xff\x76": "SCI 6",
b"\xff\x77": "SCI 7",
b"\xff\x78": "SCI 8",
b"\xff\x79": "SCI 9",
b"\xff\x80": "ENG 0",
b"\xff\x81": "ENG 1",
b"\xff\x82": "ENG 2",
b"\xff\x83": "ENG 3",
b"\xff\x84": "ENG 4",
b"\xff\x85": "ENG 5",
b"\xff\x86": "ENG 6",
b"\xff\x87": "ENG 7",
b"\xff\x88": "ENG 8",
b"\xff\x89": "ENG 9",
b"\xff\x90": "MATRIX 0",
b"\xff\x91": "MATRIX 1",
b"\xff\x92": "MATRIX 2",
b"\xff\x93": "MATRIX 3",
b"\xff\x94": "MATRIX 4",
b"\xff\x95": "MATRIX 5",
b"\xff\x96": "MATRIX 6",
b"\xff\x97": "MATRIX 7",
b"\xff\x98": "MATRIX 8",
b"\xff\x99": "MATRIX 9",
b"\xff\xaa": "STO MATRIX A",
b"\xff\xab": "STO MATRIX B",
b"\xff\xac": "STO MATRIX C",
b"\xff\xad": "STO MATRIX D",
b"\xff\xae": "STO MATRIX E",
}
with open('calculator-state.bin', 'rb') as f:
d = f.read()
assert len(d) == 2048
nregs = 0xff - d[0x120]
nextra = d[0x121]
nbytes = (nregs * 7) + nextra
# Extract the program bytes from the registers
offset = 0x7e8
i = 0
pb = bytearray()
while i < nregs:
pb.extend(d[offset:offset+7])
offset = offset - 8
i = i + 1
pb.extend(d[offset:offset+nextra])
assert len(pb) == nbytes
stream = io.BytesIO(pb)
while True:
bs = stream.read1(1)
if len(bs) == 0:
break
if bs[0] == 0:
bs = bs + stream.read1(1)
if len(bs) < 2:
break
continue
if (bs[0] & 0xf) == 0xf:
bs = bs + stream.read1(1)
if len(bs) < 2:
break
print(instructions[bs])