<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Dan's GitHub Pages</title>
    <description>This is my first stab a Jekyll design.  This will change as I get a bit better at it.  Look for new updates periodically.
</description>
    <link>https://brianddk.github.io//</link>
    <atom:link href="https://brianddk.github.io//feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 03 Apr 2024 17:56:19 -0500</pubDate>
    <lastBuildDate>Wed, 03 Apr 2024 17:56:19 -0500</lastBuildDate>
    <generator>Jekyll v3.9.5</generator>
    
      <item>
        <title>Bitcoin Lotto!</title>
        <description>&lt;p&gt;So by now you may have seen &lt;a href=&quot;https://youtu.be/tr3KLCDAlnU&quot;&gt;the trailer&lt;/a&gt; for the &lt;a href=&quot;http://www.cbs.com/shows/big_bang_theory/video/&quot;&gt;BBT episode&lt;/a&gt; on Bitcoin.  If you haven’t seen it, then perhaps you’ve seen one of the endless news stories about it droning on all month long.  If so, I offer some help in figuring out how to play the Bitcoin Lotto.  I’d advise you think of it as a lotto so if you don’t end up making 500% back on your money you’re not disappointed.  It even sounds like there are going to be &lt;em&gt;Bitcoin Options&lt;/em&gt; so you can insure the position if you’re interested in that kind of thing.  Below I’ll lay out in simple terms how to play the lotto for friends and family.&lt;/p&gt;

&lt;h2 id=&quot;bitcoins-and-other-cryptocurrency&quot;&gt;Bitcoins and other Cryptocurrency&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;What is a Bitcoin&lt;/em&gt; is a valid question.  It’s basically a spot in a ledger.  A deed if you will.  The difference is that the ledger is unlike any other ledger of its kind.  It is encrypted and encoded in a way that makes it completely unforgeable.  Even for large government actors.  In this way, holding a Bitcoin is irrefutable proof that you can unlock some portion of that ledger and give your entry to someone else.  All seems rather like &lt;a href=&quot;https://youtu.be/CWu7lIpNvCs&quot;&gt;trading tulips&lt;/a&gt;, and it is, but then again paper money is similar.  It’s a hard to forge proof that you hold some amount of stuff.  A Bitcoin is a hard to forge proof that you hold some amount of stuff.  Money is backed by your governments authority, bitcoin is backed by millions of hours of computing cycles.  Both based on some basic level of &lt;em&gt;trust&lt;/em&gt;.  Trust the government, or trust the cryptography (computing power).&lt;/p&gt;

&lt;p&gt;Cryptocurrency is the larger field of all Bitcoin like things.  After Bitcoin a bunch of other projects started making similar products.  After Apple, there was Windows.  After Windows there was Linux.  Same with Bitcoin.  After Bitcoin there was Litecoin.  After that Etherium.  Just like Apple/Windows/Linux, some like one choice better than others.  As far as I’m concerned, Bitcoin is the lotto ticket with the biggest payout, Litecoin is the easiest to buy/sell/give.  Ethereum will likely be the most useful of them all one day&lt;/p&gt;

&lt;h2 id=&quot;how-to-get-them&quot;&gt;How to get them&lt;/h2&gt;
&lt;p&gt;There are a few ways, good and bad, to get Cryptocurrency.  Some of them are totally above board, some are a bit less above board, and other are just plain sketchy.  Keep in mind, as of right now, sending Bitcoin from point A to point B can cost $5-$10.  So if you are convinced you only want Bitcoin, keep that in mind.  Other Cryptocurrency like Litecoin were made to be cheap to transact in.  I’d advice Litecoin until you have a few $100 dollars in Cryptocurrency, then exchange it for Bitcoin.  Here are some general options on buying:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.coinbase.com/dashboard&quot;&gt;Coinbase.com&lt;/a&gt; - The &lt;em&gt;Bitcoin Bank&lt;/em&gt;.  This is a US regulated and IRS audited bitcoin shop.  Since it’s a US shop it falls under US jurisdiction and you’re a bit less likely for them to just pick up and run off with your money.  Also understand that the IRS can legally ask for all customer records.  You have to keep close notes of what you buy and sell so that you file your taxes correctly.  This isn’t a big thing now, but it will be soon.  New accounts can take from 2-4 weeks to be approved by the IRS and other regulators.  You will pay about a 2% fee to buy over $200, much higher fees below that.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.gdax.com/&quot;&gt;GDAX Exchange&lt;/a&gt; - This is just another Coinbase site, the difference is that this is the &lt;em&gt;Exchange&lt;/em&gt;.  That means you can buy on the open market at a lower fee.  Here you can buy with no fees for orders over $100.  This will take another 1-2 weeks above the Coinbase wait in order to transfer money.  Could be quicker with a wire, but those are expensive.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://changelly.com/&quot;&gt;Changelly.com&lt;/a&gt; - This is a Czech based company that will let you buy Bitcoin with Visa / MasterCard (for now).  Similar sites have been shut down by Visa / MasterCard in the past, but this one seems to have had a pretty successful run.  The advantage is you can create an account and buy fairly quickly.  You can also use Chagelly to turn your Litecoin into Bitcoin when the time is right.  The downside is that they are a foreign company with your credit card info.&lt;/li&gt;
  &lt;li&gt;Bitcoin Stock - There are two major players here… &lt;a href=&quot;https://www.bloomberg.com/quote/GBTC:US&quot;&gt;GBTC&lt;/a&gt; in the US and &lt;a href=&quot;https://www.bloomberg.com/quote/COINXBT:SS&quot;&gt;COINXBT&lt;/a&gt; out of Sweden.  Honestly I like the Swedish one better since it tracks the price closer and doesn’t trade at a premium.  It is about $50 / share but it’s hard to find a stock broker that will buy into the Swedish exchange, and when they do, it can be an extra $50 in trading fees.  The US one is easy to get at must brokers and can be bought in a ROTH IRA as well.  It sometimes trades at insane premiums like 30%-90% above the Bitcoin price.  It’s hard to buy at $1500 / share, but &lt;a href=&quot;https://www.stockpile.com/buy_for_self/choose_stock&quot;&gt;Stockpile&lt;/a&gt; is offering it in fractional shares at very low trading fees.  In the next year or so there should be a bunch of other Bitcoin stocks, so this market will develop.  Do watch out for shady &lt;em&gt;Bitcoin IRAs&lt;/em&gt;.  These are &lt;em&gt;licensed&lt;/em&gt; brokers that take a 100% Bitcoin position.  Some might be legit, but I get real nervous looking at some of these shops.  Stockpile, Ameritrade, Fidelity, and the other discount brokers are all legit and should offer no worries.&lt;/li&gt;
  &lt;li&gt;Beg / Barter / Trade - You can always sell your XBox for Bitcoin, and you are very likely to find a buyer.  If you know someone who has Bitcoin you could also ask if they would sell you some.  There are Bitcoin meetups and the such that allow people to buy small amounts.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://btc-e.com/&quot;&gt;SketchyExchange.com&lt;/a&gt; - There are no shortage of sketchy Bitcoin exchanges… Beware, these are often scams and generally end poorly.  If you don’t know much about them, stay away.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;how-to-hold-them&quot;&gt;How to hold them&lt;/h2&gt;
&lt;p&gt;In order to hold Bitcoin you need what is called a &lt;em&gt;wallet&lt;/em&gt;.  This is the term for a software program that keeps track of your coins &lt;em&gt;keys&lt;/em&gt;.  The keys are very long account numbers where they coins will eventually be deposited.  There are public parts of a key called the &lt;em&gt;address&lt;/em&gt; and private parts called the &lt;em&gt;private key&lt;/em&gt;.  The main point here is that you have to keep the &lt;em&gt;private key&lt;/em&gt; hidden and safe.  Anyone that gains access to the private key has all your coins.  If you lose your private key, you have lost all your coins.  So ensure you know how to save and secure your keys, because this is literally where your coins are.  Here are some of my suggestions.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://coinomi.com/&quot;&gt;Coinomi (Android)&lt;/a&gt; - This is a fairly safe Android wallet that has fairly good security.  The private key is encoded in set of 15 random words.  It’s a sentence that makes no sense, but there is a mathematical rule to it that will generate the keys for your wallet.  This nonsense sentence &lt;strong&gt;IS&lt;/strong&gt; your private key… keep it safe.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://jaxx.io/&quot;&gt;Jaxx (PC/Mac/IOS/ChromeOS)&lt;/a&gt; - Similar to Coinomi this is a multi-coin wallet that uses a 12 word nonsense sentence.  Be aware that JAXX got a bad rap a while back for leaving the private keys on the hard drive of some systems, so do be careful.  Use system encryption if possible, and don’t get a virus, they will look for these keys.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once you have installed one of the wallets you can add coins to it.  Bitcoin / Litecoin / Ethereum.  When you do, you will get an &lt;em&gt;address&lt;/em&gt; that coins can be sent to.  This is how Changelly will be able to send you your coins.  Exchanges like Coinbase/GDAX will often offer to hold your coins on thier site, and that is fine, but if the site ever goes down, or they &lt;a href=&quot;https://btc-e.com/&quot;&gt;get shutdown&lt;/a&gt; you could lose your coins.&lt;/p&gt;

&lt;h2 id=&quot;reward&quot;&gt;Reward&lt;/h2&gt;
&lt;p&gt;If you made it this far, know me, and have a Litecoin address…. drop me a line and I can send some coin your way.&lt;/p&gt;
</description>
        <pubDate>Wed, 29 Nov 2017 17:04:00 -0600</pubDate>
        <link>https://brianddk.github.io//2017/11/bitcoin-tulips/</link>
        <guid isPermaLink="true">https://brianddk.github.io//2017/11/bitcoin-tulips/</guid>
        
        
        <category>bitcoin</category>
        
      </item>
    
      <item>
        <title>hp42s (35s) Mancala</title>
        <description>&lt;p&gt;This is a mancala program I wrote for the hp42s (Free42).  For those not familiar with mancala, its a very achient game that has become repopularized over the last few years in the US.  You can now get a mancala board at most stores that sell board games.  This particular ‘flavor’ of mancala kahla(6,4), but it seemed to be the one that is most available in my area.  This is a fun game to play, but most mathmatical analysis of possible permutations make this game signifigantly harder for Player 2.  Whoever goes first is likely to win.&lt;/p&gt;

&lt;p&gt;Download &lt;a href=&quot;https://github.com/brianddk/brianddk.github.io/blob/d30ab3ccd413f19df80dba37674f87ec6cf85ded/prog/mancala/mancala.raw?raw=true&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mancala.raw&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;hp-35s-portable&quot;&gt;HP 35s Portable&lt;/h3&gt;
&lt;p&gt;I had originally planned on writting this for the hp35s.  I still intend to port it, so I wrote this, basically, in hp35s syntax.  The primary listing is in an ‘.asm’ file that I put through a very gentle pre-processor.  This is done to keep all the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LBL&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XEQ&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO&lt;/code&gt; statements synced up since the 35s and 42s handle them different.  I also prefer verbose label names, but that has a tendency of poluting your program catalog with all your ‘subroutines’.  The pre-processor will take marked-up verbose labels and convert them to 42s local-labels or 35s line-labels.  Neither of which will pollute the catalog.  I have also choosen to use no named variables for similar reasons.  Since I plan to port this to the 35s, I choose to only access registers indirectly.  This is the only way that the 35s can access un-named registers, so enforcing this makes the porting a breeze.  References to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;I&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(I)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;J&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(J)&lt;/code&gt;, are all 35s notation.&lt;/p&gt;

&lt;h3 id=&quot;build-process&quot;&gt;Build Process&lt;/h3&gt;
&lt;p&gt;The build command does the pre-processing with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sed&lt;/code&gt;.  Once this is done, it feeds the result through txt2raw.pl (by Vini Matangrano).  This will both check for syntax errors and produce an hp41s raw-file.  My only hp41s is the one simulated through Free42, so no promesses, though I’m not really doing anything special here to cause concern.&lt;/p&gt;

&lt;h3 id=&quot;registers&quot;&gt;Registers&lt;/h3&gt;
&lt;p&gt;Since a real mancala board uses a counter-clockwise rotation in play, I have configured the phisical registers in a similar fashion.  This does make gameplay more natural for Player 1 than Player 2.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-asm&quot;&gt;; R00       - P2 'Home' pit
; R01       - P1 pit #1
; R02       - P1 pit #2
; R03       - P1 pit #3
; R04       - P1 pit #4
; R05       - P1 pit #5
; R06       - P1 pit #6
; R07       - P1 'Home' pit
; R08       - P2 pit #6
; R09       - P2 pit #5
; R10       - P2 pit #4
; R11       - P2 pit #3
; R12       - P2 pit #2
; R13       - P2 pit #1
; R14       - P1 Display Vector
; R15       - P2 Display Vector
; R16       - Virtual 'I' register
; R17       - Vertual 'J' register
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;flags&quot;&gt;Flags&lt;/h3&gt;
&lt;p&gt;The flags used are fairly self explanitory.  Originally, in the 35s design, I had intended on using the flag indicator as the way for Player 1 and Player 2 to know who’s turn it was.  Since the 42s doesn’t have a flag indicator, I had to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GRAD&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RAD&lt;/code&gt; to make that distinction.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-asm&quot;&gt;; FLAG1     - Player 1 turn flag
; FLAG2     - Player 2 turn flag
; FLAG3     - Winner found flag
; FLAG4     - Bad 'pick' choice flag
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;game-display&quot;&gt;Game Display&lt;/h3&gt;
&lt;p&gt;The game display will show a number between 1-million and 2-million, for both Player 1 and Player 2.  The fractional part is the player’s score (0.10 = 10 points).  The number in the million’th place is purely for alignment and should be ignored, the other numbers represent your 6 ‘pits’.  The ‘pit’ to the far left is ‘pit 1’ the pit to the far right is ‘pit 6’.  To move, you specify a pit number to move.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-asm&quot;&gt;; Game Display
;
; x: Z,DCB,A98.P2
; y: Z,123,456.P1
;
; Where,
;   'Z,'    - Ignore the 'millionth' place, its a place holder, nothing more
;   'P1'    - The score for Player 1 (in the X vector)
;   'P2'    - The score for Player 2 (in the Y vector)
;   '1|D'   - # of beans in 'pit #1' for P1 and P2
;   '2|C'   - # of beans in 'pit #2' for P1 and P2
;   '3|B'   - # of beans in 'pit #3' for P1 and P2
;   '4|A'   - # of beans in 'pit #4' for P1 and P2
;   '5|9'   - # of beans in 'pit #5' for P1 and P2
;   '6|8'   - # of beans in 'pit #6' for P1 and P2
;
; Indicators
;   'GRAD'  - Player1's turn when 'GRAD' is displayed
;   'RAD'   - Player2's turn when 'RAD' is displayed
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;gameplay&quot;&gt;Gameplay&lt;/h3&gt;
&lt;p&gt;To start the game, simply &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XEQ&lt;/code&gt; the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MANCA&lt;/code&gt; program.  The game will show the initial board and set the indicator for Player 1 to take his turn.  Player 1 can then study the board and pick a pit to move.  Thier pick is given by placing the pick in the level 1 (x) on the stack then hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;run&lt;/code&gt; (aka &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;R/S&lt;/code&gt;).  The game will then move the beans according to the rules and redisplay the board.  It is now time for the next move.  The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GRAD&lt;/code&gt; / &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RAD&lt;/code&gt; indicator will light to instruct the players as to whos turn it is.  Keep in mind, earning extra turns is a key strategy of the game.&lt;/p&gt;

&lt;h3 id=&quot;bugs&quot;&gt;Bugs&lt;/h3&gt;
&lt;p&gt;I have a few features that I haven’t implented yet, aka ‘Bugs’&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Display is base 10, so more than 9 beans in a pit is a problem - For the 35s, I will simply make a modified version of this display in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HEX&lt;/code&gt;.  This will allow 15 beans in a pit, which by most game permutations is unlikely.  For the 42s, I will have to do some &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XTOA&lt;/code&gt; commands.  This is simple enough, but just a hunk of code I haven’t written yet.&lt;/li&gt;
  &lt;li&gt;When a player empties all thier pits, the game should end, but doesn’t - This is another simple fix, but something I just haven’t done yet.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;listings&quot;&gt;Listings&lt;/h3&gt;
&lt;p&gt;Here are the listings, but do recall that you will likely need to understand that pre-processors are the key here.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/brianddk/brianddk.github.io/blob/d30ab3ccd413f19df80dba37674f87ec6cf85ded/prog/mancala/mancala.asm&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mancala.asm&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-asm&quot;&gt;LBL &quot;MANCA&quot;
    ;Main Mancala program
        XEQ [INIT]                      ; Init the game registers
        LBL [MAIN]                      ; Main game loop
            XEQ [CHECK-WINNER]          ; Check for a winner
            FS? 3                       ; Flag3 = Winner Found!
                GTO [DONE]              ; Finished when a winner is found
            LBL [REDISPLAY]             ; Come here if we pick bad
            XEQ [DISPLAY]               ; Display the game board
            XEQ [PICK]                  ; Pick a move
            FS? 4                       ; Invalid move?
                GTO [REDISPLAY]         ; .. Redisplay
            XEQ [MOVE]                  ; Move the beans
            XEQ [SWITCH]                ; Swithch players
        GTO [MAIN]                      ; Loop for next move
        LBL [DONE]                      ; This is where we finish
        XEQ [CLEANUP]                   ; Cleanup we are done
    RTN
    ;
    ; .Init registers
    LBL [INIT]                          ; Init the game registers
        CF 1                            ; Clear our flag regs
        CF 2
        CF 3
        CF 4
        13.0                            ; For i in 13..1
        STO I                           ; i
        4.0                             ; st-x = 4
        LBL [INIT-LOOP]
            STO (I)                     ; 4-&amp;gt;(i)
            DSE I                       ; DSE i
        GTO [INIT-LOOP]
        0.0                             ; i now equals zero
        STO (I)                         ; 0-&amp;gt;(i), i = 0
        7.0
        STO I
        X&amp;lt;&amp;gt;Y
        STO (I)                         ; 0-&amp;gt;(i), i = 7
        SF 1                            ; P1'S Turn
        GRAD                            ; 42s Only, P1 indicator
    RTN
    ;
    ; Check for winner
    LBL [CHECK-WINNER]
        CF 3                            ; Clear winner found flag
        0
        STO J                           ; j
        7
        STO I                           ; i
        24.0
        RCL (I)                         ; (i)
        X&amp;gt;=Y?
            GTO [P1-WINNER]
        X&amp;lt;&amp;gt;Y
        RCL (J)                         ; (j)
        X&amp;gt;=Y?
            GTO [P2-WINNER]
        GTO [WINNER-RTN]
        LBL [P1-WINNER]
            &quot;Player 1 won!&quot;
            GTO [WINNER-DONE]
        LBL [P2-WINNER]
            &quot;Player 2 won!&quot;
        LBL [WINNER-DONE]
            SF 3                        ; Set winner found flag
            PROMPT
        LBL [WINNER-RTN]
    RTN
    ;
    ; Display the board
    LBL [DISPLAY]
        1.006
        STO I                           ; i
        14
        STO J                           ; &quot;$(j)&quot; == &quot;$(14)&quot;
        1000000.0
        STO (J)                         ; (j)=1,000,000
        LBL [P1-BOARD]
            ;STOP
            10.0                        ; WARN Base 10 for now
            6
            RCL I                       ; i
            IP
            -
            Y^X                         ; i^(6-ip(i))
            RCL (I)                     ; (i)
            x                           ; i^(6-ip(i)) * $(i)
            STO+ (J)                    ; @(j) += i^(6-ip(i)) + $(i)
            ISG I                       ; i
        GTO [P1-BOARD]
        15
        STO J                           ; j = P2-vector
        1000000.0
        STO (J)
        13.007
        STO I
        LBL [P2-BOARD]
            ;STOP
            10.0                        ; WARN Base 10 for now
            RCL I
            IP
            8
            -
            Y^X
            RCL (I)
            x
            STO+ (J)
            DSE I
        GTO [P2-BOARD]
        14
        STO I                           ; i = P1-vector
        ;                               ; 42s only code begin
        FIX 2
        RCL 7                           ; P1 SCORE
        100
        /
        STO+ (I)                        ; P1 VECTOR
        RCL 0
        100
        /
        STO+ (J)                        ; P2 VECTOR
        ;                               ; 42s only code end
        RCL (J)                         ; P2
        RCL (I)                         ; P1
        STOP
    RTN
    ;
    ; Pick a pit to move
    LBL [PICK]
        CF 4
        IP
        1
        X&amp;lt;&amp;gt;Y
        X&amp;lt;Y?
            SF 4
        6
        X&amp;lt;&amp;gt;Y
        X&amp;gt;Y?
            SF 4
        FS? 4
            GTO [PICK-DONE]
        STO I                           ; i=PICK
        FS? 1
            GTO [CHECK-PICK]
        14
        X&amp;lt;&amp;gt;Y
        -
        STO I                           ; i
        LBL [CHECK-PICK]
        RCL (I)                         ; (i)
        X=0?
            SF 4
        LBL [PICK-DONE]
        RCL I                           ; i
    RTN
    ;
    ; Move beans from selected pit
    LBL [MOVE]
        0
        X&amp;lt;&amp;gt; (I)                         ; (i)= 0 (MOVE BEANS OUT)
        STO J                           ; j=VALUE PREVIOUSLY IN (i)
        LBL [MOVE-LOOP]
            ; INCI SUBROUTINE-INLINE
            1.0
            RCL+ I                      ; i++ (MOVE REGISTER FORWARD)
            14.0
            MOD
            STO I                       ; i=(i+1)MOD(14)
            FS? 1                       ; P1?
                XEQ [SKIP0]             ; SKIP0 IF P1
            FS? 2
                XEQ [SKIP7]             ; SKIP7 IF P2
            ; INCI END-SUBROUTINE-INLINE
            1.0
            STO+ (I)                    ; (i)=(i)+1
            DSE J                       ; j--
        GTO [MOVE-LOOP]
        1.0
        RCL (I)
        X=Y?
            XEQ [WIN-BEANS]
    RTN
    ;
    ; SKIP0
    LBL [SKIP0]
        X=0?
            ISG I
        CF 0                            ; NOP
    RTN
    ;
    ; SKIP7
    LBL [SKIP7]
        7
        X&amp;lt;&amp;gt;Y
        X=Y?
            ISG I
        CF 0                            ; NOP
    RTN
    ;
    ; WIN-BEANS
    LBL [WIN-BEANS]
        ;STOP
        7
        RCL I
        FS? 1
            GTO [P1-WINBEANS]
        FS? 2
            GTO [P2-WINBEANS]
        RTN
        LBL [P1-WINBEANS]
            7.0
            STO J
            Rv
            X&amp;gt;=Y?
                RTN
            GTO [DONE-WINBEANS]
        LBL [P2-WINBEANS]
            0.0
            STO J
            Rv
            X&amp;lt;=Y?
                RTN
        LBL [DONE-WINBEANS]
        14.0
        X&amp;lt;&amp;gt;Y
        -
        STO I
        0
        X&amp;lt;&amp;gt; (I)
        STO+ (J)
    RTN
    ;
    ; Switch to other players turn
    LBL [SWITCH]
        7
        RCL I                           ; i contains the final register of move
        X=Y?                            ; if i=7, landed in a bank, free move
            RTN
        X=0?                            ; if i=0, landed in a bank, free move
            RTN
        FS? 1
        GTO [SWITCHTO-P2]
            CF 2
            SF 1
            GRAD
            GTO [SWITCH-DONE]
        LBL [SWITCHTO-P2]
            CF 1
            SF 2
            RAD
        LBL [SWITCH-DONE]
    RTN
    ;
    ; Clean up after game
    LBL [CLEANUP]
        CF 1
        CF 2
        CF 3
        CF 4
        FIX 4
        DEG
    RTN
END
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/brianddk/brianddk.github.io/blob/d30ab3ccd413f19df80dba37674f87ec6cf85ded/prog/mancala/build.sh&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build.sh&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/env bash&lt;/span&gt;

get-label&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'LBL \['&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;awk&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'{print $2}'&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;sort&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;uniq&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'s/\[//g;s/\]//g'&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

make-sed&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;ivar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;16
    &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;jvar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;17
    &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;i
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/^&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s\+&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;;.*//g&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;(I)/ IND &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ivar&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/g&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;(J)/ IND &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$jvar&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/g&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ivar&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/g&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;lt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;J&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&amp;gt;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$jvar&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/g&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;/^&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;d&quot;&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;/^&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\s&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;*;.*&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$/&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;d&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;while &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;read &lt;/span&gt;line
    &lt;span class=&quot;k&quot;&gt;do
        &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;$((&lt;/span&gt;i+1&lt;span class=&quot;k&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;s/&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\(\[&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$line&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\]\)&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\1&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;/g&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

show-list&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; /dev/stdin &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;

get-label &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt; | make-sed | show-list &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;.txt
perl txt2raw.pl &lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/brianddk/brianddk.github.io/blob/d30ab3ccd413f19df80dba37674f87ec6cf85ded/prog/mancala/mancala.txt&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mancala.txt&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;00 { 476-Byte Prgm }  40 CF 03            80 STO+ IND 17   120 X&amp;lt;&amp;gt;Y         160 GTO 11      200 14
01&amp;gt;LBL &quot;MANCA&quot;        41 0                81 ISG 16        121 X&amp;lt;Y?         161 1           201 X&amp;lt;&amp;gt;Y
02 XEQ 07             42 STO 17           82 GTO 12        122 SF 04        162 RCL IND 16  202 -
03&amp;gt;LBL 09             43 7                83 15            123 6            163 X=Y?        203 STO 16
04 XEQ 02             44 STO 16           84 STO 17        124 X&amp;lt;&amp;gt;Y         164 XEQ 26      204 0
05 FS? 03             45 24               85 1E6           125 X&amp;gt;Y?         165 RTN         205 X&amp;lt;&amp;gt; IND 16
06 GTO 05             46 RCL IND 16       86 STO IND 17    126 SF 04        166&amp;gt;LBL 21      206 STO+ IND 17
07&amp;gt;LBL 20             47 X&amp;gt;=Y?            87 13.007        127 FS? 04       167 X=0?        207 RTN
08 XEQ 04             48 GTO 14           88 STO 16        128 GTO 19       168 ISG 16      208&amp;gt;LBL 23
09 XEQ 18             49 X&amp;lt;&amp;gt;Y             89&amp;gt;LBL 15        129 STO 16       169 CF 00       209 7
10 FS? 04             50 RCL IND 17       90 10            130 FS? 01       170 RTN         210 RCL 16
11 GTO 20             51 X&amp;gt;=Y?            91 RCL 16        131 GTO 01       171&amp;gt;LBL 22      211 X=Y?
12 XEQ 10             52 GTO 17           92 IP            132 14           172 7           212 RTN
13 XEQ 23             53 GTO 28           93 8             133 X&amp;lt;&amp;gt;Y         173 X&amp;lt;&amp;gt;Y        213 X=0?
14 GTO 09             54&amp;gt;LBL 14           94 -             134 -            174 X=Y?        214 RTN
15&amp;gt;LBL 05             55 &quot;Player 1 won!&quot;  95 Y^X           135 STO 16       175 ISG 16      215 FS? 01
16 XEQ 03             56 GTO 27           96 RCL IND 16    136&amp;gt;LBL 01       176 CF 00       216 GTO 25
17 RTN                57&amp;gt;LBL 17           97 О             137 RCL IND 16   177 RTN         217 CF 02
18&amp;gt;LBL 07             58 &quot;Player 2 won!&quot;  98 STO+ IND 17   138 X=0?         178&amp;gt;LBL 26      218 SF 01
19 CF 01              59&amp;gt;LBL 27           99 DSE 16        139 SF 04        179 7           219 GRAD
20 CF 02              60 SF 03            100 GTO 15       140&amp;gt;LBL 19       180 RCL 16      220 GTO 24
21 CF 03              61 PROMPT           101 14           141 RCL 16       181 FS? 01      221&amp;gt;LBL 25
22 CF 04              62&amp;gt;LBL 28           102 STO 16       142 RTN          182 GTO 13      222 CF 01
23 13                 63 RTN              103 FIX 02       143&amp;gt;LBL 10       183 FS? 02      223 SF 02
24 STO 16             64&amp;gt;LBL 04           104 RCL 07       144 0            184 GTO 16      224 RAD
25 4                  65 1.006            105 100          145 X&amp;lt;&amp;gt; IND 16   185 RTN         225&amp;gt;LBL 24
26&amp;gt;LBL 08             66 STO 16           106 э            146 STO 17       186&amp;gt;LBL 13      226 RTN
27 STO IND 16         67 14               107 STO+ IND 16  147&amp;gt;LBL 11       187 7           227&amp;gt;LBL 03
28 DSE 16             68 STO 17           108 RCL 00       148 1            188 STO 17      228 CF 01
29 GTO 08             69 1E6              109 100          149 RCL+ 16      189 Rv          229 CF 02
30 0                  70 STO IND 17       110 э            150 14           190 X&amp;gt;=Y?       230 CF 03
31 STO IND 16         71&amp;gt;LBL 12           111 STO+ IND 17  151 MOD          191 RTN         231 CF 04
32 7                  72 10               112 RCL IND 17   152 STO 16       192 GTO 06      232 FIX 04
33 STO 16             73 6                113 RCL IND 16   153 FS? 01       193&amp;gt;LBL 16      233 DEG
34 X&amp;lt;&amp;gt;Y               74 RCL 16           114 STOP         154 XEQ 21       194 0           234 RTN
35 STO IND 16         75 IP               115 RTN          155 FS? 02       195 STO 17      235 END
36 SF 01              76 -                116&amp;gt;LBL 18       156 XEQ 22       196 Rv
37 GRAD               77 Y^X              117 CF 04        157 1            197 X&amp;lt;=Y?
38 RTN                78 RCL IND 16       118 IP           158 STO+ IND 16  198 RTN
39&amp;gt;LBL 02             79 О                119 1            159 DSE 17       199&amp;gt;LBL 06
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Download &lt;a href=&quot;https://github.com/brianddk/brianddk.github.io/blob/d30ab3ccd413f19df80dba37674f87ec6cf85ded/prog/mancala/mancala.raw?raw=true&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mancala.raw&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 04 May 2016 17:20:00 -0500</pubDate>
        <link>https://brianddk.github.io//2016/05/hp-42s-mancala/</link>
        <guid isPermaLink="true">https://brianddk.github.io//2016/05/hp-42s-mancala/</guid>
        
        
        <category>calc</category>
        
        <category>hp42s</category>
        
        <category>hp35s</category>
        
      </item>
    
      <item>
        <title>hp35s Software</title>
        <description>&lt;p&gt;This is a small collection of useful hp 35s program listings (aka software) for use by 35s owners.  Some are from the hp-32 or hp-33, but should be usable with only very minor modifications.  Most of these are obviously found at &lt;a href=&quot;http://www.hpmuseum.org/&quot;&gt;The Museum of HP Calculators&lt;/a&gt;.  Hats off to that great group of enthusiasts.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.stefanv.com/calculators/hp35s_curve_fitting.html&quot;&gt;Curve Fitting&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.stefanv.com/calculators/hp35s_matrix_multitool.html&quot;&gt;Matrix Multi-tool&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.namirshammas.com/NCSStatPac/NCSSTATPAC.htm&quot;&gt;NCS35TB Stat Pac&lt;/a&gt;, (contains a set of statistical programs for the HP-35s)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/forum/post-44542.html#pid44542&quot;&gt;Stat Student t distribution&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv018.cgi?read=140944&quot;&gt;Complex-&amp;gt; Real Coefficents&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv017.cgi?read=121176&quot;&gt;Complex Conjugate&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35derivp.htm&quot;&gt;Derivative in a point&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35hacksl.htm&quot;&gt;Hack and Slash Adventure Game&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35moonla.htm&quot;&gt;Moon Lander Game&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35nim.htm&quot;&gt;Game of NIM&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35cowbul.htm&quot;&gt;Mastermind Game&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/32blkjck.htm&quot;&gt;Blackjack Game&lt;/a&gt;, (Change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A001&lt;/code&gt; for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO/XEQ&lt;/code&gt; for all labels).&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35polrec.htm&quot;&gt;-&amp;gt;P and -&amp;gt;R Conversions&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35quadrt.htm&quot;&gt;Quadratic Roots&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35seprop.htm&quot;&gt;Section Properties for Composite Body&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/35sumfun.htm&quot;&gt;Sum Function&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/33miller.htm&quot;&gt;Miller Indices for Cubic Crystal&lt;/a&gt;, (Change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A001&lt;/code&gt; for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO/XEQ&lt;/code&gt; for all labels).&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/33prifac.htm&quot;&gt;Prime Factorization&lt;/a&gt;, (Change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A001&lt;/code&gt; for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO/XEQ&lt;/code&gt; for all labels).&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/33smotn.htm&quot;&gt;Bodies in motion&lt;/a&gt;, (Change &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO A001&lt;/code&gt; for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GTO/XEQ&lt;/code&gt; for all labels).&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/software/34fibon.htm&quot;&gt;Fibbonacci Function&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/forum/thread-3785.html&quot;&gt;Great SW Thread&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.hpmuseum.org/forum/thread-5207.html&quot;&gt;Survey SW for 35s&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
        <pubDate>Thu, 28 Apr 2016 08:30:00 -0500</pubDate>
        <link>https://brianddk.github.io//2016/04/hp-35s-software/</link>
        <guid isPermaLink="true">https://brianddk.github.io//2016/04/hp-35s-software/</guid>
        
        
        <category>calc</category>
        
        <category>hp35s</category>
        
      </item>
    
      <item>
        <title>hp35s Observations</title>
        <description>&lt;p&gt;Recently, much to my joy, my son got to that special level of mathematics that require a calculator a bit more powerful than Window’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;calc.exe&lt;/code&gt;.  I knew I wanted the kids to learn RPN, primarily as a way to deconstruct problems and segment them.  I found that using RPN in college helped me see calculus equations a bit differently, and as such, I did a much better job and avoiding sign inversion (my kids biggest problem).  So since I had a captured audience, I started with the RPN indoctrination before a Casio or TI could object.  Before there could be the chance for suggestions on the matter, I went for my old hp48gx from college.  This did not go over well.  After a bit of reflection on the matter, I decided that the hp48gx was a bit too much for his current workload, so I started looking for some smaller options&lt;/p&gt;

&lt;p&gt;Here’s some of what I stumbled on:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Android Free42&lt;/strong&gt; - By far, one of the best hpCalc simulators I have found to date.  The software is all open sourced, and doesn’t use any pirated hp ROMs.  I was very impressed with this effort and pleased to see it is receiving active development, and seems to have a huge following.  Best of all, the hp42s is the perfect size to simulate on a smart-phone.  Although the hp48sx emulators/simulators seem solid enough, they are just a bit too busy for my tastes.  I immediately installed this on all the kids smart-phones.  Of all the options, this was the best fit, except for the fact that no algebra teacher would ever allow a kid to take a test with a smart-phone.  That aside, this product is very solid.  Nice features include:
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;Program Import / Export&lt;/em&gt; - Fantastic feature.  I can write programs on my smart-phone then import them on the kids.&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Program Listing / Printing&lt;/em&gt; - Good for sharing programs with others… like you guys.&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;Program ‘Compiler’ in Perl&lt;/em&gt; - Haven’t dabbled with it much, but seems solid enough.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Used HP 42s&lt;/strong&gt; - After falling in love with the Free42 project, I figured I just get him a throwback HP 42s.  &lt;em&gt;MISTAKE&lt;/em&gt;.  Although they retailed for $100 back in the late 80s, these things go for $500 today.  &lt;em&gt;INSANE&lt;/em&gt;.  OK, I like the 42s, but not that much.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;HP Prime Calculator&lt;/strong&gt; - If the 48gx didn’t work for them, the Prime wouldn’t either, but since I was on the calc page, I looked it up.  This one seems to be their flagship calculator and and has a pretty big following.  I just about bought one for myself, purely on calculator nostalgia, but noticed the HP Store was sold-out (&lt;em&gt;panic&lt;/em&gt;).  I was not pleased, and this raised some alarms.  Is HP leaving the calculator market?  Are they discontinuing their flagship?  I did see some on Amazon, but wasn’t going to shell out that kind of money.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;HP 50g&lt;/strong&gt; - Yes, I had to get one.  Partly for nostalgia, and partly from the panic of seeing the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HP Prime&lt;/code&gt; sold-out.  I figure, if I force my kids into the RPN mindset, I better make sure they have a calculator for Calculus.  So my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;50g&lt;/code&gt; is my backup plan.  No complaints.  Looks and feels a lot like my ‘48gx’ with some impressive ‘CAS’ capabilities that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;48gx&lt;/code&gt; did, but reluctantly.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;HP 35s (WINNER)&lt;/strong&gt; - This was the right form factor, handled complex numbers, equations, programmable, and most other stuff I thought the kids might need for the next few years.  Although this is a newer calculator than the 42s, it is not nearly as featured, but since I was looking for a smaller option, it was perfect for my needs.  Few likes and dislikes:
    &lt;ul&gt;
      &lt;li&gt;Likes:
        &lt;ul&gt;
          &lt;li&gt;&lt;em&gt;800 Indirect Variables&lt;/em&gt; - At first I didn’t dabble with the indirect variables, but as I began to write more programs on it, they became very useful.  I generally leave these variables to programs and I don’t have to worry about clobbering them.  I also consider &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;I&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;J&lt;/code&gt; as volatile and assume that any program may clobber them.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;User Flag Annunciator&lt;/em&gt; - This allows me to work around some of the dislikes I have.  I can light a user flag annunciator ant that lets me know certain conditions happened in my program, and how to remedy it.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Programmable&lt;/em&gt; - This, above all others, fixes any shortfall.  Almost anything the calculator “can’t do” can be fixed with the right program.  Almost…&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Complex Number Support&lt;/em&gt; - This solves so many problems and am grateful for it’s inclusion in this model, though it is a bit kludgey.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Fraction Display&lt;/em&gt; - I could care less, but my son loves this feature above all others.  I include it for his sake.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Form Factor&lt;/em&gt; - Frankly, this is why I got it.  It looks like a standard puny Casio.  No real indication of the power within.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Full HP Support&lt;/em&gt; - Full set of manuals, full set of features, full warranty.  Everything a father could ask for.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Dislikes:
        &lt;ul&gt;
          &lt;li&gt;&lt;em&gt;Single Letter Program Names&lt;/em&gt; - I thought this would be a nightmare, but my solution was simple.  Write a program to display what the other programs are.  I call this program &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;H&lt;/code&gt; for [H]elp.  It requires a bit of extra work to add a entry in the Help program whenever I write a new one, but this is simple enough.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;No Export&lt;/em&gt; - Would have been nice to have a USB cable.  I’ve written about 5-6 programs and would have liked an export capability, but as it stands, I’ll have to transcribe.  Not a really big deal, but an annoyance.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;Kludgey Complex Support&lt;/em&gt; - Complex math is only supported on a few functions.  X^Y supports complex but X^2 doesn’t.  Silly really.  OK, so I just have to do X^(1/2) then.  Ohh well.&lt;/li&gt;
          &lt;li&gt;&lt;em&gt;No Continue On Error&lt;/em&gt; - Previous HP calcs have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Overflow Halt&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Overflow Status&lt;/code&gt; flags, but on previous ones clearing them had a wonderful side effect.  Previous generations would allow you to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Continue On Error&lt;/code&gt; if &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Overflow Halt&lt;/code&gt; was cleared.  This means you could trap errors and recover in your programs.  Try as I might, I could not get the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HP 35s&lt;/code&gt; to do this.  Overflow is only for Overflow, nothing else.  What I did settle upon was to make programs &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Restartable&lt;/code&gt;.  Before I do operations that could trigger an error, I set a flag (and clear it after).  If the error halts the program, I restart it and can tell what error happened and then jump to some trap code.  Kludgey but workable.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All in all, I love the HP nostalgia and have had a lot of fun recalling all my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RPL&lt;/code&gt; mad skills.  Even went through a few program listings with the kids.  They were patient, but not really that interested.  Ohh well.  I still have some toys to fool around with.&lt;/p&gt;
</description>
        <pubDate>Sat, 23 Apr 2016 23:50:00 -0500</pubDate>
        <link>https://brianddk.github.io//2016/04/hp-35s-observe/</link>
        <guid isPermaLink="true">https://brianddk.github.io//2016/04/hp-35s-observe/</guid>
        
        
        <category>calc</category>
        
        <category>hp35s</category>
        
      </item>
    
      <item>
        <title>Welcome to Jekyll!</title>
        <description>&lt;p&gt;You’ll find this post in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;http://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Sun, 13 Mar 2016 14:12:07 -0500</pubDate>
        <link>https://brianddk.github.io//2016/03/welcome-to-jekyll/</link>
        <guid isPermaLink="true">https://brianddk.github.io//2016/03/welcome-to-jekyll/</guid>
        
        
        <category>jekyll</category>
        
        <category>update</category>
        
      </item>
    
  </channel>
</rss>
