My 1st HP-41 program. Suggestions?
|
10-19-2023, 12:49 AM
Post: #1
|
|||
|
|||
My 1st HP-41 program. Suggestions?
After having spent some time typing in simple programs suggested from "HP-41C
STANDARD APPLICATIONS" as suggested by Sylvain I decided to write a guess the number program as I have done this on almost every new system I have programmed since the mid 1980s. The random number generator is from the Games book. I did add a seed function that uses TIME. The method of displaying prompts was copied from the Guess the word program in the Standard Apps manual. I'm curious how others might optimize this program. I just implemented one small change as noted in the listing below. The RTN and END were removed from SEED so it drops through to RNDM. This also allows removing one line from GNUM as well. I tried to keep the random number in Y by using strategically placed RDROPs. This works but seems messy. It is also not ideal on the DM41X as you can see the random number. I guess the number could be stored in R02 and an indirect Y used instead. Code:
Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)