Page 1 of 1

Hexa to Val

Posted: Tue Sep 03, 2024 12:50 am
by SPH

Code: Select all

; Les nombres en hexa peuvent être définis sur 1,2,4,8 ou 16 1/2 octets en ascii ou 4,8,16,32,ou 64 bits
;;;;;   123456789ABCDEF0123456789ABCDEF0 
texte$="01020345f8c6deffcb0F0345f8c6defE"
; Debug mp_h(@texte$,64,222)
longtxt=Len(texte$)
lndecoupe=1
Repeat 
  Debug "************  decoupe par "+Str(lndecoupe)+"  *************"
  i=1
Repeat
  a$="$"+Mid(texte$,i,lndecoupe)
  Debug a$+" = "+Str(Val(a$))
  i+lndecoupe
Until i>longtxt
lndecoupe*2
Until  lndecoupe>16

Re: Hexa to Val

Posted: Tue Sep 03, 2024 2:51 am
by idle
also here but note byte order is reversed
viewtopic.php?t=83378