Post Reply 
HP 41 - branching to local label and return stack - FINAL RESULTS AND PROGRAMS
05-21-2019, 01:45 PM (This post was last modified: 05-21-2019 11:23 PM by Sylvain Cote.)
Post: #22
RE: HP 41 - branching to local label and return stack
Hello Artur,
I am at work and cannot do a line by line analysis, but see my notes below ...
Sylvain

Click on "View a Printable Version" below to see the complete source code
Code:
LBL "SR"
SIGN
SF 10
RDN
RCL b
STO M                           // "HERE" after STO b
RDN
FC?C 10
RTN                             // ok
"***"
RCL IND L
ISG L
""
X<> IND L
STO N
"**"
X<> IND L
STO O
"**"
X<> O
STO a
X<> N
CLA                             // ok, fall thru, optimisation
LBL "Sb"                        
STO b                           // ok, absolute go to "HERE"
LBL "LR"
SIGN
RDN
+                               // assuming typo here, should be a string "+" not the operator +
RCL a
STO N
RDN 
RCL b
X<> M
STO 0
ASTO IND L
ISG L
""
"*****"
STO O
ASTO IND L
RDN
CLA
RTN                             // could be removed, END is a super RTN
END                             // after reading a program with the barcode reader always do a [GTO ..], it will automatically add the END and pack memory

edit: STO b comment corrected
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 41 - branching to local label and return stack - Sylvain Cote - 05-21-2019 01:45 PM



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