(41C) Simple elevator simulator program
|
04-12-2023, 07:24 PM
(This post was last modified: 04-16-2023 01:24 AM by acser.)
Post: #1
|
|||
|
|||
(41C) Simple elevator simulator program
Hello all,
This is a simple, single car elevator simulator program for the HP 41. There is only a button column in the elevator, but no elevator call buttons on floors (yet ). Constructive ideas for simplification are most welcome (I am pretty sure there are plenty of opportunities). Thanks in advance A (P.S.: I am amazed how simple and well thought out the HP-41 FOCAL programming language is and now see why RPL has never been able to fully displace it. It also amazes me how easy it is to write a modern Python or other high level programming language program which will be larger than 671 bytes, the size of this one.) Registers: R00: Number of floors 1-20, only up to 20 floors are supported now R01-R20 These are the individual buttons. 1 if button was pressed and is lit, 0:otherwise R21: Direction of travel for elevator car: 0=Stopped, 1=Down, 2=Up R22: Current floor indicator R23: Are there any buttons pressed and lit on the the elevator button column LIT? 0 = Not lit, 1 = Lit R24: Lowest floor pressed/lit (MINBT) value R25: Highest floor pressed/lit (MAXBT) value Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(41C) Simple elevator simulator program - acser - 04-12-2023 07:24 PM
|
User(s) browsing this thread: 1 Guest(s)