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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/12/03 05:32
Read: times


 
#54605 - RE: C Routine for Hex to ASCII
Responding to: ???'s previous message
acc contains the value to be convereted..example a=0xfe
then the registers r2 , r1 and r0 will contain the following r2=2,r1=5,r0=4...
Apply the sam e logic in C,its pretty easy.


CONVERT:
MOV B,#10
DIV AB
MOV R2,B

MOV B,#10
DIV AB
MOV R1,B

MOV R0,A

MOV A,#30H
ORL A,R2
MOV R2,A

MOV A,#30H
ORL A,R1
MOV R1,A

MOV A,#30H
ORL A,R0
MOV R0,A

RET
Rgds
Raj

List of 18 messages in thread
TopicAuthorDate
C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      
      RE: C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      
      RE: C Routine for Hex to ASCII            01/01/70 00:00      
         RE: C Routine for Hex to ASCII            01/01/70 00:00      
            RE: C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      
      RE: C Routine for Hex to ASCII            01/01/70 00:00      
         RE: C Routine for Hex to ASCII            01/01/70 00:00      
            RE: C Routine for Hex to ASCII            01/01/70 00:00      
            RE: C Routine for Hex to ASCII            01/01/70 00:00      
            RE: C Routine for Hex to ASCII            01/01/70 00:00      
               RE: C Routine for Hex to ASCII            01/01/70 00:00      
         RE: C Routine for Hex to ASCII            01/01/70 00:00      
   RE: C Routine for Hex to ASCII            01/01/70 00:00      

Back to Subject List