Post Reply 
HP 41-XEQ/GTO and RTN
07-22-2017, 04:07 PM
Post: #7
RE: HP 41-XEQ/GTO and RTN
(07-22-2017 06:58 AM)Jotne Wrote:  Will these works correctly, many of them are more than 40 lines apart?

The actual limit is not 40 lines but 112 bytes. If a jump to LBL 00...14 has no greater distance the jump target (the position of the LBL in memory) can be stored within the GTO command as the first jump is performed, so that afterwards no label search is required. This can speed up the program significantly. Of course the GTO will also work if the corresponding LBL is more than 112 bytes away, but it may require more time since the label has to be searched each time the program reaches the GTO.

That's why you should use LBL 15 and up for long distance jumps. The corresponding GTOs do not have this 112-byte-limit so that, once the label has been found, all subsequent jumps can be done without a label search. So in the Caves program it would have been a good idea to replace LBL 00 all all corresponding GTOs with, say, LBL 88. Just as it was done with the random number generator at LBL 99 which can be accessed quickly from any point in the program.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 41-XEQ/GTO and RTN - Jotne - 07-03-2017, 08:17 AM
RE: HP 41-XEQ/GTO and RTN - Dieter - 07-03-2017, 10:50 AM
RE: HP 41-XEQ/GTO and RTN - Jotne - 07-03-2017, 02:30 PM
RE: HP 41-XEQ/GTO and RTN - SlideRule - 07-22-2017, 12:26 PM
RE: HP 41-XEQ/GTO and RTN - Jotne - 07-22-2017, 07:45 PM
RE: HP 41-XEQ/GTO and RTN - Jotne - 07-22-2017, 06:58 AM
RE: HP 41-XEQ/GTO and RTN - Dieter - 07-22-2017 04:07 PM
RE: HP 41-XEQ/GTO and RTN - Paul Dale - 07-22-2017, 07:34 AM



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