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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/20/06 14:55
Read: times


 
#120683 - a faster, simpler method
Responding to: ???'s previous message
I'm wholeheartedly open to contributions/comments/suggestions/questions/criticisms.
your code:
     	JMP	@A+DPTR		;24
JMPTBL:	JMP	APLYMV		;24
	JMP	APLYHD
	JMP	APLYFL
	JMP	APLYFD
	JMP	APLYTW
	JMP	APLYSP
APLYMV:	CLR	HOLD		;12
	CLR	FLASH		;12
	CLR	FADE		;12
	CLR	TWINKLE		;12
	CLR	SPARKLE		;12
	JMP	HELLOUT		;24
APLYHD:	SETB	HOLD
	CLR	FLASH
	CLR	FADE
	CLR	TWINKLE
	CLR	SPARKLE
	JMP	HELLOUT
can be made simpler and faster this way
// I use C definitions; Keil accept them for assembler
features ds 1 ; use some bit addressable location (e.g. 20h
#define HOLD    features^4
#define FLASH   features^3
#define FADE    features^2
#define TWINKLE features^1
#define SPARKLE features^o

#define M_HOLD    0x10
#define M_FLASH   0x08
#define M_FADE    0x04
#define M_TWINKLE 0x02
#define M_SPARKLE 0x01



now the code becomes


     	movc	a,@A+DPTR
     	mov     features,a
     	
locate this elsewhere
                ;0  + M_HOLD + M_FLASH + M_FADE + M_TWINKLE + M_SPARKLE 
JMPTBL:	dw	0     
	dw	0  + M_HOLD 
           ....
Erik


List of 39 messages in thread
TopicAuthorDate
16x128 LED sign firmware            01/01/70 00:00      
   Schematic            01/01/70 00:00      
   Some comments            01/01/70 00:00      
      This 'other guy' agrees.            01/01/70 00:00      
         A lesson I learned all to while.            01/01/70 00:00      
            we have all heard that BS            01/01/70 00:00      
               A better cure            01/01/70 00:00      
                  Please elaborate...            01/01/70 00:00      
                     Fire him            01/01/70 00:00      
   need a schematic or, at least, a description of th            01/01/70 00:00      
   a faster, simpler method            01/01/70 00:00      
   Pray for us            01/01/70 00:00      
      Best wishes, dear Payam!            01/01/70 00:00      
      a blessing in disguise?            01/01/70 00:00      
   SCH, PCB            01/01/70 00:00      
      Additional protection circuitry recommended            01/01/70 00:00      
         reset???            01/01/70 00:00      
            ADM691, only backup control for RAM?            01/01/70 00:00      
               fot THAT money? a diode would do...            01/01/70 00:00      
                  ...and a resistor. Or two diodes...            01/01/70 00:00      
   Book            01/01/70 00:00      
      Don't believe everything you read. Sorry about Kin            01/01/70 00:00      
         Yes, Payam is an honorable man!            01/01/70 00:00      
   thanks..            01/01/70 00:00      
      you better get a superfast processor            01/01/70 00:00      
   3D Virtual PCBs            01/01/70 00:00      
      what is a .wrl file?            01/01/70 00:00      
         .wrl            01/01/70 00:00      
            no way ...            01/01/70 00:00      
               ?            01/01/70 00:00      
                  is that not an executable?            01/01/70 00:00      
                     The gov't to the rescue            01/01/70 00:00      
                        Flux in flux            01/01/70 00:00      
                           Linux, 3D and vrml            01/01/70 00:00      
                              why?            01/01/70 00:00      
                                 Try it.            01/01/70 00:00      
                                    no, under rules            01/01/70 00:00      
                        what a joke            01/01/70 00:00      
   MessagingSoftware            01/01/70 00:00      

Back to Subject List