Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/15/01 17:34
Read: times


 
#9368 - Work the problem backwards
Patrick,

Are you really accessing only a byte at a time in the member records? More efficiency could be built in if we knew more about the means of access.

Since 256 byte table accesses and byte mathmatics are the most efficient in 8051, let's work the problem backwards. Lets say that your RAM tables will be in modules of 256.

You could support 18 members at 14 bytes each in a 256 byte set. Lets make it 16 members per table at 14 bytes each for 224 bytes of RAM. You'd need four tables that could be located right after each other (0000h, 00E0h, 01C0h, 02A0h). You take the member number, use the upper nibble to to jump to routines using these addresses as the DPTR base address for the MOVC A,@A+DPTR instruction. Now with your member broken down to sets of 16, the lower nibble is you remaining member number.

Now when you multiply the member number by byte element, you are guarenteed to get a single byte answer, move this to the ACCUMULATOR and execute a MOVC A,@A+DPTR.

aka j
From there, you only need to calculate the offset in the accumulator.

List of 30 messages in thread
TopicAuthorDate
use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
<types.h> invisible !            01/01/70 00:00      
RE: <types.h> invisible !            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
RE: use of multiply in large data arrays            01/01/70 00:00      
The FASTEST !            01/01/70 00:00      
RE: The FASTEST !            01/01/70 00:00      
Work the problem backwards            01/01/70 00:00      

Back to Subject List