flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
mike.dld 02 Jul 2005, 17:47
Something like (not tested):
Code: hex_table db '0123456789ABCDEF' ... mov esi,source mov edi,destination mov ecx,source_length cld @@: lodsb mov dl,al and eax,0x0F mov al,[eax+hex_table] stosb mov al,dl shr al,4 and eax,0x0F mov al,[eax+hex_table] stosb loop @b |
|||
![]() |
|
Tomasz Grysztar 02 Jul 2005, 19:28
Larger table can be used to get better speed:
Code: hex_table: repeat 256 l = (%-1) and 0Fh h = (%-1) shr 4 if h < 10 db '0'+h else db 'A'+h-10 end if if l < 10 db '0'+l else db 'A'+l-10 end if end repeat ... mov esi,source mov edi,destination mov ecx,source_length cld xor edx,edx @@: mov dl,[esi] inc esi mov ax,[hex_table+edx*2] stosw loop @b |
|||
![]() |
|
Vasilev Vjacheslav 04 Jul 2005, 05:01
big thanks for help
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.