Post Reply 
(15C) 95 virtual labels: vLBL and vGTO
04-12-2018, 06:43 PM
Post: #2
RE: (15C) 95 virtual labels: vLBL and vGTO
I used this to squeeze 30 programs into my calculator, but it was a tedious and error prone process which I don't recommend to anybody.

At this point all this has reached a level of complexity that would require some sort of compiler/memory layouting program with dependency management that sets up the labels and register allocation automatically. You would save your programs in a machine readable format (e.g. edn) and concatenate them, similar to C's #include function. The configuration could be compiled and be deployed via USB to a DM14L automatically.

It might look something like this:
Code:

{
        :configurations [
                ["budget/adjust", "budget/calc", "run", "vSTO", "vRCL"]
                ["xth root of y", "to binary", "log_x(y)", "y mod x", "dice"]
                ["cash register/abort", "cash register/bye", "cash register/change", "cash register/done"]
        ]
        :registers {
                0 "cash register/total"
                7 "dice/count"
                8 "dice/faces"
                9 "budget/budget"
        }
        :programs [
                "programs/whatever.edn"
                {
                        :name "dice"
                        :author "Michael Zinn (@RedNifre)"
                        :date "2018-04-06"
                        :code [
                                (FIX 0)
                                (RCL "count")
                                (STO I)
                                (CLx)
                                (LBL "loop"
                                        (RAN#)
                                        (RCL * "faces")
                                        (INT)
                                        (+)
                                        (DSE I
                                                (GTO "loop")))
                                (for ("i" 15 0)
                                        (eee)
                                        (aaa))
                                (RCL + 7)
                        ]
                }
                {
                        :name "cash register"
                        :author "Michael Zinn (@RedNifre)"
                        :date "2018-04-06"
                        :code [
                                (LBL "entry"
                                        (STO I)
                                        (RCL (i))
                                        (STO + "_tally")
                                        (R v)
                                        (RTN))

                                (LBL "done"
                                        (RCL "_tally")
                                        (RTN))

                                (LBL "change"
                                        (-)
                                        (RTN))

                                (LBL "bye"
                                        (RCL "_tally")
                                        (STO + "drawer"))
                                (LBL "abort"
                                        (FIX 2)
                                        (CLX)
                                        (STO "_tally")
                                        (RTN))
                        ]
                }
...

I'll probably not do this at this point but if somebody wants to continue the work I'm all ears!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (15C) 95 virtual labels: vLBL and vGTO - Michael Zinn - 04-12-2018 06:43 PM



User(s) browsing this thread: 1 Guest(s)