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

Back to Subject List

Thread Closed: Became flame-war

???
05/21/04 10:51
Read: times


 
#70812 - Here is your code
Responding to: ???'s previous message
OK Adnan,

I give in.

Here is what you want :

; UTIL_INC24 increments the 3 byte wide Hex digit by 1 count everytime it is called.
; Call with R0 pointing to the LSB of the Hex digit that is to be incremented. After the routine completes and returns your three byte wide Hex digit would have incremented by one.
UTIL_INC24:	MOV  A, @R0 ; Get Low Byte
		ADD  A, #1  ; Add 1
		MOV  @R0, A ; Store Back
		INC R0	    ; Point To next Byte
		MOV A,  @R0 ; Get the Byte
		ADDC  A,  #0; Add CY, If Set
		MOV  @R0, A ; Store Back
		INC R0	    ; Point to High Byte
		MOV  A, @R0 ; Get the byte
		ADDC  A, #0 ; Add CY , if set
		MOV  @R0, A ; Store back
		RET


All that remains to be done is now to shave-off last few lines ( you do that !) to make it work for a two byte wide digit.

Trust your problem is solved.

Raghu

List of 42 messages in thread
TopicAuthorDate
A simple problem            01/01/70 00:00      
   RE: A simple problem            01/01/70 00:00      
   RE: A simple problem            01/01/70 00:00      
      RE: A simple problem            01/01/70 00:00      
         RE: Gibberish            01/01/70 00:00      
            RE: Gibberish            01/01/70 00:00      
               RE: Gibberish            01/01/70 00:00      
                  RE: Gibberish            01/01/70 00:00      
                     RE: Gibberish            01/01/70 00:00      
         RE: Gibberish            01/01/70 00:00      
            RE: Gibberish            01/01/70 00:00      
            RE: Gibberish - or SMS            01/01/70 00:00      
   Whats wrong with this forum            01/01/70 00:00      
      RE: Whats wrong with this forum            01/01/70 00:00      
         RE: Whats wrong with this forum            01/01/70 00:00      
            RE: Whats wrong with this forum            01/01/70 00:00      
      y ppl r so lazy?!            01/01/70 00:00      
         RE: y ppl r so lazy?!            01/01/70 00:00      
            RE: moving on            01/01/70 00:00      
      Thanks            01/01/70 00:00      
         RE: Thanks            01/01/70 00:00      
         RE: oh PLEASE FORGIVE ME            01/01/70 00:00      
         RE: oh PLEASE FORGIVE ME            01/01/70 00:00      
            No problem            01/01/70 00:00      
               RE: No problem            01/01/70 00:00      
            Specify the actual problem,,            01/01/70 00:00      
               RE: Specify the actual problem,,            01/01/70 00:00      
                  RE: Specify the actual problem,,            01/01/70 00:00      
                  RE: Specify the actual problem,,            01/01/70 00:00      
                  Here is your code            01/01/70 00:00      
   RE: A simple problem - Adnan            01/01/70 00:00      
      RE: A simple problem - Adnan            01/01/70 00:00      
         RE: A simple problem - Adnan            01/01/70 00:00      
            RE: A simple problem - Prahlad            01/01/70 00:00      
               The offer still stands - Adnan zaffar            01/01/70 00:00      
            RE: A simple problem - Adnan            01/01/70 00:00      
            RE: A simple problem - Adnan            01/01/70 00:00      
         RE: A simple problem - Terry            01/01/70 00:00      
      RE: Simple way            01/01/70 00:00      
      RE: A simple problem - Adnan            01/01/70 00:00      
   What a sad thread!            01/01/70 00:00      
      RE: What a sad thread!            01/01/70 00:00      

Back to Subject List