Post Reply 
4K HP 67 Games rom attached for testing
11-03-2016, 07:05 PM (This post was last modified: 11-03-2016 07:48 PM by Dieter.)
Post: #85
RE: 4K HP 67 Games rom attached for testing
(11-03-2016 04:27 PM)Gene Wrote:  4096 - 110 = 3986 bytes available.

Our 16 program files take 4022 bytes right now. Have to cut 36.

Should be not much of a problem.
Gene, which chess version are you planning with?

Edit:
Suppose a random number generator is used in 10 programs. It's a short one like the frac(x+pi)² version with requires merely 6 bytes plus LBL and RTN. Even if the RNG is only called once in a program and no subroutine call is necessary (best case) this occupies 6 bytes times 10 = 60 bytes. A global RNG with LBL"R" requires 12 bytes altogether, and every call with XEQ"R" requires 3 bytes. This means 12 + 3*10 = only 42 bytes. In reality the savings will be even greater since the RNG is usually called with an XEQ 09 or another numeric label. This means 10x a RNG routine with 8 bytes times 10 programs = 80 bytes. BTW XEQ 09 and XEQ"R" both require the same 3 bytes, so the global RNG calls do not require more bytes and the RNG call itself makes no difference.

A common seed function would even save more bytes since the "SEED?" text occurs only once.

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


Messages In This Thread
HP-67 AOS program to debug - Gene - 10-30-2016, 02:11 AM
RE: 4K HP 67 Games rom attached for testing - Dieter - 11-03-2016 07:05 PM



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